Class: Google::Cloud::GkeMultiCloud::V1::AwsClusters::Client

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

Overview

Client for the AwsClusters service.

The AwsClusters API provides a single centrally managed service to create and manage Anthos clusters that run on AWS infrastructure.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#aws_cluster_path, #aws_node_pool_path, #aws_server_config_path, #location_path

Constructor Details

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

Create a new AwsClusters client object.

Examples:


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

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

Yields:

  • (config)

    Configure the AwsClusters client.

Yield Parameters:



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
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
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 186

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/gkemulticloud/v1/aws_service_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.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @aws_clusters_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @aws_clusters_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end
end

Instance Attribute Details

#operations_client::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Operations (readonly)

Get the associated client for long-running operations.



249
250
251
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 249

def operations_client
  @operations_client
end

Class Method Details

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

Deprecated.

This service is deprecated and may be removed in the next major version update.

Configure the AwsClusters Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 65

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "GkeMultiCloud", "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.create_aws_cluster.timeout = 60.0

    default_config.rpcs.update_aws_cluster.timeout = 60.0

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

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

    default_config.rpcs.delete_aws_cluster.timeout = 60.0

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

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

    default_config.rpcs.create_aws_node_pool.timeout = 60.0

    default_config.rpcs.update_aws_node_pool.timeout = 60.0

    default_config.rpcs.rollback_aws_node_pool_update.timeout = 60.0

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

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

    default_config.rpcs.delete_aws_node_pool.timeout = 60.0

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

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

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

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

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

Configure the AwsClusters 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:



156
157
158
159
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 156

def configure
  yield @config if block_given?
  @config
end

#create_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation #create_aws_cluster(parent: nil, aws_cluster: nil, aws_cluster_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Deprecated.

This method is deprecated and may be removed in the next major version update.

Creates a new AwsCluster resource on a given Google Cloud Platform project and region.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the create_aws_cluster method.
result = client.create_aws_cluster 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_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest, ::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_aws_cluster(parent: nil, aws_cluster: nil, aws_cluster_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_aws_cluster 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 location where this AwsCluster resource will be created.

      Location names are formatted as projects/<project-id>/locations/<region>.

      See Resource Names for more details on Google Cloud resource names.

    • aws_cluster (::Google::Cloud::GkeMultiCloud::V1::AwsCluster, ::Hash) (defaults to: nil)

      Required. The specification of the AwsCluster to create.

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

      Required. A client provided ID the resource. Must be unique within the parent resource.

      The provided ID will be part of the AwsCluster resource name formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

      Valid characters are /[a-z][0-9]-/. Cannot be longer than 63 characters.

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

      If set, only validate the request, but do not actually create the cluster.

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.



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
380
381
382
383
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 342

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAwsClusterRequest

  # 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_aws_cluster..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_aws_cluster.retry_policy

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

  @aws_clusters_stub.call_rpc :create_aws_cluster, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation #create_aws_node_pool(parent: nil, aws_node_pool: nil, aws_node_pool_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Deprecated.

This method is deprecated and may be removed in the next major version update.

Creates a new AwsNodePool, attached to a given AwsCluster.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the create_aws_node_pool method.
result = client.create_aws_node_pool 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_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest, ::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_aws_node_pool(parent: nil, aws_node_pool: nil, aws_node_pool_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_aws_node_pool 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 AwsCluster resource where this node pool will be created.

      AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

      See Resource Names for more details on Google Cloud resource names.

    • aws_node_pool (::Google::Cloud::GkeMultiCloud::V1::AwsNodePool, ::Hash) (defaults to: nil)

      Required. The specification of the AwsNodePool to create.

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

      Required. A client provided ID the resource. Must be unique within the parent resource.

      The provided ID will be part of the AwsNodePool resource name formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

      Valid characters are /[a-z][0-9]-/. Cannot be longer than 63 characters.

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

      If set, only validate the request, but do not actually create the node pool.

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.



1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1139

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAwsNodePoolRequest

  # 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_aws_node_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_aws_node_pool.retry_policy

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

  @aws_clusters_stub.call_rpc :create_aws_node_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Deprecated.

This method is deprecated and may be removed in the next major version update.

Deletes a specific AwsCluster resource.

Fails if the cluster has one or more associated AwsNodePool resources.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the delete_aws_cluster method.
result = client.delete_aws_cluster 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_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest, ::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_aws_cluster(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_aws_cluster 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 resource name the AwsCluster to delete.

      AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

      See Resource Names for more details on Google Cloud Platform resource names.

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

      If set, only validate the request, but do not actually delete the resource.

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

      If set to true, and the AwsCluster resource is not found, the request will succeed but no action will be taken on the server and a completed Operation will be returned.

      Useful for idempotent deletion.

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

      Optional. If set to true, the deletion of AwsCluster resource will succeed even if errors occur during deleting in cluster resources. Using this parameter may result in orphaned resources in the cluster.

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

      The current etag of the AwsCluster.

      Allows clients to perform deletions through optimistic concurrency control.

      If the provided etag does not match the current etag of the cluster, the request will fail and an ABORTED error will be returned.

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.



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

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAwsClusterRequest

  # 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_aws_cluster..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_aws_cluster.retry_policy

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

  @aws_clusters_stub.call_rpc :delete_aws_cluster, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Deprecated.

This method is deprecated and may be removed in the next major version update.

Deletes a specific AwsNodePool resource.

If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the delete_aws_node_pool method.
result = client.delete_aws_node_pool 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_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest, ::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_aws_node_pool(name: nil, validate_only: nil, allow_missing: nil, ignore_errors: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_aws_node_pool 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 resource name the AwsNodePool to delete.

      AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

      See Resource Names for more details on Google Cloud resource names.

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

      If set, only validate the request, but do not actually delete the node pool.

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

      If set to true, and the AwsNodePool resource is not found, the request will succeed but no action will be taken on the server and a completed Operation will be returned.

      Useful for idempotent deletion.

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

      Optional. If set to true, the deletion of AwsNodePool resource will succeed even if errors occur during deleting in node pool resources. Using this parameter may result in orphaned resources in the node pool.

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

      The current ETag of the AwsNodePool.

      Allows clients to perform deletions through optimistic concurrency control.

      If the provided ETag does not match the current etag of the node pool, the request will fail and an ABORTED error will be returned.

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.



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
1766
1767
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1726

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAwsNodePoolRequest

  # 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_aws_node_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_aws_node_pool.retry_policy

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

  @aws_clusters_stub.call_rpc :delete_aws_node_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#generate_aws_access_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse #generate_aws_access_token(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse

Deprecated.

This method is deprecated and may be removed in the next major version update.

Generates a short-lived access token to authenticate to a given AwsCluster resource.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse.
p result

Overloads:

  • #generate_aws_access_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest, ::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.

  • #generate_aws_access_token(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenResponse

    Pass arguments to generate_aws_access_token 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:

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

      Required. The name of the AwsCluster resource to authenticate to.

      AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

      See Resource Names for more details on Google Cloud resource names.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1017

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsAccessTokenRequest

  # 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.generate_aws_access_token..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.aws_cluster
    header_params["aws_cluster"] = request.aws_cluster
  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.generate_aws_access_token.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_aws_access_token.retry_policy

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

  @aws_clusters_stub.call_rpc :generate_aws_access_token, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#generate_aws_cluster_agent_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse #generate_aws_cluster_agent_token(aws_cluster: nil, subject_token: nil, subject_token_type: nil, version: nil, node_pool_id: nil, grant_type: nil, audience: nil, scope: nil, requested_token_type: nil, options: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse

Deprecated.

This method is deprecated and may be removed in the next major version update.

Generates an access token for a cluster agent.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse.
p result

Overloads:

  • #generate_aws_cluster_agent_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest, ::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.

  • #generate_aws_cluster_agent_token(aws_cluster: nil, subject_token: nil, subject_token_type: nil, version: nil, node_pool_id: nil, grant_type: nil, audience: nil, scope: nil, requested_token_type: nil, options: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenResponse

    Pass arguments to generate_aws_cluster_agent_token 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:

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

      Required.

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

      Required.

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

      Required.

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

      Required.

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

      Optional.

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

      Optional.

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

      Optional.

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

      Optional.

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

      Optional.

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

      Optional.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 921

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAwsClusterAgentTokenRequest

  # 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.generate_aws_cluster_agent_token..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.aws_cluster
    header_params["aws_cluster"] = request.aws_cluster
  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.generate_aws_cluster_agent_token.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_aws_cluster_agent_token.retry_policy

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

  @aws_clusters_stub.call_rpc :generate_aws_cluster_agent_token, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_aws_cluster(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster #get_aws_cluster(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster

Deprecated.

This method is deprecated and may be removed in the next major version update.

Describes a specific AwsCluster resource.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsCluster.
p result

Overloads:

  • #get_aws_cluster(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest, ::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_aws_cluster(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsCluster

    Pass arguments to get_aws_cluster 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 AwsCluster resource to describe.

      AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

      See Resource Names for more details on Google Cloud Platform resource names.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 571

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsClusterRequest

  # 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_aws_cluster..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_aws_cluster.retry_policy

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

  @aws_clusters_stub.call_rpc :get_aws_cluster, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_aws_json_web_keys(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys #get_aws_json_web_keys(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys

Deprecated.

This method is deprecated and may be removed in the next major version update.

Gets the public component of the cluster signing keys in JSON Web Key format.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys.
p result

Overloads:

  • #get_aws_json_web_keys(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest, ::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_aws_json_web_keys(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsJsonWebKeys

    Pass arguments to get_aws_json_web_keys 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:

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

      Required. The AwsCluster, which owns the JsonWebKeys. Format: projects/{project}/locations/{location}/awsClusters/{cluster}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1944
1945
1946
1947
1948
1949
1950
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1911

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsJsonWebKeysRequest

  # 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_aws_json_web_keys..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.aws_cluster
    header_params["aws_cluster"] = request.aws_cluster
  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_aws_json_web_keys.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_aws_json_web_keys.retry_policy

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

  @aws_clusters_stub.call_rpc :get_aws_json_web_keys, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_aws_node_pool(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool #get_aws_node_pool(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool

Deprecated.

This method is deprecated and may be removed in the next major version update.

Describes a specific AwsNodePool resource.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsNodePool.
p result

Overloads:

  • #get_aws_node_pool(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest, ::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_aws_node_pool(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsNodePool

    Pass arguments to get_aws_node_pool 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 AwsNodePool resource to describe.

      AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

      See Resource Names for more details on Google Cloud resource names.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1483

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsNodePoolRequest

  # 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_aws_node_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_aws_node_pool.retry_policy

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

  @aws_clusters_stub.call_rpc :get_aws_node_pool, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_aws_open_id_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig #get_aws_open_id_config(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig

Deprecated.

This method is deprecated and may be removed in the next major version update.

Gets the OIDC discovery document for the cluster. See the OpenID Connect Discovery 1.0 specification for details.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig.
p result

Overloads:

  • #get_aws_open_id_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest, ::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_aws_open_id_config(aws_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsOpenIdConfig

    Pass arguments to get_aws_open_id_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:

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

      Required. The AwsCluster, which owns the OIDC discovery document. Format: projects/{project}/locations/{location}/awsClusters/{cluster}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1855
1856
1857
1858
1859
1860
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1821

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsOpenIdConfigRequest

  # 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_aws_open_id_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.aws_cluster
    header_params["aws_cluster"] = request.aws_cluster
  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_aws_open_id_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_aws_open_id_config.retry_policy

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

  @aws_clusters_stub.call_rpc :get_aws_open_id_config, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_aws_server_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig #get_aws_server_config(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig

Deprecated.

This method is deprecated and may be removed in the next major version update.

Returns information, such as supported AWS regions and Kubernetes versions, on a given Google Cloud location.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

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

# The returned object is of type Google::Cloud::GkeMultiCloud::V1::AwsServerConfig.
p result

Overloads:

  • #get_aws_server_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest, ::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_aws_server_config(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AwsServerConfig

    Pass arguments to get_aws_server_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. The name of the AwsServerConfig resource to describe.

      AwsServerConfig names are formatted as projects/<project-id>/locations/<region>/awsServerConfig.

      See Resource Names for more details on Google Cloud resource names.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 2007

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAwsServerConfigRequest

  # 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_aws_server_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_server_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_aws_server_config.retry_policy

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

  @aws_clusters_stub.call_rpc :get_aws_server_config, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_aws_clusters(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster> #list_aws_clusters(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>

Deprecated.

This method is deprecated and may be removed in the next major version update.

Lists all AwsCluster resources on a given Google Cloud project and region.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the list_aws_clusters method.
result = client.list_aws_clusters 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::GkeMultiCloud::V1::AwsCluster.
  p item
end

Overloads:

  • #list_aws_clusters(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest, ::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_aws_clusters(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsCluster>

    Pass arguments to list_aws_clusters 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 location which owns this collection of AwsCluster resources.

      Location names are formatted as projects/<project-id>/locations/<region>.

      See Resource Names for more details on Google Cloud Platform resource names.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return.

      If not specified, a default value of 50 will be used by the service. Regardless of the pageSize value, the response can include a partial list and a caller should only rely on response's nextPageToken to determine if there are more instances left to be queried.

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

      The nextPageToken value returned from a previous awsClusters.list request, if any.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 681

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAwsClustersRequest

  # 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_aws_clusters..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_clusters.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_aws_clusters.retry_policy

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

  @aws_clusters_stub.call_rpc :list_aws_clusters, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @aws_clusters_stub, :list_aws_clusters, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_aws_node_pools(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool> #list_aws_node_pools(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>

Deprecated.

This method is deprecated and may be removed in the next major version update.

Lists all AwsNodePool resources on a given AwsCluster.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the list_aws_node_pools method.
result = client.list_aws_node_pools 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::GkeMultiCloud::V1::AwsNodePool.
  p item
end

Overloads:

  • #list_aws_node_pools(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest, ::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_aws_node_pools(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AwsNodePool>

    Pass arguments to list_aws_node_pools 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 AwsCluster which owns this collection of AwsNodePool resources.

      AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

      See Resource Names for more details on Google Cloud resource names.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return.

      If not specified, a default value of 50 will be used by the service. Regardless of the pageSize value, the response can include a partial list and a caller should only rely on response's nextPageToken to determine if there are more instances left to be queried.

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

      The nextPageToken value returned from a previous awsNodePools.list request, if any.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1595

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAwsNodePoolsRequest

  # 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_aws_node_pools..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_aws_node_pools.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_aws_node_pools.retry_policy

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

  @aws_clusters_stub.call_rpc :list_aws_node_pools, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @aws_clusters_stub, :list_aws_node_pools, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


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

def logger
  @aws_clusters_stub.logger
end

#rollback_aws_node_pool_update(request, options = nil) ⇒ ::Gapic::Operation #rollback_aws_node_pool_update(name: nil, respect_pdb: nil) ⇒ ::Gapic::Operation

Deprecated.

This method is deprecated and may be removed in the next major version update.

Rolls back a previously aborted or failed AwsNodePool update request. Makes no changes if the last update request successfully finished. If an update request is in progress, you cannot rollback the update. You must first cancel or let it finish unsuccessfully before you can rollback.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the rollback_aws_node_pool_update method.
result = client.rollback_aws_node_pool_update 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:

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

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest, ::Hash)

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

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

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

  • #rollback_aws_node_pool_update(name: nil, respect_pdb: nil) ⇒ ::Gapic::Operation

    Pass arguments to rollback_aws_node_pool_update 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 AwsNodePool resource to rollback.

      AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

      See Resource Names for more details on Google Cloud resource names.

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

      Optional. Option for rollback to ignore the PodDisruptionBudget when draining the node pool nodes. Default value is false.

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.



1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1385

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::RollbackAwsNodePoolUpdateRequest

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

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

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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.rollback_aws_node_pool_update.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.rollback_aws_node_pool_update.retry_policy

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

  @aws_clusters_stub.call_rpc :rollback_aws_node_pool_update, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


166
167
168
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 166

def universe_domain
  @aws_clusters_stub.universe_domain
end

#update_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation #update_aws_cluster(aws_cluster: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

Deprecated.

This method is deprecated and may be removed in the next major version update.

Updates an AwsCluster.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the update_aws_cluster method.
result = client.update_aws_cluster 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_aws_cluster(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest, ::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_aws_cluster(aws_cluster: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_aws_cluster 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:

    • aws_cluster (::Google::Cloud::GkeMultiCloud::V1::AwsCluster, ::Hash) (defaults to: nil)

      Required. The AwsCluster resource to update.

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

      If set, only validate the request, but do not actually update the cluster.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field can only include these fields from AwsCluster:

      • description.
      • annotations.
      • control_plane.version.
      • authorization.admin_users.
      • authorization.admin_groups.
      • binary_authorization.evaluation_mode.
      • control_plane.aws_services_authentication.role_arn.
      • control_plane.aws_services_authentication.role_session_name.
      • control_plane.config_encryption.kms_key_arn.
      • control_plane.instance_type.
      • control_plane.security_group_ids.
      • control_plane.proxy_config.
      • control_plane.proxy_config.secret_arn.
      • control_plane.proxy_config.secret_version.
      • control_plane.root_volume.size_gib.
      • control_plane.root_volume.volume_type.
      • control_plane.root_volume.iops.
      • control_plane.root_volume.throughput.
      • control_plane.root_volume.kms_key_arn.
      • control_plane.ssh_config.
      • control_plane.ssh_config.ec2_key_pair.
      • control_plane.instance_placement.tenancy.
      • control_plane.iam_instance_profile.
      • logging_config.component_config.enable_components.
      • control_plane.tags.
      • monitoring_config.managed_prometheus_config.enabled.
      • networking.per_node_pool_sg_rules_disabled.

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.



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

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAwsClusterRequest

  # 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_aws_cluster..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.aws_cluster&.name
    header_params["aws_cluster.name"] = request.aws_cluster.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_aws_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_aws_cluster.retry_policy

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

  @aws_clusters_stub.call_rpc :update_aws_cluster, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation #update_aws_node_pool(aws_node_pool: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

Deprecated.

This method is deprecated and may be removed in the next major version update.

Updates an AwsNodePool.

Examples:

Basic example

require "google/cloud/gke_multi_cloud/v1"

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

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

# Call the update_aws_node_pool method.
result = client.update_aws_node_pool 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_aws_node_pool(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest, ::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_aws_node_pool(aws_node_pool: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_aws_node_pool 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:

    • aws_node_pool (::Google::Cloud::GkeMultiCloud::V1::AwsNodePool, ::Hash) (defaults to: nil)

      Required. The AwsNodePool resource to update.

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

      If set, only validate the request, but don't actually update the node pool.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field can only include these fields from AwsNodePool:

      • annotations.
      • version.
      • autoscaling.min_node_count.
      • autoscaling.max_node_count.
      • config.config_encryption.kms_key_arn.
      • config.security_group_ids.
      • config.root_volume.iops.
      • config.root_volume.throughput.
      • config.root_volume.kms_key_arn.
      • config.root_volume.volume_type.
      • config.root_volume.size_gib.
      • config.proxy_config.
      • config.proxy_config.secret_arn.
      • config.proxy_config.secret_version.
      • config.ssh_config.
      • config.ssh_config.ec2_key_pair.
      • config.instance_placement.tenancy.
      • config.iam_instance_profile.
      • config.labels.
      • config.tags.
      • config.autoscaling_metrics_collection.
      • config.autoscaling_metrics_collection.granularity.
      • config.autoscaling_metrics_collection.metrics.
      • config.instance_type.
      • management.auto_repair.
      • management.
      • update_settings.
      • update_settings.surge_settings.
      • update_settings.surge_settings.max_surge.
      • update_settings.surge_settings.max_unavailable.

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.



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
# File 'lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb', line 1273

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAwsNodePoolRequest

  # 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_aws_node_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.aws_node_pool&.name
    header_params["aws_node_pool.name"] = request.aws_node_pool.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_aws_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_aws_node_pool.retry_policy

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

  @aws_clusters_stub.call_rpc :update_aws_node_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end