Kubernetes Engine V1beta1 API - Class Google::Cloud::Container::V1beta1::ClusterManager::Client (v0.11.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

#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