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

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

Overview

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

#build_path, #cluster_path, #config_path, #delivery_pipeline_path, #job_run_path, #location_path, #membership_path, #release_path, #rollout_path, #service_path, #target_path, #worker_pool_path

Constructor Details

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

Create a new CloudDeploy client object.

Examples:


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

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

Yields:

  • (config)

    Configure the CloudDeploy client.

Yield Parameters:



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 197

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/deploy/v1/cloud_deploy_services_pb"

  # 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 == 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 = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
  end

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

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

  @cloud_deploy_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::Deploy::V1::CloudDeploy::Stub,
    credentials:  credentials,
    endpoint:     @config.endpoint,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors
  )
end

Instance Attribute Details

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

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

Returns:

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


270
271
272
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 270

def iam_policy_client
  @iam_policy_client
end

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

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

Returns:

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


263
264
265
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 263

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



256
257
258
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 256

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::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



59
60
61
62
63
64
65
66
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
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 59

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_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
  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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1757
1758
1759
1760
1761
1762
1763
1764
1765
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1726

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :abandon_release, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1904

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :advance_rollout, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1815

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :approve_rollout, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1991

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :cancel_rollout, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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:



176
177
178
179
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 176

def configure
  yield @config if block_given?
  @config
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::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 will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 540

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_delivery_pipeline, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1638

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_release, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
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
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2302

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_rollout, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1091
1092
1093
1094
1095
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
1131
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1091

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_target, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 will know to ignore the request if it has already been completed. The server will guarantee 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 781

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_delivery_pipeline, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 will know to ignore the request if it has already been completed. The server will guarantee 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



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
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1328

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_target, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2850
2851
2852
2853
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/client.rb', line 2850

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_config, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 426

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_delivery_pipeline, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2678

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_job_run, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1523
1524
1525
1526
1527
1528
1529
1530
1531
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
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1523

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_release, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2184

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_rollout, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 976

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_target, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2394
2395
2396
2397
2398
2399
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
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2394

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.rollout
    header_params["rollout"] = request.rollout
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :ignore_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_delivery_pipelines(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeliveryPipeline> #list_delivery_pipelines(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeliveryPipeline>

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeliveryPipeline>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::DeliveryPipeline>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 339

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_delivery_pipelines, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_delivery_pipelines, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_job_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::JobRun> #list_job_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::JobRun>

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::JobRun>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::JobRun>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2591

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_job_runs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_job_runs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_releases(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Release> #list_releases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Release>

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Release>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Release>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1436

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_releases, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_releases, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_rollouts(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Rollout> #list_rollouts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Rollout>

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Rollout>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Rollout>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2097

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_rollouts, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_rollouts, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_targets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Target> #list_targets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Target>

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Target>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Deploy::V1::Target>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 889

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_targets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @cloud_deploy_stub, :list_targets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
2517
2518
2519
2520
2521
2522
2523
2524
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2485

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.rollout
    header_params["rollout"] = request.rollout
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :retry_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 2765

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :terminate_job_run, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 is in the mask. If the user does not provide a mask then all fields will be 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 will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 659

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.delivery_pipeline&.name
    header_params["delivery_pipeline.name"] = request.delivery_pipeline.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_delivery_pipeline, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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 is in the mask. If the user does not provide a mask then all fields will be 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 will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



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
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
# File 'lib/google/cloud/deploy/v1/cloud_deploy/client.rb', line 1210

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 and x-goog-user-project 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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.target&.name
    header_params["target.name"] = request.target.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_target, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end