Kubernetes Engine V1beta1 API - Class Google::Cloud::Container::V1beta1::ClusterManager::Client (v0.34.0)

Reference documentation and code samples for the Kubernetes Engine V1beta1 API class Google::Cloud::Container::V1beta1::ClusterManager::Client.

Client for the ClusterManager service.

Google Kubernetes Engine Cluster Manager v1beta1

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the ClusterManager Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all ClusterManager clients
::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
  config.timeout = 10.0
end

#cancel_operation

def cancel_operation(request, options = nil) -> ::Google::Protobuf::Empty
def cancel_operation(project_id: nil, zone: nil, operation_id: nil, name: nil) -> ::Google::Protobuf::Empty

Cancels the specified operation.

Overloads
def cancel_operation(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_operation via a request object, either of type Google::Cloud::Container::V1beta1::CancelOperationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_operation(project_id: nil, zone: nil, operation_id: nil, name: nil) -> ::Google::Protobuf::Empty
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the operation resides. This field has been deprecated and replaced by the name field.
  • operation_id (::String) — Required. Deprecated. The server-assigned name of the operation. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, operation id) of the operation to cancel. Specified in the format projects/*/locations/*/operations/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::CancelOperationRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#check_autopilot_compatibility

def check_autopilot_compatibility(request, options = nil) -> ::Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityResponse
def check_autopilot_compatibility(name: nil) -> ::Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityResponse

Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.

Overloads
def check_autopilot_compatibility(request, options = nil) -> ::Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityResponse
Pass arguments to check_autopilot_compatibility via a request object, either of type Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def check_autopilot_compatibility(name: nil) -> ::Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityResponse
Pass arguments to check_autopilot_compatibility 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).
Parameter
  • name (::String) — The name (project, location, cluster) of the cluster to retrieve. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::CheckAutopilotCompatibilityResponse.
p result

#complete_ip_rotation

def complete_ip_rotation(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def complete_ip_rotation(project_id: nil, zone: nil, cluster_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Completes master IP rotation.

Overloads
def complete_ip_rotation(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to complete_ip_rotation via a request object, either of type Google::Cloud::Container::V1beta1::CompleteIPRotationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def complete_ip_rotation(project_id: nil, zone: nil, cluster_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, cluster name) of the cluster to complete IP rotation. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::CompleteIPRotationRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#complete_node_pool_upgrade

def complete_node_pool_upgrade(request, options = nil) -> ::Google::Protobuf::Empty
def complete_node_pool_upgrade(name: nil) -> ::Google::Protobuf::Empty

CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.

Overloads
def complete_node_pool_upgrade(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to complete_node_pool_upgrade via a request object, either of type Google::Cloud::Container::V1beta1::CompleteNodePoolUpgradeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::CompleteNodePoolUpgradeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def complete_node_pool_upgrade(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to complete_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).
Parameter
  • name (::String) — The name (project, location, cluster, node pool id) of the node pool to complete upgrade. Specified in the format projects/*/locations/*/clusters/*/nodePools/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::CompleteNodePoolUpgradeRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#configure

def configure() { |config| ... } -> Client::Configuration

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 Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_cluster

def create_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def create_cluster(project_id: nil, zone: nil, cluster: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::Operation

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.

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.

Overloads
def create_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to create_cluster via a request object, either of type Google::Cloud::Container::V1beta1::CreateClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_cluster(project_id: nil, zone: nil, cluster: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.
  • cluster (::Google::Cloud::Container::V1beta1::Cluster, ::Hash) — Required. A cluster resource
  • parent (::String) — The parent (project and location) where the cluster will be created. Specified in the format projects/*/locations/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::CreateClusterRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#create_node_pool

def create_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def create_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Creates a node pool for a cluster.

Overloads
def create_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to create_node_pool via a request object, either of type Google::Cloud::Container::V1beta1::CreateNodePoolRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.
  • node_pool (::Google::Cloud::Container::V1beta1::NodePool, ::Hash) — Required. The node pool to create.
  • parent (::String) — The parent (project, location, cluster name) where the node pool will be created. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::CreateNodePoolRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#delete_cluster

def delete_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def delete_cluster(project_id: nil, zone: nil, cluster_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

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.

Overloads
def delete_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to delete_cluster via a request object, either of type DeleteClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_cluster(project_id: nil, zone: nil, cluster_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, cluster) of the cluster to delete. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::DeleteClusterRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#delete_node_pool

def delete_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def delete_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Deletes a node pool from a cluster.

Overloads
def delete_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to delete_node_pool via a request object, either of type DeleteNodePoolRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format projects/*/locations/*/clusters/*/nodePools/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::DeleteNodePoolRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#get_cluster

def get_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Cluster
def get_cluster(project_id: nil, zone: nil, cluster_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Cluster

Gets the details for a specific cluster.

Overloads
def get_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Cluster
Pass arguments to get_cluster via a request object, either of type GetClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_cluster(project_id: nil, zone: nil, cluster_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Cluster
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, cluster) of the cluster to retrieve. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::GetClusterRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Cluster.
p result

#get_json_web_keys

def get_json_web_keys(request, options = nil) -> ::Google::Cloud::Container::V1beta1::GetJSONWebKeysResponse
def get_json_web_keys(parent: nil) -> ::Google::Cloud::Container::V1beta1::GetJSONWebKeysResponse

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.

Overloads
def get_json_web_keys(request, options = nil) -> ::Google::Cloud::Container::V1beta1::GetJSONWebKeysResponse
Pass arguments to get_json_web_keys via a request object, either of type GetJSONWebKeysRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_json_web_keys(parent: nil) -> ::Google::Cloud::Container::V1beta1::GetJSONWebKeysResponse
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).
Parameter
  • parent (::String) — The cluster (project, location, cluster name) to get keys for. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::GetJSONWebKeysRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::GetJSONWebKeysResponse.
p result

#get_node_pool

def get_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::NodePool
def get_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::NodePool

Retrieves the requested node pool.

Overloads
def get_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::NodePool
Pass arguments to get_node_pool via a request object, either of type GetNodePoolRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::NodePool
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format projects/*/locations/*/clusters/*/nodePools/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::GetNodePoolRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::NodePool.
p result

#get_operation

def get_operation(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def get_operation(project_id: nil, zone: nil, operation_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Gets the specified operation.

Overloads
def get_operation(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to get_operation via a request object, either of type GetOperationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_operation(project_id: nil, zone: nil, operation_id: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • operation_id (::String) — Required. Deprecated. The server-assigned name of the operation. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, operation id) of the operation to get. Specified in the format projects/*/locations/*/operations/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::GetOperationRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#get_server_config

def get_server_config(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ServerConfig
def get_server_config(project_id: nil, zone: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::ServerConfig

Returns configuration info about the Google Kubernetes Engine service.

Overloads
def get_server_config(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ServerConfig
Pass arguments to get_server_config via a request object, either of type GetServerConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_server_config(project_id: nil, zone: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::ServerConfig
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone to return operations for. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project and location) of the server config to get, specified in the format projects/*/locations/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::GetServerConfigRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::ServerConfig.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new ClusterManager client object.

Yields
  • (config) — Configure the ClusterManager client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
  config.timeout = 10.0
end

#list_clusters

def list_clusters(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListClustersResponse
def list_clusters(project_id: nil, zone: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::ListClustersResponse

Lists all clusters owned by a project in either the specified zone or all zones.

Overloads
def list_clusters(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListClustersResponse
Pass arguments to list_clusters via a request object, either of type ListClustersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_clusters(project_id: nil, zone: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::ListClustersResponse
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field.
  • 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.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::ListClustersRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::ListClustersResponse.
p result

#list_locations

def list_locations(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListLocationsResponse
def list_locations(parent: nil) -> ::Google::Cloud::Container::V1beta1::ListLocationsResponse

Fetches locations that offer Google Kubernetes Engine.

Overloads
def list_locations(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListLocationsResponse
Pass arguments to list_locations via a request object, either of type ListLocationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::ListLocationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_locations(parent: nil) -> ::Google::Cloud::Container::V1beta1::ListLocationsResponse
Pass arguments to list_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).
Parameter
  • parent (::String) — Required. Contains the name of the resource requested. Specified in the format projects/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::ListLocationsRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::ListLocationsResponse.
p result

#list_node_pools

def list_node_pools(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListNodePoolsResponse
def list_node_pools(project_id: nil, zone: nil, cluster_id: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::ListNodePoolsResponse

Lists the node pools for a cluster.

Overloads
def list_node_pools(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListNodePoolsResponse
Pass arguments to list_node_pools via a request object, either of type ListNodePoolsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_node_pools(project_id: nil, zone: nil, cluster_id: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::ListNodePoolsResponse
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.
  • parent (::String) — The parent (project, location, cluster name) where the node pools will be listed. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::ListNodePoolsRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::ListNodePoolsResponse.
p result

#list_operations

def list_operations(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListOperationsResponse
def list_operations(project_id: nil, zone: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::ListOperationsResponse

Lists all operations in a project in the specified zone or all zones.

Overloads
def list_operations(request, options = nil) -> ::Google::Cloud::Container::V1beta1::ListOperationsResponse
Pass arguments to list_operations via a request object, either of type ListOperationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_operations(project_id: nil, zone: nil, parent: nil) -> ::Google::Cloud::Container::V1beta1::ListOperationsResponse
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone to return operations for, or - for all zones. This field has been deprecated and replaced by the parent field.
  • 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.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::ListOperationsRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::ListOperationsResponse.
p result

#list_usable_subnetworks

def list_usable_subnetworks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Container::V1beta1::UsableSubnetwork>
def list_usable_subnetworks(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Container::V1beta1::UsableSubnetwork>

Lists subnetworks that can be used for creating clusters in a project.

Overloads
def list_usable_subnetworks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Container::V1beta1::UsableSubnetwork>
Pass arguments to list_usable_subnetworks via a request object, either of type ListUsableSubnetworksRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_usable_subnetworks(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Container::V1beta1::UsableSubnetwork>
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).
Parameters
  • parent (::String) — Required. The parent project where subnetworks are usable. Specified in the format projects/*.
  • 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.
  • 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)
  • 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.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::ListUsableSubnetworksRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Container::V1beta1::UsableSubnetwork.
  p item
end

#rollback_node_pool_upgrade

def rollback_node_pool_upgrade(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def rollback_node_pool_upgrade(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil, respect_pdb: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.

Overloads
def rollback_node_pool_upgrade(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to rollback_node_pool_upgrade via a request object, either of type RollbackNodePoolUpgradeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def rollback_node_pool_upgrade(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, name: nil, respect_pdb: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field.
  • 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/*.
  • respect_pdb (::Boolean) — Option for rollback to ignore the PodDisruptionBudget. Default value is false.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::RollbackNodePoolUpgradeRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_addons_config

def set_addons_config(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_addons_config(project_id: nil, zone: nil, cluster_id: nil, addons_config: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the addons for a specific cluster.

Overloads
def set_addons_config(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_addons_config via a request object, either of type SetAddonsConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_addons_config(project_id: nil, zone: nil, cluster_id: nil, addons_config: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • addons_config (::Google::Cloud::Container::V1beta1::AddonsConfig, ::Hash) — Required. The desired configurations for the various addons available to run in the cluster.
  • name (::String) — The name (project, location, cluster) of the cluster to set addons. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetAddonsConfigRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_labels

def set_labels(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_labels(project_id: nil, zone: nil, cluster_id: nil, resource_labels: nil, label_fingerprint: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets labels on a cluster.

Overloads
def set_labels(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_labels via a request object, either of type SetLabelsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_labels(project_id: nil, zone: nil, cluster_id: nil, resource_labels: nil, label_fingerprint: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  • resource_labels (::Hash{::String => ::String}) — Required. The labels to set for that cluster.
  • 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.
  • name (::String) — The name (project, location, cluster name) of the cluster to set labels. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetLabelsRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_legacy_abac

def set_legacy_abac(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_legacy_abac(project_id: nil, zone: nil, cluster_id: nil, enabled: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Enables or disables the ABAC authorization mechanism on a cluster.

Overloads
def set_legacy_abac(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_legacy_abac via a request object, either of type SetLegacyAbacRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_legacy_abac(project_id: nil, zone: nil, cluster_id: nil, enabled: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.
  • enabled (::Boolean) — Required. Whether ABAC authorization will be enabled in the cluster.
  • name (::String) — The name (project, location, cluster name) of the cluster to set legacy abac. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetLegacyAbacRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_locations

def set_locations(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_locations(project_id: nil, zone: nil, cluster_id: nil, locations: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.

Overloads
def set_locations(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_locations via a request object, either of type SetLocationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_locations(project_id: nil, zone: nil, cluster_id: nil, locations: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • locations (::Array<::String>) — Required. The desired list of Google Compute Engine zones 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.

  • name (::String) — The name (project, location, cluster) of the cluster to set locations. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetLocationsRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_logging_service

def set_logging_service(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_logging_service(project_id: nil, zone: nil, cluster_id: nil, logging_service: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the logging service for a specific cluster.

Overloads
def set_logging_service(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_logging_service via a request object, either of type SetLoggingServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_logging_service(project_id: nil, zone: nil, cluster_id: nil, logging_service: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • 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.

  • name (::String) — The name (project, location, cluster) of the cluster to set logging. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetLoggingServiceRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_maintenance_policy

def set_maintenance_policy(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_maintenance_policy(project_id: nil, zone: nil, cluster_id: nil, maintenance_policy: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the maintenance policy for a cluster.

Overloads
def set_maintenance_policy(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_maintenance_policy via a request object, either of type SetMaintenancePolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_maintenance_policy(project_id: nil, zone: nil, cluster_id: nil, maintenance_policy: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. The Google Developers Console project ID or project number.
  • zone (::String) — Required. The name of the Google Compute Engine zone in which the cluster resides.
  • cluster_id (::String) — Required. The name of the cluster to update.
  • maintenance_policy (::Google::Cloud::Container::V1beta1::MaintenancePolicy, ::Hash) — Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.
  • name (::String) — The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetMaintenancePolicyRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_master_auth

def set_master_auth(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_master_auth(project_id: nil, zone: nil, cluster_id: nil, action: nil, update: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.

Overloads
def set_master_auth(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_master_auth via a request object, either of type SetMasterAuthRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_master_auth(project_id: nil, zone: nil, cluster_id: nil, action: nil, update: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • action (::Google::Cloud::Container::V1beta1::SetMasterAuthRequest::Action) — Required. The exact form of action to be taken on the master auth.
  • update (::Google::Cloud::Container::V1beta1::MasterAuth, ::Hash) — Required. A description of the update.
  • name (::String) — The name (project, location, cluster) of the cluster to set auth. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetMasterAuthRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_monitoring_service

def set_monitoring_service(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_monitoring_service(project_id: nil, zone: nil, cluster_id: nil, monitoring_service: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the monitoring service for a specific cluster.

Overloads
def set_monitoring_service(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_monitoring_service via a request object, either of type SetMonitoringServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_monitoring_service(project_id: nil, zone: nil, cluster_id: nil, monitoring_service: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • 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.

  • name (::String) — The name (project, location, cluster) of the cluster to set monitoring. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetMonitoringServiceRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_network_policy

def set_network_policy(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_network_policy(project_id: nil, zone: nil, cluster_id: nil, network_policy: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Enables or disables Network Policy for a cluster.

Overloads
def set_network_policy(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_network_policy via a request object, either of type SetNetworkPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_network_policy(project_id: nil, zone: nil, cluster_id: nil, network_policy: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  • network_policy (::Google::Cloud::Container::V1beta1::NetworkPolicy, ::Hash) — Required. Configuration options for the NetworkPolicy feature.
  • name (::String) — The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetNetworkPolicyRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_node_pool_autoscaling

def set_node_pool_autoscaling(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_node_pool_autoscaling(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, autoscaling: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the autoscaling settings of a specific node pool.

Overloads
def set_node_pool_autoscaling(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_node_pool_autoscaling via a request object, either of type SetNodePoolAutoscalingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_node_pool_autoscaling(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, autoscaling: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.
  • autoscaling (::Google::Cloud::Container::V1beta1::NodePoolAutoscaling, ::Hash) — Required. Autoscaling configuration for the node pool.
  • 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/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetNodePoolAutoscalingRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_node_pool_management

def set_node_pool_management(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_node_pool_management(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, management: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Sets the NodeManagement options for a node pool.

Overloads
def set_node_pool_management(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_node_pool_management via a request object, either of type SetNodePoolManagementRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_node_pool_management(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, management: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.
  • management (::Google::Cloud::Container::V1beta1::NodeManagement, ::Hash) — Required. NodeManagement configuration for the node pool.
  • 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/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetNodePoolManagementRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#set_node_pool_size

def set_node_pool_size(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def set_node_pool_size(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_count: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

SetNodePoolSizeRequest sets the size of a node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.

Overloads
def set_node_pool_size(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to set_node_pool_size via a request object, either of type SetNodePoolSizeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_node_pool_size(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_count: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.
  • node_count (::Integer) — Required. The desired node count for the pool.
  • 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/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::SetNodePoolSizeRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#start_ip_rotation

def start_ip_rotation(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def start_ip_rotation(project_id: nil, zone: nil, cluster_id: nil, name: nil, rotate_credentials: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Starts master IP rotation.

Overloads
def start_ip_rotation(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to start_ip_rotation via a request object, either of type StartIPRotationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def start_ip_rotation(project_id: nil, zone: nil, cluster_id: nil, name: nil, rotate_credentials: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  • name (::String) — The name (project, location, cluster name) of the cluster to start IP rotation. Specified in the format projects/*/locations/*/clusters/*.
  • rotate_credentials (::Boolean) — Whether to rotate credentials during IP rotation.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::StartIPRotationRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_cluster

def update_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def update_cluster(project_id: nil, zone: nil, cluster_id: nil, update: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Updates the settings for a specific cluster.

Overloads
def update_cluster(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to update_cluster via a request object, either of type UpdateClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_cluster(project_id: nil, zone: nil, cluster_id: nil, update: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • update (::Google::Cloud::Container::V1beta1::ClusterUpdate, ::Hash) — Required. A description of the update.
  • name (::String) — The name (project, location, cluster) of the cluster to update. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::UpdateClusterRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#update_master

def update_master(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def update_master(project_id: nil, zone: nil, cluster_id: nil, master_version: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Updates the master for a specific cluster.

Overloads
def update_master(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to update_master via a request object, either of type UpdateMasterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_master(project_id: nil, zone: nil, cluster_id: nil, master_version: nil, name: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • 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
  • name (::String) — The name (project, location, cluster) of the cluster to update. Specified in the format projects/*/locations/*/clusters/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::UpdateMasterRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result

#update_node_pool

def update_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
def update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil) -> ::Google::Cloud::Container::V1beta1::Operation

Updates the version and/or image type of a specific node pool.

Overloads
def update_node_pool(request, options = nil) -> ::Google::Cloud::Container::V1beta1::Operation
Pass arguments to update_node_pool via a request object, either of type UpdateNodePoolRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Container::V1beta1::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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, node_network_config: nil, gcfs_config: nil, confidential_nodes: nil, gvnic: nil, etag: nil, fast_socket: nil, logging_config: nil, resource_labels: nil, windows_node_config: nil, machine_type: nil, disk_type: nil, disk_size_gb: nil, resource_manager_tags: nil) -> ::Google::Cloud::Container::V1beta1::Operation
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).
Parameters
  • project_id (::String) — Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.
  • zone (::String) — Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.
  • cluster_id (::String) — Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  • node_pool_id (::String) — Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.
  • 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
  • image_type (::String) — Required. The desired image type for the node pool. Please see https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for available image types.
  • locations (::Array<::String>) — The desired list of Google Compute Engine zones 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.
  • workload_metadata_config (::Google::Cloud::Container::V1beta1::WorkloadMetadataConfig, ::Hash) — The desired workload metadata config for the node pool.
  • name (::String) — The name (project, location, cluster, node pool) of the node pool to update. Specified in the format projects/*/locations/*/clusters/*/nodePools/*.
  • upgrade_settings (::Google::Cloud::Container::V1beta1::NodePool::UpgradeSettings, ::Hash) — Upgrade settings control disruption and speed of the upgrade.
  • tags (::Google::Cloud::Container::V1beta1::NetworkTags, ::Hash) — The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be replaced with the provided tags.
  • taints (::Google::Cloud::Container::V1beta1::NodeTaints, ::Hash) — The desired node taints to be applied to all nodes in the node pool. If this field is not present, the taints will not be changed. Otherwise, the existing node taints will be replaced with the provided taints.
  • labels (::Google::Cloud::Container::V1beta1::NodeLabels, ::Hash) — The desired node labels to be applied to all nodes in the node pool. If this field is not present, the labels will not be changed. Otherwise, the existing node labels will be replaced with the provided labels.
  • linux_node_config (::Google::Cloud::Container::V1beta1::LinuxNodeConfig, ::Hash) — Parameters that can be configured on Linux nodes.
  • kubelet_config (::Google::Cloud::Container::V1beta1::NodeKubeletConfig, ::Hash) — Node kubelet configs.
  • node_network_config (::Google::Cloud::Container::V1beta1::NodeNetworkConfig, ::Hash) — Node network config.
  • gcfs_config (::Google::Cloud::Container::V1beta1::GcfsConfig, ::Hash) — GCFS config.
  • confidential_nodes (::Google::Cloud::Container::V1beta1::ConfidentialNodes, ::Hash) — Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled.
  • gvnic (::Google::Cloud::Container::V1beta1::VirtualNIC, ::Hash) — Enable or disable gvnic on the node pool.
  • etag (::String) — The current etag of the node pool. If an etag is provided and does not match the current etag of the node pool, update will be blocked and an ABORTED error will be returned.
  • fast_socket (::Google::Cloud::Container::V1beta1::FastSocket, ::Hash) — Enable or disable NCCL fast socket for the node pool.
  • logging_config (::Google::Cloud::Container::V1beta1::NodePoolLoggingConfig, ::Hash) — Logging configuration.
  • resource_labels (::Google::Cloud::Container::V1beta1::ResourceLabels, ::Hash) — The resource labels for the node pool to use to annotate any related Google Compute Engine resources.
  • windows_node_config (::Google::Cloud::Container::V1beta1::WindowsNodeConfig, ::Hash) — Parameters that can be configured on Windows nodes.
  • machine_type (::String) — Optional. The desired machine type for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified machine type.
  • disk_type (::String) — Optional. The desired disk type for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk type.
  • disk_size_gb (::Integer) — Optional. The desired disk size for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk size.
  • resource_manager_tags (::Google::Cloud::Container::V1beta1::ResourceManagerTags, ::Hash) — Desired resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Existing tags will be replaced with new values.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/container/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new

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

# The returned object is of type Google::Cloud::Container::V1beta1::Operation.
p result