class Google::Cloud::Container::V1::ClusterManager::Client
Client
for the ClusterManager
service.
Attributes
@private
Public Class Methods
Configure the ClusterManager
Client
class.
See {::Google::Cloud::Container::V1::ClusterManager::Client::Configuration} for a description of the configuration fields.
@example
# Modify the configuration for all ClusterManager clients ::Google::Cloud::Container::V1::ClusterManager::Client.configure do |config| config.timeout = 10.0 end
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 54 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Container", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.list_clusters.timeout = 20.0 default_config.rpcs.list_clusters.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_cluster.timeout = 20.0 default_config.rpcs.get_cluster.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_cluster.timeout = 45.0 default_config.rpcs.update_cluster.timeout = 45.0 default_config.rpcs.update_node_pool.timeout = 45.0 default_config.rpcs.set_node_pool_autoscaling.timeout = 45.0 default_config.rpcs.set_logging_service.timeout = 45.0 default_config.rpcs.set_monitoring_service.timeout = 45.0 default_config.rpcs.set_addons_config.timeout = 45.0 default_config.rpcs.set_locations.timeout = 45.0 default_config.rpcs.update_master.timeout = 45.0 default_config.rpcs.set_master_auth.timeout = 45.0 default_config.rpcs.delete_cluster.timeout = 20.0 default_config.rpcs.delete_cluster.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_operations.timeout = 20.0 default_config.rpcs.list_operations.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_operation.timeout = 20.0 default_config.rpcs.get_operation.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.cancel_operation.timeout = 45.0 default_config.rpcs.get_server_config.timeout = 20.0 default_config.rpcs.get_server_config.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_node_pools.timeout = 20.0 default_config.rpcs.list_node_pools.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_node_pool.timeout = 20.0 default_config.rpcs.get_node_pool.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_node_pool.timeout = 45.0 default_config.rpcs.delete_node_pool.timeout = 20.0 default_config.rpcs.delete_node_pool.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.rollback_node_pool_upgrade.timeout = 45.0 default_config.rpcs.set_node_pool_management.timeout = 45.0 default_config.rpcs.set_labels.timeout = 45.0 default_config.rpcs.set_legacy_abac.timeout = 45.0 default_config.rpcs.start_ip_rotation.timeout = 45.0 default_config.rpcs.complete_ip_rotation.timeout = 45.0 default_config.rpcs.set_node_pool_size.timeout = 45.0 default_config.rpcs.set_network_policy.timeout = 45.0 default_config.rpcs.set_maintenance_policy.timeout = 45.0 default_config end yield @configure if block_given? @configure end
Create a new ClusterManager
client object.
@example
# Create a client using the default configuration client = ::Google::Cloud::Container::V1::ClusterManager::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config| config.timeout = 10.0 end
@yield [config] Configure the ClusterManager
client. @yieldparam config [Client::Configuration]
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 194 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/container/v1/cluster_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 == Client.configure.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 @cluster_manager_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Container::V1::ClusterManager::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end
Public Instance Methods
Cancels the specified operation.
@overload cancel_operation
(request, options = nil)
Pass arguments to `cancel_operation` via a request object, either of type {::Google::Cloud::Container::V1::CancelOperationRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::CancelOperationRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload cancel_operation
(project_id: nil, zone: nil, operation_id: nil, name: nil)
Pass arguments to `cancel_operation` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. @param operation_id [::String] Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, operation id) of the operation to cancel. Specified in the format `projects/*/locations/*/operations/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1600 def cancel_operation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::CancelOperationRequest # 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 metadata = @config.rpcs.cancel_operation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, metadata: metadata, retry_policy: @config.rpcs.cancel_operation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :cancel_operation, 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
Completes master IP rotation.
@overload complete_ip_rotation
(request, options = nil)
Pass arguments to `complete_ip_rotation` via a request object, either of type {::Google::Cloud::Container::V1::CompleteIPRotationRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::CompleteIPRotationRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload complete_ip_rotation
(project_id: nil, zone: nil, cluster_id: nil, name: nil)
Pass arguments to `complete_ip_rotation` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster id) of the cluster to complete IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2595 def complete_ip_rotation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::CompleteIPRotationRequest # 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 metadata = @config.rpcs.complete_ip_rotation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.complete_ip_rotation.timeout, metadata: metadata, retry_policy: @config.rpcs.complete_ip_rotation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :complete_ip_rotation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Configure the ClusterManager
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 {Client.configure}.
See {::Google::Cloud::Container::V1::ClusterManager::Client::Configuration} for a description of the configuration fields.
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 173 def configure yield @config if block_given? @config end
Creates a cluster, consisting of the specified number and type of Google
Compute Engine instances.
By default, the cluster is created in the project's [default network](cloud.google.com/compute/docs/networks-and-firewalls#networks).
One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster.
Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
@overload create_cluster
(request, options = nil)
Pass arguments to `create_cluster` via a request object, either of type {::Google::Cloud::Container::V1::CreateClusterRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::CreateClusterRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_cluster
(project_id: nil, zone: nil, cluster: nil, parent: nil)
Pass arguments to `create_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. @param cluster [::Google::Cloud::Container::V1::Cluster, ::Hash] Required. A [cluster resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) @param parent [::String] The parent (project and location) where the cluster will be created. Specified in the format `projects/*/locations/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 448 def create_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::CreateClusterRequest # 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 metadata = @config.rpcs.create_cluster.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_cluster.timeout, metadata: metadata, retry_policy: @config.rpcs.create_cluster.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :create_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
Creates a node pool for a cluster.
@overload create_node_pool
(request, options = nil)
Pass arguments to `create_node_pool` via a request object, either of type {::Google::Cloud::Container::V1::CreateNodePoolRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::CreateNodePoolRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_node_pool
(project_id: nil, zone: nil, cluster_id: nil, node_pool: nil, parent: nil)
Pass arguments to `create_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. @param node_pool [::Google::Cloud::Container::V1::NodePool, ::Hash] Required. The node pool to create. @param parent [::String] The parent (project, location, cluster id) where the node pool will be created. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2000 def create_node_pool request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::CreateNodePoolRequest # 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 metadata = @config.rpcs.create_node_pool.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_node_pool.timeout, metadata: metadata, retry_policy: @config.rpcs.create_node_pool.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :create_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
Deletes the cluster, including the Kubernetes endpoint and all worker nodes.
Firewalls and routes that were configured during cluster creation are also deleted.
Other Google
Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
@overload delete_cluster
(request, options = nil)
Pass arguments to `delete_cluster` via a request object, either of type {::Google::Cloud::Container::V1::DeleteClusterRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::DeleteClusterRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_cluster
(project_id: nil, zone: nil, cluster_id: nil, name: nil)
Pass arguments to `delete_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster) of the cluster to delete. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1359 def delete_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::DeleteClusterRequest # 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 metadata = @config.rpcs.delete_cluster.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_cluster.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :delete_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
Deletes a node pool from a cluster.
@overload delete_node_pool
(request, options = nil)
Pass arguments to `delete_node_pool` via a request object, either of type {::Google::Cloud::Container::V1::DeleteNodePoolRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::DeleteNodePoolRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_node_pool
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil)
Pass arguments to `delete_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2085 def delete_node_pool request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::DeleteNodePoolRequest # 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 metadata = @config.rpcs.delete_node_pool.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_node_pool.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_node_pool.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :delete_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
Gets the details of a specific cluster.
@overload get_cluster
(request, options = nil)
Pass arguments to `get_cluster` via a request object, either of type {::Google::Cloud::Container::V1::GetClusterRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::GetClusterRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_cluster
(project_id: nil, zone: nil, cluster_id: nil, name: nil)
Pass arguments to `get_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Cluster] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Cluster]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 354 def get_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::GetClusterRequest # 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 metadata = @config.rpcs.get_cluster.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_cluster.timeout, metadata: metadata, retry_policy: @config.rpcs.get_cluster.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :get_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
Gets the public component of the cluster signing keys in JSON Web Key format. This API is not yet intended for general use, and is not available for all clusters.
@overload get_json_web_keys
(request, options = nil)
Pass arguments to `get_json_web_keys` via a request object, either of type {::Google::Cloud::Container::V1::GetJSONWebKeysRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::GetJSONWebKeysRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_json_web_keys
(parent: nil)
Pass arguments to `get_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). @param parent [::String] The cluster (project, location, cluster id) to get keys for. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::GetJSONWebKeysResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::GetJSONWebKeysResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1750 def get_json_web_keys request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::GetJSONWebKeysRequest # 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 metadata = @config.rpcs.get_json_web_keys.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_json_web_keys.timeout, metadata: metadata, retry_policy: @config.rpcs.get_json_web_keys.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :get_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
Retrieves the requested node pool.
@overload get_node_pool
(request, options = nil)
Pass arguments to `get_node_pool` via a request object, either of type {::Google::Cloud::Container::V1::GetNodePoolRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::GetNodePoolRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_node_pool
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil)
Pass arguments to `get_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::NodePool] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::NodePool]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1916 def get_node_pool request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::GetNodePoolRequest # 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 metadata = @config.rpcs.get_node_pool.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_node_pool.timeout, metadata: metadata, retry_policy: @config.rpcs.get_node_pool.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :get_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
Gets the specified operation.
@overload get_operation
(request, options = nil)
Pass arguments to `get_operation` via a request object, either of type {::Google::Cloud::Container::V1::GetOperationRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::GetOperationRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_operation
(project_id: nil, zone: nil, operation_id: nil, name: nil)
Pass arguments to `get_operation` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param operation_id [::String] Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, operation id) of the operation to get. Specified in the format `projects/*/locations/*/operations/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1519 def get_operation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::GetOperationRequest # 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 metadata = @config.rpcs.get_operation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_operation.timeout, metadata: metadata, retry_policy: @config.rpcs.get_operation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :get_operation, 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
Returns configuration info about the Google
Kubernetes Engine service.
@overload get_server_config
(request, options = nil)
Pass arguments to `get_server_config` via a request object, either of type {::Google::Cloud::Container::V1::GetServerConfigRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::GetServerConfigRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_server_config
(project_id: nil, zone: nil, name: nil)
Pass arguments to `get_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. @param name [::String] The name (project and location) of the server config to get, specified in the format `projects/*/locations/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::ServerConfig] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::ServerConfig]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1678 def get_server_config request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::GetServerConfigRequest # 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 metadata = @config.rpcs.get_server_config.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_server_config.timeout, metadata: metadata, retry_policy: @config.rpcs.get_server_config.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :get_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
Lists all clusters owned by a project in either the specified zone or all zones.
@overload list_clusters
(request, options = nil)
Pass arguments to `list_clusters` via a request object, either of type {::Google::Cloud::Container::V1::ListClustersRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::ListClustersRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_clusters
(project_id: nil, zone: nil, parent: nil)
Pass arguments to `list_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. @param parent [::String] The parent (project and location) where the clusters will be listed. Specified in the format `projects/*/locations/*`. Location "-" matches all zones and all regions.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::ListClustersResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::ListClustersResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 273 def list_clusters request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::ListClustersRequest # 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 metadata = @config.rpcs.list_clusters.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_clusters.timeout, metadata: metadata, retry_policy: @config.rpcs.list_clusters.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :list_clusters, 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
Lists the node pools for a cluster.
@overload list_node_pools
(request, options = nil)
Pass arguments to `list_node_pools` via a request object, either of type {::Google::Cloud::Container::V1::ListNodePoolsRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::ListNodePoolsRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_node_pools
(project_id: nil, zone: nil, cluster_id: nil, parent: nil)
Pass arguments to `list_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. @param parent [::String] The parent (project, location, cluster id) where the node pools will be listed. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::ListNodePoolsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::ListNodePoolsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1831 def list_node_pools request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::ListNodePoolsRequest # 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 metadata = @config.rpcs.list_node_pools.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_node_pools.timeout, metadata: metadata, retry_policy: @config.rpcs.list_node_pools.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :list_node_pools, 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
Lists all operations in a project in a specific zone or all zones.
@overload list_operations
(request, options = nil)
Pass arguments to `list_operations` via a request object, either of type {::Google::Cloud::Container::V1::ListOperationsRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::ListOperationsRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_operations
(project_id: nil, zone: nil, parent: nil)
Pass arguments to `list_operations` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. @param parent [::String] The parent (project and location) where the operations will be listed. Specified in the format `projects/*/locations/*`. Location "-" matches all zones and all regions.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::ListOperationsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::ListOperationsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1438 def list_operations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::ListOperationsRequest # 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 metadata = @config.rpcs.list_operations.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_operations.timeout, metadata: metadata, retry_policy: @config.rpcs.list_operations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :list_operations, 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
Lists subnetworks that are usable for creating clusters in a project.
@overload list_usable_subnetworks
(request, options = nil)
Pass arguments to `list_usable_subnetworks` via a request object, either of type {::Google::Cloud::Container::V1::ListUsableSubnetworksRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::ListUsableSubnetworksRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_usable_subnetworks
(parent: nil, filter: nil, page_size: nil, page_token: nil)
Pass arguments to `list_usable_subnetworks` 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). @param parent [::String] The parent project where subnetworks are usable. Specified in the format `projects/*`. @param filter [::String] Filtering currently only supports equality on the networkProjectId and must be in the form: "networkProjectId=[PROJECTID]", where `networkProjectId` is the project which owns the listed subnetworks. This defaults to the parent project ID. @param page_size [::Integer] The max number of results per page that should be returned. If the number of available results is larger than `page_size`, a `next_page_token` is returned which can be used to get the next page of results in subsequent requests. Acceptable values are 0 to 500, inclusive. (Default: 500) @param page_token [::String] Specifies a page token to use. Set this to the nextPageToken returned by previous list requests to get the next page of results.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Container::V1::UsableSubnetwork>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::Container::V1::UsableSubnetwork>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2929 def list_usable_subnetworks request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::ListUsableSubnetworksRequest # 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 metadata = @config.rpcs.list_usable_subnetworks.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_usable_subnetworks.timeout, metadata: metadata, retry_policy: @config.rpcs.list_usable_subnetworks.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :list_usable_subnetworks, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @cluster_manager_stub, :list_usable_subnetworks, 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
Rolls back a previously Aborted or Failed NodePool
upgrade. This makes no changes if the last upgrade successfully completed.
@overload rollback_node_pool_upgrade
(request, options = nil)
Pass arguments to `rollback_node_pool_upgrade` via a request object, either of type {::Google::Cloud::Container::V1::RollbackNodePoolUpgradeRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::RollbackNodePoolUpgradeRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload rollback_node_pool_upgrade
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil)
Pass arguments to `rollback_node_pool_upgrade` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2171 def rollback_node_pool_upgrade request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::RollbackNodePoolUpgradeRequest # 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 metadata = @config.rpcs.rollback_node_pool_upgrade.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.rollback_node_pool_upgrade.timeout, metadata: metadata, retry_policy: @config.rpcs.rollback_node_pool_upgrade.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :rollback_node_pool_upgrade, 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
Sets the addons for a specific cluster.
@overload set_addons_config
(request, options = nil)
Pass arguments to `set_addons_config` via a request object, either of type {::Google::Cloud::Container::V1::SetAddonsConfigRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetAddonsConfigRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_addons_config
(project_id: nil, zone: nil, cluster_id: nil, addons_config: nil, name: nil)
Pass arguments to `set_addons_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param addons_config [::Google::Cloud::Container::V1::AddonsConfig, ::Hash] Required. The desired configurations for the various addons available to run in the cluster. @param name [::String] The name (project, location, cluster) of the cluster to set addons. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 997 def set_addons_config request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetAddonsConfigRequest # 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 metadata = @config.rpcs.set_addons_config.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_addons_config.timeout, metadata: metadata, retry_policy: @config.rpcs.set_addons_config.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_addons_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
Sets labels on a cluster.
@overload set_labels
(request, options = nil)
Pass arguments to `set_labels` via a request object, either of type {::Google::Cloud::Container::V1::SetLabelsRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetLabelsRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_labels
(project_id: nil, zone: nil, cluster_id: nil, resource_labels: nil, label_fingerprint: nil, name: nil)
Pass arguments to `set_labels` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. @param resource_labels [::Hash{::String => ::String}] Required. The labels to set for that cluster. @param label_fingerprint [::String] Required. The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Kubernetes Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a `get()` request to the resource to get the latest fingerprint. @param name [::String] The name (project, location, cluster id) of the cluster to set labels. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2348 def set_labels request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetLabelsRequest # 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 metadata = @config.rpcs.set_labels.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_labels.timeout, metadata: metadata, retry_policy: @config.rpcs.set_labels.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_labels, 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
Enables or disables the ABAC authorization mechanism on a cluster.
@overload set_legacy_abac
(request, options = nil)
Pass arguments to `set_legacy_abac` via a request object, either of type {::Google::Cloud::Container::V1::SetLegacyAbacRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetLegacyAbacRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_legacy_abac
(project_id: nil, zone: nil, cluster_id: nil, enabled: nil, name: nil)
Pass arguments to `set_legacy_abac` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. @param enabled [::Boolean] Required. Whether ABAC authorization will be enabled in the cluster. @param name [::String] The name (project, location, cluster id) of the cluster to set legacy abac. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2431 def set_legacy_abac request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetLegacyAbacRequest # 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 metadata = @config.rpcs.set_legacy_abac.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_legacy_abac.timeout, metadata: metadata, retry_policy: @config.rpcs.set_legacy_abac.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_legacy_abac, 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
Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.
@deprecated This method is deprecated and may be removed in the next major version update.
@overload set_locations
(request, options = nil)
Pass arguments to `set_locations` via a request object, either of type {::Google::Cloud::Container::V1::SetLocationsRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetLocationsRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_locations
(project_id: nil, zone: nil, cluster_id: nil, locations: nil, name: nil)
Pass arguments to `set_locations` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param locations [::Array<::String>] Required. The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed. This list must always include the cluster's primary zone. @param name [::String] The name (project, location, cluster) of the cluster to set locations. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1091 def set_locations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetLocationsRequest # 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 metadata = @config.rpcs.set_locations.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_locations.timeout, metadata: metadata, retry_policy: @config.rpcs.set_locations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_locations, 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
Sets the logging service for a specific cluster.
@overload set_logging_service
(request, options = nil)
Pass arguments to `set_logging_service` via a request object, either of type {::Google::Cloud::Container::V1::SetLoggingServiceRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetLoggingServiceRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_logging_service
(project_id: nil, zone: nil, cluster_id: nil, logging_service: nil, name: nil)
Pass arguments to `set_logging_service` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param logging_service [::String] Required. The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model * `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15). * `none` - no logs will be exported from the cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. @param name [::String] The name (project, location, cluster) of the cluster to set logging. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 820 def set_logging_service request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetLoggingServiceRequest # 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 metadata = @config.rpcs.set_logging_service.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_logging_service.timeout, metadata: metadata, retry_policy: @config.rpcs.set_logging_service.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_logging_service, 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
Sets the maintenance policy for a cluster.
@overload set_maintenance_policy
(request, options = nil)
Pass arguments to `set_maintenance_policy` via a request object, either of type {::Google::Cloud::Container::V1::SetMaintenancePolicyRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetMaintenancePolicyRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_maintenance_policy
(project_id: nil, zone: nil, cluster_id: nil, maintenance_policy: nil, name: nil)
Pass arguments to `set_maintenance_policy` 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). @param project_id [::String] Required. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). @param zone [::String] Required. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. @param cluster_id [::String] Required. The name of the cluster to update. @param maintenance_policy [::Google::Cloud::Container::V1::MaintenancePolicy, ::Hash] Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. @param name [::String] The name (project, location, cluster id) of the cluster to set maintenance policy. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2847 def set_maintenance_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetMaintenancePolicyRequest # 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 metadata = @config.rpcs.set_maintenance_policy.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_maintenance_policy.timeout, metadata: metadata, retry_policy: @config.rpcs.set_maintenance_policy.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_maintenance_policy, 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
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
@overload set_master_auth
(request, options = nil)
Pass arguments to `set_master_auth` via a request object, either of type {::Google::Cloud::Container::V1::SetMasterAuthRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetMasterAuthRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_master_auth
(project_id: nil, zone: nil, cluster_id: nil, action: nil, update: nil, name: nil)
Pass arguments to `set_master_auth` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param action [::Google::Cloud::Container::V1::SetMasterAuthRequest::Action] Required. The exact form of action to be taken on the master auth. @param update [::Google::Cloud::Container::V1::MasterAuth, ::Hash] Required. A description of the update. @param name [::String] The name (project, location, cluster) of the cluster to set auth. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1270 def set_master_auth request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetMasterAuthRequest # 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 metadata = @config.rpcs.set_master_auth.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_master_auth.timeout, metadata: metadata, retry_policy: @config.rpcs.set_master_auth.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_master_auth, 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
Sets the monitoring service for a specific cluster.
@overload set_monitoring_service
(request, options = nil)
Pass arguments to `set_monitoring_service` via a request object, either of type {::Google::Cloud::Container::V1::SetMonitoringServiceRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetMonitoringServiceRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_monitoring_service
(project_id: nil, zone: nil, cluster_id: nil, monitoring_service: nil, name: nil)
Pass arguments to `set_monitoring_service` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param monitoring_service [::String] Required. The monitoring service the cluster should use to write metrics. Currently available options: * "monitoring.googleapis.com/kubernetes" - The Cloud Monitoring service with a Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No metrics will be exported from the cluster. If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. @param name [::String] The name (project, location, cluster) of the cluster to set monitoring. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 913 def set_monitoring_service request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetMonitoringServiceRequest # 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 metadata = @config.rpcs.set_monitoring_service.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_monitoring_service.timeout, metadata: metadata, retry_policy: @config.rpcs.set_monitoring_service.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_monitoring_service, 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
Enables or disables Network Policy for a cluster.
@overload set_network_policy
(request, options = nil)
Pass arguments to `set_network_policy` via a request object, either of type {::Google::Cloud::Container::V1::SetNetworkPolicyRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetNetworkPolicyRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_network_policy
(project_id: nil, zone: nil, cluster_id: nil, network_policy: nil, name: nil)
Pass arguments to `set_network_policy` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. @param network_policy [::Google::Cloud::Container::V1::NetworkPolicy, ::Hash] Required. Configuration options for the NetworkPolicy feature. @param name [::String] The name (project, location, cluster id) of the cluster to set networking policy. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2765 def set_network_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetNetworkPolicyRequest # 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 metadata = @config.rpcs.set_network_policy.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_network_policy.timeout, metadata: metadata, retry_policy: @config.rpcs.set_network_policy.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_network_policy, 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
Sets the autoscaling settings for the specified node pool.
@overload set_node_pool_autoscaling
(request, options = nil)
Pass arguments to `set_node_pool_autoscaling` via a request object, either of type {::Google::Cloud::Container::V1::SetNodePoolAutoscalingRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetNodePoolAutoscalingRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_node_pool_autoscaling
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, autoscaling: nil, name: nil)
Pass arguments to `set_node_pool_autoscaling` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. @param autoscaling [::Google::Cloud::Container::V1::NodePoolAutoscaling, ::Hash] Required. Autoscaling configuration for the node pool. @param name [::String] The name (project, location, cluster, node pool) of the node pool to set autoscaler settings. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 727 def set_node_pool_autoscaling request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetNodePoolAutoscalingRequest # 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 metadata = @config.rpcs.set_node_pool_autoscaling.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_node_pool_autoscaling.timeout, metadata: metadata, retry_policy: @config.rpcs.set_node_pool_autoscaling.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_node_pool_autoscaling, 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
Sets the NodeManagement options for a node pool.
@overload set_node_pool_management
(request, options = nil)
Pass arguments to `set_node_pool_management` via a request object, either of type {::Google::Cloud::Container::V1::SetNodePoolManagementRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetNodePoolManagementRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_node_pool_management
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, management: nil, name: nil)
Pass arguments to `set_node_pool_management` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. @param management [::Google::Cloud::Container::V1::NodeManagement, ::Hash] Required. NodeManagement configuration for the node pool. @param name [::String] The name (project, location, cluster, node pool id) of the node pool to set management properties. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2258 def set_node_pool_management request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetNodePoolManagementRequest # 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 metadata = @config.rpcs.set_node_pool_management.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_node_pool_management.timeout, metadata: metadata, retry_policy: @config.rpcs.set_node_pool_management.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_node_pool_management, 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
Sets the size for a specific node pool.
@overload set_node_pool_size
(request, options = nil)
Pass arguments to `set_node_pool_size` via a request object, either of type {::Google::Cloud::Container::V1::SetNodePoolSizeRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::SetNodePoolSizeRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_node_pool_size
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_count: nil, name: nil)
Pass arguments to `set_node_pool_size` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. @param node_count [::Integer] Required. The desired node count for the pool. @param name [::String] The name (project, location, cluster, node pool id) of the node pool to set size. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2682 def set_node_pool_size request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::SetNodePoolSizeRequest # 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 metadata = @config.rpcs.set_node_pool_size.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_node_pool_size.timeout, metadata: metadata, retry_policy: @config.rpcs.set_node_pool_size.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :set_node_pool_size, 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
Starts master IP rotation.
@overload start_ip_rotation
(request, options = nil)
Pass arguments to `start_ip_rotation` via a request object, either of type {::Google::Cloud::Container::V1::StartIPRotationRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::StartIPRotationRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload start_ip_rotation
(project_id: nil, zone: nil, cluster_id: nil, name: nil, rotate_credentials: nil)
Pass arguments to `start_ip_rotation` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. @param name [::String] The name (project, location, cluster id) of the cluster to start IP rotation. Specified in the format `projects/*/locations/*/clusters/*`. @param rotate_credentials [::Boolean] Whether to rotate credentials during IP rotation.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 2514 def start_ip_rotation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::StartIPRotationRequest # 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 metadata = @config.rpcs.start_ip_rotation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.start_ip_rotation.timeout, metadata: metadata, retry_policy: @config.rpcs.start_ip_rotation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :start_ip_rotation, 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
Updates the settings of a specific cluster.
@overload update_cluster
(request, options = nil)
Pass arguments to `update_cluster` via a request object, either of type {::Google::Cloud::Container::V1::UpdateClusterRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::UpdateClusterRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_cluster
(project_id: nil, zone: nil, cluster_id: nil, update: nil, name: nil)
Pass arguments to `update_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param update [::Google::Cloud::Container::V1::ClusterUpdate, ::Hash] Required. A description of the update. @param name [::String] The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 531 def update_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::UpdateClusterRequest # 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 metadata = @config.rpcs.update_cluster.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_cluster.timeout, metadata: metadata, retry_policy: @config.rpcs.update_cluster.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :update_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
Updates the master for a specific cluster.
@overload update_master
(request, options = nil)
Pass arguments to `update_master` via a request object, either of type {::Google::Cloud::Container::V1::UpdateMasterRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::UpdateMasterRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_master
(project_id: nil, zone: nil, cluster_id: nil, master_version: nil, name: nil)
Pass arguments to `update_master` 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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param master_version [::String] Required. The Kubernetes version to change the master to. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the default Kubernetes version @param name [::String] The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 1183 def update_master request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::UpdateMasterRequest # 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 metadata = @config.rpcs.update_master.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_master.timeout, metadata: metadata, retry_policy: @config.rpcs.update_master.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :update_master, 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
Updates the version and/or image type for the specified node pool.
@overload update_node_pool
(request, options = nil)
Pass arguments to `update_node_pool` via a request object, either of type {::Google::Cloud::Container::V1::UpdateNodePoolRequest} or an equivalent Hash. @param request [::Google::Cloud::Container::V1::UpdateNodePoolRequest, ::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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_node_pool
(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, name: nil, locations: nil, workload_metadata_config: nil, upgrade_settings: nil)
Pass arguments to `update_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). @param project_id [::String] Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. @param zone [::String] Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. @param cluster_id [::String] Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. @param node_pool_id [::String] Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. @param node_version [::String] Required. The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the Kubernetes master version @param image_type [::String] Required. The desired image type for the node pool. @param name [::String] The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`. @param locations [::Array<::String>] The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the node pool's nodes should be located. Changing the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed. @param workload_metadata_config [::Google::Cloud::Container::V1::WorkloadMetadataConfig, ::Hash] The desired workload metadata config for the node pool. @param upgrade_settings [::Google::Cloud::Container::V1::NodePool::UpgradeSettings, ::Hash] Upgrade settings control disruption and speed of the upgrade.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Container::V1::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Container::V1::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/container/v1/cluster_manager/client.rb, line 640 def update_node_pool request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Container::V1::UpdateNodePoolRequest # 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 metadata = @config.rpcs.update_node_pool.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Container::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_node_pool.timeout, metadata: metadata, retry_policy: @config.rpcs.update_node_pool.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @cluster_manager_stub.call_rpc :update_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