ClusterManagerClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.container_v1beta1.services.cluster_manager.transports.base.ClusterManagerTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Google Kubernetes Engine Cluster Manager v1beta1
Properties
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
ClusterManagerTransport | The transport used by the client instance. |
Methods
ClusterManagerClient
ClusterManagerClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.container_v1beta1.services.cluster_manager.transports.base.ClusterManagerTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the cluster manager client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str, ClusterManagerTransport]
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. It won't take effect if a |
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 |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)
Releases underlying transport's resources.
cancel_operation
cancel_operation(request: Optional[Union[google.cloud.container_v1beta1.types.cluster_service.CancelOperationRequest, dict]] = None, *, project_id: Optional[str] = None, zone: Optional[str] = None, operation_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Cancels the specified operation.
from google.cloud import container_v1beta1
def sample_cancel_operation():
# Create a client
client = container_v1beta1.ClusterManagerClient()
# Initialize request argument(s)
request = container_v1beta1.CancelOperationRequest(
project_id="project_id_value",
zone="zone_value",
operation_id="operation_id_value",
)
# Make the request
client.cancel_operation(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.container_v1beta1.types.CancelOperationRequest, dict]
The request object. CancelOperationRequest cancels a single operation. |
project_id |
str
Required. Deprecated. The Google Developers Console |
zone |
str
Required. Deprecated. The name of the Google Compute Engine |
operation_id |
str
Required. Deprecated. The server-assigned |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
common_billing_account_path
common_billing_account_path(billing_account: str)
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str)
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str)
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str)
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str)
Returns a fully-qualified project string.
complete_ip_rotation
complete_ip_rotation(request: Optional[Union[google.cloud.container_v1beta1.types.cluster_service.CompleteIPRotationRequest, dict]] = None, *, project_id: Optional[str] = None, zone: Optional[str] = None, cluster_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Completes master IP rotation.
from google.cloud import container_v1beta1
def sample_complete_ip_rotation():
# Create a client
client = container_v1beta1.ClusterManagerClient()
# Initialize request argument(s)
request = container_v1beta1.CompleteIPRotationRequest(
project_id="project_id_value",
zone="zone_value",
cluster_id="cluster_id_value",
)
# Make the request
response = client.complete_ip_rotation(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.container_v1beta1.types.CompleteIPRotationRequest, dict]
The request object. CompleteIPRotationRequest moves the cluster master back into single-IP mode. |
project_id |
str
Required. Deprecated. The Google Developers Console |
zone |
str
Required. Deprecated. The name of the Google Compute Engine |
cluster_id |
str
Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.container_v1beta1.types.Operation | This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only. |
complete_node_pool_upgrade
complete_node_pool_upgrade(request: Optional[Union[google.cloud.container_v1beta1.types.cluster_service.CompleteNodePoolUpgradeRequest, dict]] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
from google.cloud import container_v1beta1
def sample_complete_node_pool_upgrade():
# Create a client
client = container_v1beta1.ClusterManagerClient()
# Initialize request argument(s)
request = container_v1beta1.CompleteNodePoolUpgradeRequest(
)
# Make the request
client.complete_node_pool_upgrade(request=request)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.container_v1beta1.types.CompleteNodePoolUpgradeRequest, dict]
The request object. CompleteNodePoolUpgradeRequest sets the name of target node pool to complete upgrade. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
create_cluster
create_cluster(request: Optional[Union[google.cloud.container_v1beta1.types.cluster_service.CreateClusterRequest, dict]] = None, *, project_id: Optional[str] = None, zone: Optional[str] = None, cluster: Optional[google.cloud.container_v1beta1.types.cluster_service.Cluster] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
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 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.
from google.cloud import container_v1beta1
def sample_create_cluster():
# Create a client
client = container_v1beta1.ClusterManagerClient()
# Initialize request argument(s)
request = container_v1beta1.CreateClusterRequest(
project_id="project_id_value",
zone="zone_value",
)
# Make the request
response = client.create_cluster(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Union[google.cloud.container_v1beta1.types.CreateClusterRequest, dict]
The request object. CreateClusterRequest creates a cluster. |
project_id |
str
Required. Deprecated. The Google Developers Console |
zone |
str
Required. Deprecated. The name of the Google Compute Engine |
cluster |
google.cloud.container_v1beta1.types.Cluster
Required. A |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |