Class ClusterManagerClient (0.3.0)

ClusterManagerClient(
    transport=None,
    channel=None,
    credentials=None,
    client_config=None,
    client_info=None,
    client_options=None,
)

Google Kubernetes Engine Cluster Manager v1

Methods

ClusterManagerClient

ClusterManagerClient(
    transport=None,
    channel=None,
    credentials=None,
    client_config=None,
    client_info=None,
    client_options=None,
)

Constructor.

Parameters
NameDescription
channel grpc.Channel

DEPRECATED. A Channel instance through which to make calls. This argument is mutually exclusive with credentials; providing both will raise an exception.

credentials google.auth.credentials.Credentials

The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. This argument is mutually exclusive with providing a transport instance to transport; doing so will raise an exception.

client_config dict

DEPRECATED. A dictionary of call options for each method. If not specified, the default configuration is used.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

client_options Union[dict, google.api_core.client_options.ClientOptions]

Client options used to set user options on the client. API Endpoint should be set through client_options.

cancel_operation

cancel_operation(project_id, zone, operation_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Cancels the specified operation.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize operation_id:

operation_id = ''

client.cancel_operation(project_id, zone, operation_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the operation resides. This field has been deprecated and replaced by the name field.

operation_id str

Deprecated. The server-assigned name of the operation. This field has been deprecated and replaced by the name field.

name str

The name (project, location, operation id) of the operation to cancel. Specified in the format 'projects//locations//operations/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

complete_i_p_rotation

complete_i_p_rotation(project_id, zone, cluster_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Completes master IP rotation.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

response = client.complete_i_p_rotation(project_id, zone, cluster_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster id) of the cluster to complete IP rotation. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

create_cluster

create_cluster(project_id, zone, cluster, parent=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

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 <https://cloud.google.com/compute/docs/networks-and-firewalls#networks>__.

One firewall is added for the cluster. After cluster creation, the cluster 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 is being used by the cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster:

cluster = {}

response = client.create_cluster(project_id, zone, cluster)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the parent field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the parent field.

cluster Union[dict, Cluster]

A cluster resource https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters__ If a dict is provided, it must be of the same form as the protobuf message Cluster

parent str

The parent (project and location) where the cluster will be created. Specified in the format 'projects//locations/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

create_node_pool

create_node_pool(project_id, zone, cluster_id, node_pool, parent=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Creates a node pool for a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool:

node_pool = {}

response = client.create_node_pool(project_id, zone, cluster_id, node_pool)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the parent field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the parent field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.

node_pool Union[dict, NodePool]

The node pool to create. If a dict is provided, it must be of the same form as the protobuf message NodePool

parent str

The parent (project, location, cluster id) where the node pool will be created. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

delete_cluster

delete_cluster(project_id, zone, cluster_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

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 (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

response = client.delete_cluster(project_id, zone, cluster_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster) of the cluster to delete. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

delete_node_pool

delete_node_pool(project_id, zone, cluster_id, node_pool_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Deletes a node pool from a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

response = client.delete_node_pool(project_id, zone, cluster_id, node_pool_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

from_service_account_file

from_service_account_file(filename, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
ClusterManagerClientThe constructed client.

from_service_account_json

from_service_account_json(filename, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
ClusterManagerClientThe constructed client.

get_cluster

get_cluster(project_id, zone, cluster_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Gets the details of a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

response = client.get_cluster(project_id, zone, cluster_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster) of the cluster to retrieve. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

get_node_pool

get_node_pool(project_id, zone, cluster_id, node_pool_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Retrieves the node pool requested.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

response = client.get_node_pool(project_id, zone, cluster_id, node_pool_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

get_operation

get_operation(project_id, zone, operation_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Gets the specified operation.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize operation_id:

operation_id = ''

response = client.get_operation(project_id, zone, operation_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

operation_id str

Deprecated. The server-assigned name of the operation. This field has been deprecated and replaced by the name field.

name str

The name (project, location, operation id) of the operation to get. Specified in the format 'projects//locations//operations/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

get_server_config

get_server_config(project_id, zone, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Returns configuration info about the Kubernetes Engine service.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

response = client.get_server_config(project_id, zone)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ to return operations for. This field has been deprecated and replaced by the name field.

name str

The name (project and location) of the server config to get Specified in the format 'projects//locations/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

list_clusters

list_clusters(project_id, zone, parent=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

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

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

response = client.list_clusters(project_id, zone)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the parent field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field.

parent str

The parent (project and location) where the clusters will be listed. Specified in the format 'projects//locations/'. Location "-" matches all zones and all regions.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

list_node_pools

list_node_pools(project_id, zone, cluster_id, parent=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Lists the node pools for a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

response = client.list_node_pools(project_id, zone, cluster_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the parent field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the parent field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.

parent str

The parent (project, location, cluster id) where the node pools will be listed. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

list_operations

list_operations(project_id, zone, parent=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Lists all operations in a project in a specific zone or all zones.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

response = client.list_operations(project_id, zone)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the parent field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ to return operations for, or - for all zones. This field has been deprecated and replaced by the parent field.

parent str

The parent (project and location) where the operations will be listed. Specified in the format 'projects//locations/'. Location "-" matches all zones and all regions.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

rollback_node_pool_upgrade

rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Roll back the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade successfully completed.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

response = client.rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_addons_config

set_addons_config(project_id, zone, cluster_id, addons_config, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the addons for a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize addons_config:

addons_config = {}

response = client.set_addons_config(project_id, zone, cluster_id, addons_config)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

addons_config Union[dict, AddonsConfig]

The desired configurations for the various addons available to run in the cluster. If a dict is provided, it must be of the same form as the protobuf message AddonsConfig

name str

The name (project, location, cluster) of the cluster to set addons. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_labels

set_labels(project_id, zone, cluster_id, resource_labels, label_fingerprint, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets labels on a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize resource_labels:

resource_labels = {}

TODO: Initialize label_fingerprint:

label_fingerprint = ''

response = client.set_labels(project_id, zone, cluster_id, resource_labels, label_fingerprint)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

resource_labels dict[str -> str]

The labels to set for that cluster.

label_fingerprint str

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 str

The name (project, location, cluster id) of the cluster to set labels. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_legacy_abac

set_legacy_abac(project_id, zone, cluster_id, enabled, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Enables or disables the ABAC authorization mechanism on a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize enabled:

enabled = False

response = client.set_legacy_abac(project_id, zone, cluster_id, enabled)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

enabled bool

Whether ABAC authorization will be enabled in the cluster.

name str

The name (project, location, cluster id) of the cluster to set legacy abac. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_locations

set_locations(project_id, zone, cluster_id, locations, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the locations for a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize locations:

locations = []

response = client.set_locations(project_id, zone, cluster_id, locations)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

locations list[str]

The desired list of Google Compute Engine locations https://cloud.google.com/compute/docs/zones#available__ in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed. This list must always include the cluster's primary zone.

name str

The name (project, location, cluster) of the cluster to set locations. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_logging_service

set_logging_service(project_id, zone, cluster_id, logging_service, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the logging service for a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize logging_service:

logging_service = ''

response = client.set_logging_service(project_id, zone, cluster_id, logging_service)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

logging_service str

The logging service the cluster should use to write metrics. Currently available options: - "logging.googleapis.com" - the Google Cloud Logging service - "none" - no metrics will be exported from the cluster

name str

The name (project, location, cluster) of the cluster to set logging. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_maintenance_policy

set_maintenance_policy(project_id, zone, cluster_id, maintenance_policy, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the maintenance policy for a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize maintenance_policy:

maintenance_policy = {}

response = client.set_maintenance_policy(project_id, zone, cluster_id, maintenance_policy)

Parameters
NameDescription
project_id str

The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__.

zone str

The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides.

cluster_id str

The name of the cluster to update.

maintenance_policy Union[dict, MaintenancePolicy]

The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy. If a dict is provided, it must be of the same form as the protobuf message MaintenancePolicy

name str

The name (project, location, cluster id) of the cluster to set maintenance policy. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_master_auth

set_master_auth(project_id, zone, cluster_id, action, update, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Used to set master auth materials. Currently supports :- Changing the admin password for a specific cluster. This can be either via password generation or explicitly set the password.

.. rubric:: Example

from google.cloud import container_v1 from google.cloud.container_v1 import enums

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize action:

action = enums.SetMasterAuthRequest.Action.UNKNOWN

TODO: Initialize update:

update = {}

response = client.set_master_auth(project_id, zone, cluster_id, action, update)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

action Action

The exact form of action to be taken on the master auth.

update Union[dict, MasterAuth]

A description of the update. If a dict is provided, it must be of the same form as the protobuf message MasterAuth

name str

The name (project, location, cluster) of the cluster to set auth. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_monitoring_service

set_monitoring_service(project_id, zone, cluster_id, monitoring_service, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the monitoring service for a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize monitoring_service:

monitoring_service = ''

response = client.set_monitoring_service(project_id, zone, cluster_id, monitoring_service)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

monitoring_service str

The monitoring service the cluster should use to write metrics. Currently available options: - "monitoring.googleapis.com" - the Google Cloud Monitoring service - "none" - no metrics will be exported from the cluster

name str

The name (project, location, cluster) of the cluster to set monitoring. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_network_policy

set_network_policy(project_id, zone, cluster_id, network_policy, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Enables/Disables Network Policy for a cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize network_policy:

network_policy = {}

response = client.set_network_policy(project_id, zone, cluster_id, network_policy)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

network_policy Union[dict, NetworkPolicy]

Configuration options for the NetworkPolicy feature. If a dict is provided, it must be of the same form as the protobuf message NetworkPolicy

name str

The name (project, location, cluster id) of the cluster to set networking policy. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_node_pool_autoscaling

set_node_pool_autoscaling(project_id, zone, cluster_id, node_pool_id, autoscaling, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the autoscaling settings for a specific node pool.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

TODO: Initialize autoscaling:

autoscaling = {}

response = client.set_node_pool_autoscaling(project_id, zone, cluster_id, node_pool_id, autoscaling)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.

autoscaling Union[dict, NodePoolAutoscaling]

Autoscaling configuration for the node pool. If a dict is provided, it must be of the same form as the protobuf message NodePoolAutoscaling

name str

The name (project, location, cluster, node pool) of the node pool to set autoscaler settings. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_node_pool_management

set_node_pool_management(project_id, zone, cluster_id, node_pool_id, management, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the NodeManagement options for a node pool.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

TODO: Initialize management:

management = {}

response = client.set_node_pool_management(project_id, zone, cluster_id, node_pool_id, management)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.

management Union[dict, NodeManagement]

NodeManagement configuration for the node pool. If a dict is provided, it must be of the same form as the protobuf message NodeManagement

name str

The name (project, location, cluster, node pool id) of the node pool to set management properties. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

set_node_pool_size

set_node_pool_size(project_id, zone, cluster_id, node_pool_id, node_count, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Sets the size for a specific node pool.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

TODO: Initialize node_count:

node_count = 0

response = client.set_node_pool_size(project_id, zone, cluster_id, node_pool_id, node_count)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.

node_count int

The desired node count for the pool.

name str

The name (project, location, cluster, node pool id) of the node pool to set size. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

start_i_p_rotation

start_i_p_rotation(project_id, zone, cluster_id, name=None, rotate_credentials=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Start master IP rotation.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

response = client.start_i_p_rotation(project_id, zone, cluster_id)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://developers.google.com/console/help/new/#projectnumber__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

name str

The name (project, location, cluster id) of the cluster to start IP rotation. Specified in the format 'projects//locations//clusters/*'.

rotate_credentials bool

Whether to rotate credentials during IP rotation.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

update_cluster

update_cluster(project_id, zone, cluster_id, update, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Updates the settings of a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize update:

update = {}

response = client.update_cluster(project_id, zone, cluster_id, update)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

update Union[dict, ClusterUpdate]

A description of the update. If a dict is provided, it must be of the same form as the protobuf message ClusterUpdate

name str

The name (project, location, cluster) of the cluster to update. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

update_master

update_master(project_id, zone, cluster_id, master_version, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

Updates the master for a specific cluster.

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize master_version:

master_version = ''

response = client.update_master(project_id, zone, cluster_id, master_version)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

master_version str

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 str

The name (project, location, cluster) of the cluster to update. Specified in the format 'projects//locations//clusters/*'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.

update_node_pool

update_node_pool(project_id, zone, cluster_id, node_pool_id, node_version, image_type, name=None, retry=<_MethodDefault._DEFAULT_VALUE: <object object>>, timeout=<_MethodDefault._DEFAULT_VALUE: <object object>>, metadata=None)

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

.. rubric:: Example

from google.cloud import container_v1

client = container_v1.ClusterManagerClient()

TODO: Initialize project_id:

project_id = ''

TODO: Initialize zone:

zone = ''

TODO: Initialize cluster_id:

cluster_id = ''

TODO: Initialize node_pool_id:

node_pool_id = ''

TODO: Initialize node_version:

node_version = ''

TODO: Initialize image_type:

image_type = ''

response = client.update_node_pool(project_id, zone, cluster_id, node_pool_id, node_version, image_type)

Parameters
NameDescription
project_id str

Deprecated. The Google Developers Console project ID or project number https://support.google.com/cloud/answer/6158840__. This field has been deprecated and replaced by the name field.

zone str

Deprecated. The name of the Google Compute Engine zone https://cloud.google.com/compute/docs/zones#available__ in which the cluster resides. This field has been deprecated and replaced by the name field.

cluster_id str

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

node_pool_id str

Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.

node_version str

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 str

The desired image type for the node pool.

name str

The name (project, location, cluster, node pool) of the node pool to update. Specified in the format 'projects//locations//clusters//nodePools/'.

retry Optional[google.api_core.retry.Retry]

A retry object used to retry requests. If None is specified, requests will not be retried.

timeout Optional[float]

The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

metadata Optional[Sequence[Tuple[str, str]]]

Additional metadata that is provided to the method.

Exceptions
TypeDescription
google.api_core.exceptions.GoogleAPICallErrorIf the request failed for any reason.
google.api_core.exceptions.RetryErrorIf the request failed due to a retryable error and retry attempts failed.
ValueErrorIf the parameters are invalid.