Class: Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb

Overview

REST client for the CloudDeploy service.

CloudDeploy service creates and manages Continuous Delivery operations on Google Cloud Platform via Skaffold (https://skaffold.dev).

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#automation_path, #automation_run_path, #build_path, #cluster_path, #config_path, #custom_target_type_path, #delivery_pipeline_path, #job_path, #job_run_path, #location_path, #membership_path, #release_path, #repository_path, #rollout_path, #service_path, #target_path, #worker_pool_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new CloudDeploy REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the CloudDeploy client.

Yield Parameters:



258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 258

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::Deploy::V1::CloudDeploy::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @cloud_deploy_stub = ::Google::Cloud::Deploy::V1::CloudDeploy::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials
  )

  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @cloud_deploy_stub.endpoint
    config.universe_domain = @cloud_deploy_stub.universe_domain
    config.bindings_override = @config.bindings_override
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @cloud_deploy_stub.endpoint
    config.universe_domain = @cloud_deploy_stub.universe_domain
    config.bindings_override = @config.bindings_override
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Rest::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Rest::Client)


331
332
333
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 331

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


324
325
326
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 324

def location_client
  @location_client
end

#operations_client::Google::Cloud::Deploy::V1::CloudDeploy::Rest::Operations (readonly)

Get the associated client for long-running operations.



317
318
319
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 317

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the CloudDeploy Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all CloudDeploy clients
::Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 67

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Deploy", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.list_delivery_pipelines.timeout = 60.0
    default_config.rpcs.list_delivery_pipelines.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_delivery_pipeline.timeout = 60.0
    default_config.rpcs.get_delivery_pipeline.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_delivery_pipeline.timeout = 60.0

    default_config.rpcs.update_delivery_pipeline.timeout = 60.0

    default_config.rpcs.delete_delivery_pipeline.timeout = 60.0

    default_config.rpcs.list_targets.timeout = 60.0
    default_config.rpcs.list_targets.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_target.timeout = 60.0
    default_config.rpcs.get_target.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_target.timeout = 60.0

    default_config.rpcs.update_target.timeout = 60.0

    default_config.rpcs.delete_target.timeout = 60.0

    default_config.rpcs.list_custom_target_types.timeout = 60.0
    default_config.rpcs.list_custom_target_types.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_custom_target_type.timeout = 60.0
    default_config.rpcs.get_custom_target_type.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_custom_target_type.timeout = 60.0

    default_config.rpcs.update_custom_target_type.timeout = 60.0

    default_config.rpcs.delete_custom_target_type.timeout = 60.0

    default_config.rpcs.list_releases.timeout = 60.0
    default_config.rpcs.list_releases.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_release.timeout = 60.0
    default_config.rpcs.get_release.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_release.timeout = 60.0

    default_config.rpcs.abandon_release.timeout = 60.0

    default_config.rpcs.approve_rollout.timeout = 60.0

    default_config.rpcs.advance_rollout.timeout = 60.0

    default_config.rpcs.cancel_rollout.timeout = 60.0

    default_config.rpcs.list_rollouts.timeout = 60.0
    default_config.rpcs.list_rollouts.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_rollout.timeout = 60.0
    default_config.rpcs.get_rollout.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_rollout.timeout = 60.0

    default_config.rpcs.ignore_job.timeout = 60.0

    default_config.rpcs.retry_job.timeout = 60.0

    default_config.rpcs.list_job_runs.timeout = 60.0
    default_config.rpcs.list_job_runs.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_job_run.timeout = 60.0
    default_config.rpcs.get_job_run.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.terminate_job_run.timeout = 60.0

    default_config.rpcs.get_config.timeout = 60.0
    default_config.rpcs.get_config.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_automation.timeout = 60.0

    default_config.rpcs.update_automation.timeout = 60.0

    default_config.rpcs.delete_automation.timeout = 60.0

    default_config.rpcs.get_automation.timeout = 60.0
    default_config.rpcs.get_automation.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_automations.timeout = 60.0
    default_config.rpcs.list_automations.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_automation_run.timeout = 60.0
    default_config.rpcs.get_automation_run.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_automation_runs.timeout = 60.0
    default_config.rpcs.list_automation_runs.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.cancel_automation_run.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#abandon_release(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::AbandonReleaseResponse #abandon_release(name: nil) ⇒ ::Google::Cloud::Deploy::V1::AbandonReleaseResponse

Abandons a Release in the Delivery Pipeline.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::AbandonReleaseRequest.new

# Call the abandon_release method.
result = client.abandon_release request

# The returned object is of type Google::Cloud::Deploy::V1::AbandonReleaseResponse.
p result

Overloads:

  • #abandon_release(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::AbandonReleaseResponse

    Pass arguments to abandon_release via a request object, either of type AbandonReleaseRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::AbandonReleaseRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #abandon_release(name: nil) ⇒ ::Google::Cloud::Deploy::V1::AbandonReleaseResponse

    Pass arguments to abandon_release via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2318

def abandon_release request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::AbandonReleaseRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.abandon_release..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.abandon_release.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.abandon_release.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.abandon_release request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#advance_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::AdvanceRolloutResponse #advance_rollout(name: nil, phase_id: nil) ⇒ ::Google::Cloud::Deploy::V1::AdvanceRolloutResponse

Advances a Rollout in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::AdvanceRolloutRequest.new

# Call the advance_rollout method.
result = client.advance_rollout request

# The returned object is of type Google::Cloud::Deploy::V1::AdvanceRolloutResponse.
p result

Overloads:

  • #advance_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::AdvanceRolloutResponse

    Pass arguments to advance_rollout via a request object, either of type AdvanceRolloutRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::AdvanceRolloutRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #advance_rollout(name: nil, phase_id: nil) ⇒ ::Google::Cloud::Deploy::V1::AdvanceRolloutResponse

    Pass arguments to advance_rollout via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

    • phase_id (::String) (defaults to: nil)

      Required. The phase ID to advance the Rollout to.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2482

def advance_rollout request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::AdvanceRolloutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.advance_rollout..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.advance_rollout.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.advance_rollout.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.advance_rollout request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#approve_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ApproveRolloutResponse #approve_rollout(name: nil, approved: nil) ⇒ ::Google::Cloud::Deploy::V1::ApproveRolloutResponse

Approves a Rollout.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ApproveRolloutRequest.new

# Call the approve_rollout method.
result = client.approve_rollout request

# The returned object is of type Google::Cloud::Deploy::V1::ApproveRolloutResponse.
p result

Overloads:

  • #approve_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ApproveRolloutResponse

    Pass arguments to approve_rollout via a request object, either of type ApproveRolloutRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ApproveRolloutRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #approve_rollout(name: nil, approved: nil) ⇒ ::Google::Cloud::Deploy::V1::ApproveRolloutResponse

    Pass arguments to approve_rollout via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

    • approved (::Boolean) (defaults to: nil)

      Required. True = approve; false = reject

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2400

def approve_rollout request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ApproveRolloutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.approve_rollout..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.approve_rollout.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.approve_rollout.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.approve_rollout request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_automation_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::CancelAutomationRunResponse #cancel_automation_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::CancelAutomationRunResponse

Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CancelAutomationRunRequest.new

# Call the cancel_automation_run method.
result = client.cancel_automation_run request

# The returned object is of type Google::Cloud::Deploy::V1::CancelAutomationRunResponse.
p result

Overloads:

  • #cancel_automation_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::CancelAutomationRunResponse

    Pass arguments to cancel_automation_run via a request object, either of type Google::Cloud::Deploy::V1::CancelAutomationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CancelAutomationRunRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #cancel_automation_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::CancelAutomationRunResponse

    Pass arguments to cancel_automation_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the AutomationRun. Format is projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 4143

def cancel_automation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CancelAutomationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_automation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_automation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_automation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.cancel_automation_run request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::CancelRolloutResponse #cancel_rollout(name: nil) ⇒ ::Google::Cloud::Deploy::V1::CancelRolloutResponse

Cancels a Rollout in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CancelRolloutRequest.new

# Call the cancel_rollout method.
result = client.cancel_rollout request

# The returned object is of type Google::Cloud::Deploy::V1::CancelRolloutResponse.
p result

Overloads:

  • #cancel_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::CancelRolloutResponse

    Pass arguments to cancel_rollout via a request object, either of type Google::Cloud::Deploy::V1::CancelRolloutRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CancelRolloutRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #cancel_rollout(name: nil) ⇒ ::Google::Cloud::Deploy::V1::CancelRolloutResponse

    Pass arguments to cancel_rollout via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2562

def cancel_rollout request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CancelRolloutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_rollout..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_rollout.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_rollout.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.cancel_rollout request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the CloudDeploy Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



228
229
230
231
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 228

def configure
  yield @config if block_given?
  @config
end

#create_automation(request, options = nil) ⇒ ::Gapic::Operation #create_automation(parent: nil, automation_id: nil, automation: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new Automation in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CreateAutomationRequest.new

# Call the create_automation method.
result = client.create_automation request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_automation(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_automation via a request object, either of type Google::Cloud::Deploy::V1::CreateAutomationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CreateAutomationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_automation(parent: nil, automation_id: nil, automation: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_automation via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which the Automation should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

    • automation_id (::String) (defaults to: nil)

      Required. ID of the Automation.

    • automation (::Google::Cloud::Deploy::V1::Automation, ::Hash) (defaults to: nil)

      Required. The Automation to create.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3471

def create_automation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateAutomationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_automation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_automation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_automation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.create_automation request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_custom_target_type(request, options = nil) ⇒ ::Gapic::Operation #create_custom_target_type(parent: nil, custom_target_type_id: nil, custom_target_type: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new CustomTargetType in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest.new

# Call the create_custom_target_type method.
result = client.create_custom_target_type request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_custom_target_type(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_custom_target_type via a request object, either of type Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_custom_target_type(parent: nil, custom_target_type_id: nil, custom_target_type: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_custom_target_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which the CustomTargetType should be created. Format should be projects/{project_id}/locations/{location_name}.

    • custom_target_type_id (::String) (defaults to: nil)

      Required. ID of the CustomTargetType.

    • custom_target_type (::Google::Cloud::Deploy::V1::CustomTargetType, ::Hash) (defaults to: nil)

      Required. The CustomTargetType to create.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1721

def create_custom_target_type request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_custom_target_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_custom_target_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_custom_target_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.create_custom_target_type request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_delivery_pipeline(request, options = nil) ⇒ ::Gapic::Operation #create_delivery_pipeline(parent: nil, delivery_pipeline_id: nil, delivery_pipeline: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new DeliveryPipeline in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest.new

# Call the create_delivery_pipeline method.
result = client.create_delivery_pipeline request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_delivery_pipeline(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_delivery_pipeline via a request object, either of type Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_delivery_pipeline(parent: nil, delivery_pipeline_id: nil, delivery_pipeline: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_delivery_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which the DeliveryPipeline should be created. Format should be projects/{project_id}/locations/{location_name}.

    • delivery_pipeline_id (::String) (defaults to: nil)

      Required. ID of the DeliveryPipeline.

    • delivery_pipeline (::Google::Cloud::Deploy::V1::DeliveryPipeline, ::Hash) (defaults to: nil)

      Required. The DeliveryPipeline to create.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 588

def create_delivery_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_delivery_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_delivery_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_delivery_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.create_delivery_pipeline request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_release(request, options = nil) ⇒ ::Gapic::Operation #create_release(parent: nil, release_id: nil, release: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new Release in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CreateReleaseRequest.new

# Call the create_release method.
result = client.create_release request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_release(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_release via a request object, either of type Google::Cloud::Deploy::V1::CreateReleaseRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CreateReleaseRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_release(parent: nil, release_id: nil, release: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_release via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which the Release should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

    • release_id (::String) (defaults to: nil)

      Required. ID of the Release.

    • release (::Google::Cloud::Deploy::V1::Release, ::Hash) (defaults to: nil)

      Required. The Release to create.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2237

def create_release request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateReleaseRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_release..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_release.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_release.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.create_release request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_rollout(request, options = nil) ⇒ ::Gapic::Operation #create_rollout(parent: nil, rollout_id: nil, rollout: nil, request_id: nil, validate_only: nil, starting_phase_id: nil) ⇒ ::Gapic::Operation

Creates a new Rollout in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CreateRolloutRequest.new

# Call the create_rollout method.
result = client.create_rollout request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_rollout(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_rollout via a request object, either of type Google::Cloud::Deploy::V1::CreateRolloutRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CreateRolloutRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_rollout(parent: nil, rollout_id: nil, rollout: nil, request_id: nil, validate_only: nil, starting_phase_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_rollout via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which the Rollout should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.

    • rollout_id (::String) (defaults to: nil)

      Required. ID of the Rollout.

    • rollout (::Google::Cloud::Deploy::V1::Rollout, ::Hash) (defaults to: nil)

      Required. The Rollout to create.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

    • starting_phase_id (::String) (defaults to: nil)

      Optional. The starting phase ID for the Rollout. If empty the Rollout will start at the first phase.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2854

def create_rollout request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateRolloutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_rollout..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_rollout.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_rollout.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.create_rollout request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_target(request, options = nil) ⇒ ::Gapic::Operation #create_target(parent: nil, target_id: nil, target: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new Target in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::CreateTargetRequest.new

# Call the create_target method.
result = client.create_target request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_target(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_target via a request object, either of type Google::Cloud::Deploy::V1::CreateTargetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::CreateTargetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_target(parent: nil, target_id: nil, target: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_target via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent collection in which the Target should be created. Format should be projects/{project_id}/locations/{location_name}.

    • target_id (::String) (defaults to: nil)

      Required. ID of the Target.

    • target (::Google::Cloud::Deploy::V1::Target, ::Hash) (defaults to: nil)

      Required. The Target to create.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1205

def create_target request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateTargetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_target..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_target.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_target.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.create_target request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_automation(request, options = nil) ⇒ ::Gapic::Operation #delete_automation(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes a single Automation resource.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::DeleteAutomationRequest.new

# Call the delete_automation method.
result = client.delete_automation request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_automation(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_automation via a request object, either of type DeleteAutomationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::DeleteAutomationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_automation(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_automation via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Automation to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, then deleting an already deleted or non-existing Automation will succeed.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and verify whether the resource exists, but do not actually post it.

    • etag (::String) (defaults to: nil)

      Optional. The weak etag of the request. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3697

def delete_automation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteAutomationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_automation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_automation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_automation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.delete_automation request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_custom_target_type(request, options = nil) ⇒ ::Gapic::Operation #delete_custom_target_type(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes a single CustomTargetType.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest.new

# Call the delete_custom_target_type method.
result = client.delete_custom_target_type request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_custom_target_type(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_custom_target_type via a request object, either of type DeleteCustomTargetTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_custom_target_type(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_custom_target_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomTargetType to delete. Format must be projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, then deleting an already deleted or non-existing CustomTargetType will succeed.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated but no actual change is made.

    • etag (::String) (defaults to: nil)

      Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1946

def delete_custom_target_type request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_custom_target_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_custom_target_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_custom_target_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.delete_custom_target_type request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_delivery_pipeline(request, options = nil) ⇒ ::Gapic::Operation #delete_delivery_pipeline(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, force: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes a single DeliveryPipeline.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest.new

# Call the delete_delivery_pipeline method.
result = client.delete_delivery_pipeline request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_delivery_pipeline(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_delivery_pipeline via a request object, either of type DeleteDeliveryPipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_delivery_pipeline(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, force: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_delivery_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DeliveryPipeline to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, then deleting an already deleted or non-existing DeliveryPipeline will succeed.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not actually post it.

    • force (::Boolean) (defaults to: nil)

      Optional. If set to true, all child resources under this pipeline will also be deleted. Otherwise, the request will only work if the pipeline has no child resources.

    • etag (::String) (defaults to: nil)

      Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 817

def delete_delivery_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_delivery_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_delivery_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_delivery_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.delete_delivery_pipeline request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_target(request, options = nil) ⇒ ::Gapic::Operation #delete_target(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes a single Target.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::DeleteTargetRequest.new

# Call the delete_target method.
result = client.delete_target request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_target(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_target via a request object, either of type DeleteTargetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::DeleteTargetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_target(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_target via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Target to delete. Format should be projects/{project_id}/locations/{location_name}/targets/{target_name}.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, then deleting an already deleted or non-existing Target will succeed.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, validate the request and preview the review, but do not actually post it.

    • etag (::String) (defaults to: nil)

      Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1430

def delete_target request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteTargetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_target..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_target.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_target.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.delete_target request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_automation(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Automation #get_automation(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Automation

Gets details of a single Automation.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetAutomationRequest.new

# Call the get_automation method.
result = client.get_automation request

# The returned object is of type Google::Cloud::Deploy::V1::Automation.
p result

Overloads:

  • #get_automation(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Automation

    Pass arguments to get_automation via a request object, either of type GetAutomationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetAutomationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_automation(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Automation

    Pass arguments to get_automation via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Automation. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3778

def get_automation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetAutomationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_automation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_automation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_automation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_automation request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_automation_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::AutomationRun #get_automation_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::AutomationRun

Gets details of a single AutomationRun.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetAutomationRunRequest.new

# Call the get_automation_run method.
result = client.get_automation_run request

# The returned object is of type Google::Cloud::Deploy::V1::AutomationRun.
p result

Overloads:

  • #get_automation_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::AutomationRun

    Pass arguments to get_automation_run via a request object, either of type GetAutomationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetAutomationRunRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_automation_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::AutomationRun

    Pass arguments to get_automation_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the AutomationRun. Format must be projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3959

def get_automation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetAutomationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_automation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_automation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_automation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_automation_run request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_config(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Config #get_config(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Config

Gets the configuration for a location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetConfigRequest.new

# Call the get_config method.
result = client.get_config request

# The returned object is of type Google::Cloud::Deploy::V1::Config.
p result

Overloads:

  • #get_config(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Config

    Pass arguments to get_config via a request object, either of type GetConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_config(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Config

    Pass arguments to get_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of requested configuration.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3362

def get_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_config request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_custom_target_type(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::CustomTargetType #get_custom_target_type(name: nil) ⇒ ::Google::Cloud::Deploy::V1::CustomTargetType

Gets details of a single CustomTargetType.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest.new

# Call the get_custom_target_type method.
result = client.get_custom_target_type request

# The returned object is of type Google::Cloud::Deploy::V1::CustomTargetType.
p result

Overloads:

  • #get_custom_target_type(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::CustomTargetType

    Pass arguments to get_custom_target_type via a request object, either of type GetCustomTargetTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_custom_target_type(name: nil) ⇒ ::Google::Cloud::Deploy::V1::CustomTargetType

    Pass arguments to get_custom_target_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the CustomTargetType. Format must be projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1612

def get_custom_target_type request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_custom_target_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_custom_target_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_custom_target_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_custom_target_type request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_delivery_pipeline(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::DeliveryPipeline #get_delivery_pipeline(name: nil) ⇒ ::Google::Cloud::Deploy::V1::DeliveryPipeline

Gets details of a single DeliveryPipeline.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest.new

# Call the get_delivery_pipeline method.
result = client.get_delivery_pipeline request

# The returned object is of type Google::Cloud::Deploy::V1::DeliveryPipeline.
p result

Overloads:

  • #get_delivery_pipeline(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::DeliveryPipeline

    Pass arguments to get_delivery_pipeline via a request object, either of type GetDeliveryPipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_delivery_pipeline(name: nil) ⇒ ::Google::Cloud::Deploy::V1::DeliveryPipeline

    Pass arguments to get_delivery_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the DeliveryPipeline. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 479

def get_delivery_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_delivery_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_delivery_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_delivery_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_delivery_pipeline request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_job_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::JobRun #get_job_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::JobRun

Gets details of a single JobRun.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetJobRunRequest.new

# Call the get_job_run method.
result = client.get_job_run request

# The returned object is of type Google::Cloud::Deploy::V1::JobRun.
p result

Overloads:

  • #get_job_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::JobRun

    Pass arguments to get_job_run via a request object, either of type GetJobRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetJobRunRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_job_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::JobRun

    Pass arguments to get_job_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the JobRun. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3203

def get_job_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetJobRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_job_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_job_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_job_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_job_run request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_release(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Release #get_release(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Release

Gets details of a single Release.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetReleaseRequest.new

# Call the get_release method.
result = client.get_release request

# The returned object is of type Google::Cloud::Deploy::V1::Release.
p result

Overloads:

  • #get_release(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Release

    Pass arguments to get_release via a request object, either of type GetReleaseRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetReleaseRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_release(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Release

    Pass arguments to get_release via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Release. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2128

def get_release request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetReleaseRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_release..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_release.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_release.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_release request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Rollout #get_rollout(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Rollout

Gets details of a single Rollout.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetRolloutRequest.new

# Call the get_rollout method.
result = client.get_rollout request

# The returned object is of type Google::Cloud::Deploy::V1::Rollout.
p result

Overloads:

  • #get_rollout(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Rollout

    Pass arguments to get_rollout via a request object, either of type GetRolloutRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetRolloutRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_rollout(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Rollout

    Pass arguments to get_rollout via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Rollout. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2742

def get_rollout request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetRolloutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_rollout..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_rollout.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_rollout.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_rollout request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_target(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Target #get_target(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Target

Gets details of a single Target.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetTargetRequest.new

# Call the get_target method.
result = client.get_target request

# The returned object is of type Google::Cloud::Deploy::V1::Target.
p result

Overloads:

  • #get_target(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::Target

    Pass arguments to get_target via a request object, either of type GetTargetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::GetTargetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_target(name: nil) ⇒ ::Google::Cloud::Deploy::V1::Target

    Pass arguments to get_target via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the Target. Format must be projects/{project_id}/locations/{location_name}/targets/{target_name}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1096

def get_target request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetTargetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_target..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_target.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_target.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.get_target request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#ignore_job(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::IgnoreJobResponse #ignore_job(rollout: nil, phase_id: nil, job_id: nil) ⇒ ::Google::Cloud::Deploy::V1::IgnoreJobResponse

Ignores the specified Job in a Rollout.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::IgnoreJobRequest.new

# Call the ignore_job method.
result = client.ignore_job request

# The returned object is of type Google::Cloud::Deploy::V1::IgnoreJobResponse.
p result

Overloads:

  • #ignore_job(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::IgnoreJobResponse

    Pass arguments to ignore_job via a request object, either of type IgnoreJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::IgnoreJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #ignore_job(rollout: nil, phase_id: nil, job_id: nil) ⇒ ::Google::Cloud::Deploy::V1::IgnoreJobResponse

    Pass arguments to ignore_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • rollout (::String) (defaults to: nil)

      Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

    • phase_id (::String) (defaults to: nil)

      Required. The phase ID the Job to ignore belongs to.

    • job_id (::String) (defaults to: nil)

      Required. The job ID for the Job to ignore.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2939

def ignore_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::IgnoreJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.ignore_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.ignore_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.ignore_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.ignore_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_automation_runs(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationRunsResponse #list_automation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationRunsResponse

Lists AutomationRuns in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListAutomationRunsRequest.new

# Call the list_automation_runs method.
result = client.list_automation_runs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::AutomationRun.
  p item
end

Overloads:

  • #list_automation_runs(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationRunsResponse

    Pass arguments to list_automation_runs via a request object, either of type ListAutomationRunsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListAutomationRunsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_automation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationRunsResponse

    Pass arguments to list_automation_runs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent Delivery Pipeline, which owns this collection of automationRuns. Format must be projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of automationRuns to return. The service may return fewer than this value. If unspecified, at most 50 automationRuns will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAutomationRuns call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Filter automationRuns to be returned. All fields can be used in the filter.

    • order_by (::String) (defaults to: nil)

      Field to sort by.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 4060

def list_automation_runs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListAutomationRunsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_automation_runs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_automation_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_automation_runs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_automation_runs request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_automations(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationsResponse #list_automations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationsResponse

Lists Automations in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListAutomationsRequest.new

# Call the list_automations method.
result = client.list_automations request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::Automation.
  p item
end

Overloads:

  • #list_automations(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationsResponse

    Pass arguments to list_automations via a request object, either of type ListAutomationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListAutomationsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_automations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListAutomationsResponse

    Pass arguments to list_automations via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent Delivery Pipeline, which owns this collection of automations. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of automations to return. The service may return fewer than this value. If unspecified, at most 50 automations will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAutomations call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Filter automations to be returned. All fields can be used in the filter.

    • order_by (::String) (defaults to: nil)

      Field to sort by.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3879

def list_automations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListAutomationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_automations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_automations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_automations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_automations request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_custom_target_types(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse #list_custom_target_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse

Lists CustomTargetTypes in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest.new

# Call the list_custom_target_types method.
result = client.list_custom_target_types request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::CustomTargetType.
  p item
end

Overloads:

  • #list_custom_target_types(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse

    Pass arguments to list_custom_target_types via a request object, either of type ListCustomTargetTypesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_custom_target_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse

    Pass arguments to list_custom_target_types via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent that owns this collection of custom target types. Format must be projects/{project_id}/locations/{location_name}.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of CustomTargetType objects to return. The service may return fewer than this value. If unspecified, at most 50 CustomTargetType objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListCustomTargetTypes call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter custom target types to be returned. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1532

def list_custom_target_types request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_custom_target_types..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_custom_target_types.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_custom_target_types.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_custom_target_types request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_delivery_pipelines(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListDeliveryPipelinesResponse #list_delivery_pipelines(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListDeliveryPipelinesResponse

Lists DeliveryPipelines in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest.new

# Call the list_delivery_pipelines method.
result = client.list_delivery_pipelines request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::DeliveryPipeline.
  p item
end

Overloads:

  • #list_delivery_pipelines(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListDeliveryPipelinesResponse

    Pass arguments to list_delivery_pipelines via a request object, either of type ListDeliveryPipelinesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_delivery_pipelines(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListDeliveryPipelinesResponse

    Pass arguments to list_delivery_pipelines via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which owns this collection of pipelines. Format must be projects/{project_id}/locations/{location_name}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDeliveryPipelines call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Filter pipelines to be returned. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 399

def list_delivery_pipelines request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_delivery_pipelines..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_delivery_pipelines.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_delivery_pipelines.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_delivery_pipelines request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_job_runs(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListJobRunsResponse #list_job_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListJobRunsResponse

Lists JobRuns in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListJobRunsRequest.new

# Call the list_job_runs method.
result = client.list_job_runs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::JobRun.
  p item
end

Overloads:

  • #list_job_runs(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListJobRunsResponse

    Pass arguments to list_job_runs via a request object, either of type ListJobRunsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListJobRunsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_job_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListJobRunsResponse

    Pass arguments to list_job_runs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The Rollout which owns this collection of JobRun objects.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of JobRun objects to return. The service may return fewer than this value. If unspecified, at most 50 JobRun objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListJobRuns call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter results to be returned. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3123

def list_job_runs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListJobRunsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_job_runs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_job_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_job_runs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_job_runs request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_releases(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListReleasesResponse #list_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListReleasesResponse

Lists Releases in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListReleasesRequest.new

# Call the list_releases method.
result = client.list_releases request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::Release.
  p item
end

Overloads:

  • #list_releases(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListReleasesResponse

    Pass arguments to list_releases via a request object, either of type ListReleasesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListReleasesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListReleasesResponse

    Pass arguments to list_releases via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The DeliveryPipeline which owns this collection of Release objects.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of Release objects to return. The service may return fewer than this value. If unspecified, at most 50 Release objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListReleases call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter releases to be returned. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2048

def list_releases request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListReleasesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_releases..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_releases.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_releases.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_releases request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_rollouts(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListRolloutsResponse #list_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListRolloutsResponse

Lists Rollouts in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListRolloutsRequest.new

# Call the list_rollouts method.
result = client.list_rollouts request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::Rollout.
  p item
end

Overloads:

  • #list_rollouts(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListRolloutsResponse

    Pass arguments to list_rollouts via a request object, either of type ListRolloutsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListRolloutsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListRolloutsResponse

    Pass arguments to list_rollouts via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The Release which owns this collection of Rollout objects.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of Rollout objects to return. The service may return fewer than this value. If unspecified, at most 50 Rollout objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListRollouts call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 2662

def list_rollouts request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListRolloutsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_rollouts..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_rollouts.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_rollouts.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_rollouts request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_targets(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListTargetsResponse #list_targets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListTargetsResponse

Lists Targets in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::ListTargetsRequest.new

# Call the list_targets method.
result = client.list_targets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Deploy::V1::Target.
  p item
end

Overloads:

  • #list_targets(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::ListTargetsResponse

    Pass arguments to list_targets via a request object, either of type ListTargetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::ListTargetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_targets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Deploy::V1::ListTargetsResponse

    Pass arguments to list_targets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which owns this collection of targets. Format must be projects/{project_id}/locations/{location_name}.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of Target objects to return. The service may return fewer than this value. If unspecified, at most 50 Target objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListTargets call. Provide this to retrieve the subsequent page.

      When paginating, all other provided parameters match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter targets to be returned. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 919

def list_targets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListTargetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_targets..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_targets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_targets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.list_targets request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#retry_job(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::RetryJobResponse #retry_job(rollout: nil, phase_id: nil, job_id: nil) ⇒ ::Google::Cloud::Deploy::V1::RetryJobResponse

Retries the specified Job in a Rollout.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::RetryJobRequest.new

# Call the retry_job method.
result = client.retry_job request

# The returned object is of type Google::Cloud::Deploy::V1::RetryJobResponse.
p result

Overloads:

  • #retry_job(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::RetryJobResponse

    Pass arguments to retry_job via a request object, either of type RetryJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::RetryJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #retry_job(rollout: nil, phase_id: nil, job_id: nil) ⇒ ::Google::Cloud::Deploy::V1::RetryJobResponse

    Pass arguments to retry_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • rollout (::String) (defaults to: nil)

      Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

    • phase_id (::String) (defaults to: nil)

      Required. The phase ID the Job to retry belongs to.

    • job_id (::String) (defaults to: nil)

      Required. The job ID for the Job to retry.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3023

def retry_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::RetryJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.retry_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.retry_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.retry_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.retry_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#rollback_target(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::RollbackTargetResponse #rollback_target(name: nil, target_id: nil, rollout_id: nil, release_id: nil, rollout_to_roll_back: nil, rollback_config: nil, validate_only: nil) ⇒ ::Google::Cloud::Deploy::V1::RollbackTargetResponse

Creates a Rollout to roll back the specified target.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::RollbackTargetRequest.new

# Call the rollback_target method.
result = client.rollback_target request

# The returned object is of type Google::Cloud::Deploy::V1::RollbackTargetResponse.
p result

Overloads:

  • #rollback_target(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::RollbackTargetResponse

    Pass arguments to rollback_target via a request object, either of type RollbackTargetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::RollbackTargetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #rollback_target(name: nil, target_id: nil, rollout_id: nil, release_id: nil, rollout_to_roll_back: nil, rollback_config: nil, validate_only: nil) ⇒ ::Google::Cloud::Deploy::V1::RollbackTargetResponse

    Pass arguments to rollback_target via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The DeliveryPipeline for which the rollback Rollout should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

    • target_id (::String) (defaults to: nil)

      Required. ID of the Target that is being rolled back.

    • rollout_id (::String) (defaults to: nil)

      Required. ID of the rollback Rollout to create.

    • release_id (::String) (defaults to: nil)

      Optional. ID of the Release to roll back to. If this isn't specified, the previous successful Rollout to the specified target will be used to determine the Release.

    • rollout_to_roll_back (::String) (defaults to: nil)

      Optional. If provided, this must be the latest Rollout that is on the Target.

    • rollback_config (::Google::Cloud::Deploy::V1::RollbackTargetConfig, ::Hash) (defaults to: nil)

      Optional. Configs for the rollback Rollout.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with a RollbackTargetResponse.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1016

def rollback_target request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::RollbackTargetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.rollback_target..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.rollback_target.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.rollback_target.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.rollback_target request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#terminate_job_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::TerminateJobRunResponse #terminate_job_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::TerminateJobRunResponse

Terminates a Job Run in a given project and location.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::TerminateJobRunRequest.new

# Call the terminate_job_run method.
result = client.terminate_job_run request

# The returned object is of type Google::Cloud::Deploy::V1::TerminateJobRunResponse.
p result

Overloads:

  • #terminate_job_run(request, options = nil) ⇒ ::Google::Cloud::Deploy::V1::TerminateJobRunResponse

    Pass arguments to terminate_job_run via a request object, either of type TerminateJobRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::TerminateJobRunRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #terminate_job_run(name: nil) ⇒ ::Google::Cloud::Deploy::V1::TerminateJobRunResponse

    Pass arguments to terminate_job_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the JobRun. Format must be projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3283

def terminate_job_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::TerminateJobRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.terminate_job_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.terminate_job_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.terminate_job_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.terminate_job_run request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


238
239
240
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 238

def universe_domain
  @cloud_deploy_stub.universe_domain
end

#update_automation(request, options = nil) ⇒ ::Gapic::Operation #update_automation(update_mask: nil, automation: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Automation resource.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::UpdateAutomationRequest.new

# Call the update_automation method.
result = client.update_automation request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_automation(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_automation via a request object, either of type UpdateAutomationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::UpdateAutomationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_automation(update_mask: nil, automation: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_automation via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Automation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it's in the mask. If the user doesn't provide a mask then all fields are overwritten.

    • automation (::Google::Cloud::Deploy::V1::Automation, ::Hash) (defaults to: nil)

      Required. The Automation to update.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, updating a Automation that does not exist will result in the creation of a new Automation.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 3584

def update_automation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateAutomationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_automation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_automation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_automation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.update_automation request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_custom_target_type(request, options = nil) ⇒ ::Gapic::Operation #update_custom_target_type(update_mask: nil, custom_target_type: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates a single CustomTargetType.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest.new

# Call the update_custom_target_type method.
result = client.update_custom_target_type request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_custom_target_type(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_custom_target_type via a request object, either of type UpdateCustomTargetTypeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_custom_target_type(update_mask: nil, custom_target_type: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_custom_target_type via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the CustomTargetType resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it's in the mask. If the user doesn't provide a mask then all fields are overwritten.

    • custom_target_type (::Google::Cloud::Deploy::V1::CustomTargetType, ::Hash) (defaults to: nil)

      Required. The CustomTargetType to update.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, updating a CustomTargetType that does not exist will result in the creation of a new CustomTargetType.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1834

def update_custom_target_type request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_custom_target_type..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_custom_target_type.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_custom_target_type.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.update_custom_target_type request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_delivery_pipeline(request, options = nil) ⇒ ::Gapic::Operation #update_delivery_pipeline(update_mask: nil, delivery_pipeline: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single DeliveryPipeline.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest.new

# Call the update_delivery_pipeline method.
result = client.update_delivery_pipeline request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_delivery_pipeline(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_delivery_pipeline via a request object, either of type UpdateDeliveryPipelineRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_delivery_pipeline(update_mask: nil, delivery_pipeline: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_delivery_pipeline via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the DeliveryPipeline resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it's in the mask. If the user doesn't provide a mask then all fields are overwritten.

    • delivery_pipeline (::Google::Cloud::Deploy::V1::DeliveryPipeline, ::Hash) (defaults to: nil)

      Required. The DeliveryPipeline to update.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, updating a DeliveryPipeline that does not exist will result in the creation of a new DeliveryPipeline.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 701

def update_delivery_pipeline request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_delivery_pipeline..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_delivery_pipeline.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_delivery_pipeline.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.update_delivery_pipeline request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_target(request, options = nil) ⇒ ::Gapic::Operation #update_target(update_mask: nil, target: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Target.

Examples:

Basic example

require "google/cloud/deploy/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::UpdateTargetRequest.new

# Call the update_target method.
result = client.update_target request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_target(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_target via a request object, either of type UpdateTargetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Deploy::V1::UpdateTargetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_target(update_mask: nil, target: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_target via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Target resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it's in the mask. If the user doesn't provide a mask then all fields are overwritten.

    • target (::Google::Cloud::Deploy::V1::Target, ::Hash) (defaults to: nil)

      Required. The Target to update.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. If set to true, updating a Target that does not exist will result in the creation of a new Target.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set to true, the request is validated and the user is provided with an expected result, but no actual change is made.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
# File 'lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb', line 1318

def update_target request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateTargetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_target..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_target.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_target.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @cloud_deploy_stub.update_target request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end