Class: Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client

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

Overview

Client for the AzureClusters service.

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

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#azure_client_path, #azure_cluster_path, #azure_node_pool_path, #azure_server_config_path, #location_path

Constructor Details

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

Create a new AzureClusters client object.

Examples:


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

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

Yields:

  • (config)

    Configure the AzureClusters client.

Yield Parameters:



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

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/azure_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

  @azure_clusters_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::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
  )
end

Instance Attribute Details

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

Get the associated client for long-running operations.



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

def operations_client
  @operations_client
end

Class Method Details

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

Configure the AzureClusters Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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

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_azure_client.timeout = 60.0

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

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

    default_config.rpcs.delete_azure_client.timeout = 60.0

    default_config.rpcs.create_azure_cluster.timeout = 60.0

    default_config.rpcs.update_azure_cluster.timeout = 60.0

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

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

    default_config.rpcs.delete_azure_cluster.timeout = 60.0

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

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

    default_config.rpcs.create_azure_node_pool.timeout = 60.0

    default_config.rpcs.update_azure_node_pool.timeout = 60.0

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

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

    default_config.rpcs.delete_azure_node_pool.timeout = 60.0

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

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

    default_config.rpcs.get_azure_server_config.timeout = 60.0
    default_config.rpcs.get_azure_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 AzureClusters 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:



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

def configure
  yield @config if block_given?
  @config
end

#create_azure_client(request, options = nil) ⇒ ::Gapic::Operation #create_azure_client(parent: nil, azure_client: nil, azure_client_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

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

AzureClient resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.

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::AzureClusters::Client.new

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

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

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::CreateAzureClientRequest, ::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_azure_client(parent: nil, azure_client: nil, azure_client_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_azure_client 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 AzureClient 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.

    • azure_client (::Google::Cloud::GkeMultiCloud::V1::AzureClient, ::Hash) (defaults to: nil)

      Required. The specification of the AzureClient to create.

    • azure_client_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 AzureClient resource name formatted as projects/<project-id>/locations/<region>/azureClients/<client-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 client.

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.



334
335
336
337
338
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
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 334

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

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

  # 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_azure_client..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_azure_client.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_azure_client.retry_policy

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

  @azure_clusters_stub.call_rpc :create_azure_client, 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_azure_cluster(request, options = nil) ⇒ ::Gapic::Operation #create_azure_cluster(parent: nil, azure_cluster: nil, azure_cluster_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new AzureCluster 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::AzureClusters::Client.new

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

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

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::CreateAzureClusterRequest, ::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_azure_cluster(parent: nil, azure_cluster: nil, azure_cluster_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_azure_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 AzureCluster 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.

    • azure_cluster (::Google::Cloud::GkeMultiCloud::V1::AzureCluster, ::Hash) (defaults to: nil)

      Required. The specification of the AzureCluster to create.

    • azure_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 AzureCluster resource name formatted as projects/<project-id>/locations/<region>/azureClusters/<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.



780
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/gke_multi_cloud/v1/azure_clusters/client.rb', line 780

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

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

  # 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_azure_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_azure_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_azure_cluster.retry_policy

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

  @azure_clusters_stub.call_rpc :create_azure_cluster, 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_azure_node_pool(request, options = nil) ⇒ ::Gapic::Operation #create_azure_node_pool(parent: nil, azure_node_pool: nil, azure_node_pool_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new AzureNodePool, attached to a given AzureCluster.

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::AzureClusters::Client.new

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

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

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::CreateAzureNodePoolRequest, ::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_azure_node_pool(parent: nil, azure_node_pool: nil, azure_node_pool_id: nil, validate_only: nil) ⇒ ::Gapic::Operation

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

      AzureCluster names are formatted as projects/<project-id>/locations/<region>/azureClusters/<cluster-id>.

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

    • azure_node_pool (::Google::Cloud::GkeMultiCloud::V1::AzureNodePool, ::Hash) (defaults to: nil)

      Required. The specification of the AzureNodePool to create.

    • azure_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 AzureNodePool resource name formatted as projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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.



1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1557

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

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

  # 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_azure_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_azure_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_azure_node_pool.retry_policy

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

  @azure_clusters_stub.call_rpc :create_azure_node_pool, 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_azure_client(request, options = nil) ⇒ ::Gapic::Operation #delete_azure_client(name: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation

Deletes a specific AzureClient resource.

If the client is used by one or more clusters, deletion will fail and a FAILED_PRECONDITION error will be returned.

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::AzureClusters::Client.new

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

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

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

    Parameters:

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

    Pass arguments to delete_azure_client 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 AzureClient to delete.

      AzureClient names are formatted as projects/<project-id>/locations/<region>/azureClients/<client-id>.

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

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

      If set to true, and the AzureClient 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.

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

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

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

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

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

  # 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_azure_client..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_azure_client.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_azure_client.retry_policy

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

  @azure_clusters_stub.call_rpc :delete_azure_client, 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_azure_cluster(request, options = nil) ⇒ ::Gapic::Operation #delete_azure_cluster(name: nil, allow_missing: nil, validate_only: nil, etag: nil, ignore_errors: nil) ⇒ ::Gapic::Operation

Deletes a specific AzureCluster resource.

Fails if the cluster has one or more associated AzureNodePool 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::AzureClusters::Client.new

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

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

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

    Parameters:

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

    Pass arguments to delete_azure_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 AzureCluster to delete.

      AzureCluster names are formatted as projects/<project-id>/locations/<region>/azureClusters/<cluster-id>.

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

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

      If set to true, and the AzureCluster 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.

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

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

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

      The current etag of the AzureCluster.

      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.

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

      Optional. If set to true, the deletion of AzureCluster resource will succeed even if errors occur during deleting in cluster resources. Using this parameter may result in orphaned resources in 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.



1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1235

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

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

  # 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_azure_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_azure_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_azure_cluster.retry_policy

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

  @azure_clusters_stub.call_rpc :delete_azure_cluster, 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_azure_node_pool(request, options = nil) ⇒ ::Gapic::Operation #delete_azure_node_pool(name: nil, validate_only: nil, allow_missing: nil, etag: nil, ignore_errors: nil) ⇒ ::Gapic::Operation

Deletes a specific AzureNodePool 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::AzureClusters::Client.new

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

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

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

    Parameters:

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

    Pass arguments to delete_azure_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 AzureNodePool to delete.

      AzureNodePool names are formatted as projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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 AzureNodePool 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.

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

      The current ETag of the AzureNodePool.

      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.

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

      Optional. If set to true, the deletion of AzureNodePool 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.

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.



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
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 2003

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

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

  # 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_azure_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_azure_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_azure_node_pool.retry_policy

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

  @azure_clusters_stub.call_rpc :delete_azure_node_pool, 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

#generate_azure_access_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse #generate_azure_access_token(azure_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse

Generates a short-lived access token to authenticate to a given AzureCluster 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::AzureClusters::Client.new

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

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

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

Overloads:

  • #generate_azure_access_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenRequest, ::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_azure_access_token(azure_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse

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

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

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

      AzureCluster names are formatted as projects/<project-id>/locations/<region>/azureClusters/<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.



1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1435

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

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

  # 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_azure_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.azure_cluster
    header_params["azure_cluster"] = request.azure_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_azure_access_token.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_azure_access_token.retry_policy

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

  @azure_clusters_stub.call_rpc :generate_azure_access_token, 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

#generate_azure_cluster_agent_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenResponse #generate_azure_cluster_agent_token(azure_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::GenerateAzureClusterAgentTokenResponse

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::AzureClusters::Client.new

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

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

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

Overloads:

  • #generate_azure_cluster_agent_token(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenResponse

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenRequest, ::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_azure_cluster_agent_token(azure_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::GenerateAzureClusterAgentTokenResponse

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

    • azure_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.



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
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1340

def generate_azure_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::GenerateAzureClusterAgentTokenRequest

  # 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_azure_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.azure_cluster
    header_params["azure_cluster"] = request.azure_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_azure_cluster_agent_token.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_azure_cluster_agent_token.retry_policy

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

  @azure_clusters_stub.call_rpc :generate_azure_cluster_agent_token, 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_azure_client(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureClient #get_azure_client(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureClient

Describes a specific AzureClient 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::AzureClusters::Client.new

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

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

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

Overloads:

  • #get_azure_client(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureClient

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAzureClientRequest, ::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_azure_client(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureClient

    Pass arguments to get_azure_client 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 AzureClient resource to describe.

      AzureClient names are formatted as projects/<project-id>/locations/<region>/azureClients/<client-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.



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
466
467
468
469
470
471
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 431

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

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

  # 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_azure_client..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_azure_client.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_azure_client.retry_policy

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

  @azure_clusters_stub.call_rpc :get_azure_client, 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_azure_cluster(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureCluster #get_azure_cluster(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureCluster

Describes a specific AzureCluster 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::AzureClusters::Client.new

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

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

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

Overloads:

  • #get_azure_cluster(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureCluster

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAzureClusterRequest, ::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_azure_cluster(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureCluster

    Pass arguments to get_azure_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 AzureCluster resource to describe.

      AzureCluster names are formatted as projects/<project-id>/locations/<region>/azureClusters/<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.



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 995

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

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

  # 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_azure_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_azure_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_azure_cluster.retry_policy

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

  @azure_clusters_stub.call_rpc :get_azure_cluster, 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_azure_json_web_keys(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys #get_azure_json_web_keys(azure_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys

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::AzureClusters::Client.new

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

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

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

Overloads:

  • #get_azure_json_web_keys(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAzureJsonWebKeysRequest, ::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_azure_json_web_keys(azure_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys

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

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

      Required. The AzureCluster, which owns the JsonWebKeys. Format: projects/<project-id>/locations/<region>/azureClusters/<cluster-id>

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
2224
2225
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 2185

def get_azure_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::GetAzureJsonWebKeysRequest

  # 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_azure_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.azure_cluster
    header_params["azure_cluster"] = request.azure_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_azure_json_web_keys.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_azure_json_web_keys.retry_policy

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

  @azure_clusters_stub.call_rpc :get_azure_json_web_keys, 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_azure_node_pool(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureNodePool #get_azure_node_pool(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureNodePool

Describes a specific AzureNodePool 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::AzureClusters::Client.new

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

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

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

Overloads:

  • #get_azure_node_pool(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureNodePool

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAzureNodePoolRequest, ::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_azure_node_pool(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureNodePool

    Pass arguments to get_azure_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 AzureNodePool resource to describe.

      AzureNodePool names are formatted as projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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.



1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1762

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

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

  # 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_azure_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_azure_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_azure_node_pool.retry_policy

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

  @azure_clusters_stub.call_rpc :get_azure_node_pool, 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_azure_open_id_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig #get_azure_open_id_config(azure_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig

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::AzureClusters::Client.new

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

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

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

Overloads:

  • #get_azure_open_id_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAzureOpenIdConfigRequest, ::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_azure_open_id_config(azure_cluster: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig

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

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

      Required. The AzureCluster, which owns the OIDC discovery document. Format: projects//locations//azureClusters/

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

def get_azure_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::GetAzureOpenIdConfigRequest

  # 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_azure_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.azure_cluster
    header_params["azure_cluster"] = request.azure_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_azure_open_id_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_azure_open_id_config.retry_policy

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

  @azure_clusters_stub.call_rpc :get_azure_open_id_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_azure_server_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig #get_azure_server_config(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig

Returns information, such as supported Azure 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::AzureClusters::Client.new

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

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

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

Overloads:

  • #get_azure_server_config(request, options = nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig

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

    Parameters:

    • request (::Google::Cloud::GkeMultiCloud::V1::GetAzureServerConfigRequest, ::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_azure_server_config(name: nil) ⇒ ::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig

    Pass arguments to get_azure_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 AzureServerConfig resource to describe.

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

      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.



2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 2280

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

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

  # 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_azure_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_azure_server_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_azure_server_config.retry_policy

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

  @azure_clusters_stub.call_rpc :get_azure_server_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

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

Lists all AzureClient 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::AzureClusters::Client.new

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

# Call the list_azure_clients method.
result = client.list_azure_clients 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::AzureClient.
  p item
end

Overloads:

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

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

    Parameters:

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

    Pass arguments to list_azure_clients 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 AzureClient 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 azureClients.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.



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

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

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

  # 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_azure_clients..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_azure_clients.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_azure_clients.retry_policy

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

  @azure_clusters_stub.call_rpc :list_azure_clients, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @azure_clusters_stub, :list_azure_clients, 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_azure_clusters(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureCluster> #list_azure_clusters(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureCluster>

Lists all AzureCluster 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::AzureClusters::Client.new

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

# Call the list_azure_clusters method.
result = client.list_azure_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::AzureCluster.
  p item
end

Overloads:

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

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

    Parameters:

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

    Pass arguments to list_azure_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 AzureCluster 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 azureClusters.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.



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
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1104

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

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

  # 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_azure_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_azure_clusters.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_azure_clusters.retry_policy

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

  @azure_clusters_stub.call_rpc :list_azure_clusters, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @azure_clusters_stub, :list_azure_clusters, 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_azure_node_pools(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureNodePool> #list_azure_node_pools(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureNodePool>

Lists all AzureNodePool resources on a given AzureCluster.

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::AzureClusters::Client.new

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

# Call the list_azure_node_pools method.
result = client.list_azure_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::AzureNodePool.
  p item
end

Overloads:

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

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

    Parameters:

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

    Pass arguments to list_azure_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 AzureCluster which owns this collection of AzureNodePool resources.

      AzureCluster names are formatted as projects/<project-id>/locations/<region>/azureClusters/<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 azureNodePools.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.



1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1873

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

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

  # 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_azure_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_azure_node_pools.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_azure_node_pools.retry_policy

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

  @azure_clusters_stub.call_rpc :list_azure_node_pools, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @azure_clusters_stub, :list_azure_node_pools, 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

#universe_domainString

The effective universe domain

Returns:

  • (String)


176
177
178
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 176

def universe_domain
  @azure_clusters_stub.universe_domain
end

#update_azure_cluster(request, options = nil) ⇒ ::Gapic::Operation #update_azure_cluster(azure_cluster: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates an AzureCluster.

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::AzureClusters::Client.new

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

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

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

    Parameters:

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

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

    • azure_cluster (::Google::Cloud::GkeMultiCloud::V1::AzureCluster, ::Hash) (defaults to: nil)

      Required. The AzureCluster 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 AzureCluster:

      • description.
      • azureClient.
      • control_plane.version.
      • control_plane.vm_size.
      • annotations.
      • authorization.admin_users.
      • authorization.admin_groups.
      • control_plane.root_volume.size_gib.
      • azure_services_authentication.
      • azure_services_authentication.tenant_id.
      • azure_services_authentication.application_id.
      • control_plane.proxy_config.
      • control_plane.proxy_config.resource_group_id.
      • control_plane.proxy_config.secret_id.
      • control_plane.ssh_config.authorized_key.
      • logging_config.component_config.enable_components
      • monitoring_config.managed_prometheus_config.enabled.

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.



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
930
931
932
933
934
935
936
937
938
939
940
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 899

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

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

  # 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_azure_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.azure_cluster&.name
    header_params["azure_cluster.name"] = request.azure_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_azure_cluster.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_azure_cluster.retry_policy

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

  @azure_clusters_stub.call_rpc :update_azure_cluster, 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_azure_node_pool(request, options = nil) ⇒ ::Gapic::Operation #update_azure_node_pool(azure_node_pool: nil, validate_only: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates an AzureNodePool.

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::AzureClusters::Client.new

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

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

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

    Parameters:

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

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

    • azure_node_pool (::Google::Cloud::GkeMultiCloud::V1::AzureNodePool, ::Hash) (defaults to: nil)

      Required. The AzureNodePool 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 AzureNodePool:

      *. annotations.

      • version.
      • autoscaling.min_node_count.
      • autoscaling.max_node_count.
      • config.ssh_config.authorized_key.
      • management.auto_repair.
      • management.

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.



1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb', line 1666

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

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

  # 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_azure_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.azure_node_pool&.name
    header_params["azure_node_pool.name"] = request.azure_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_azure_node_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_azure_node_pool.retry_policy

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

  @azure_clusters_stub.call_rpc :update_azure_node_pool, 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