Class EdgeContainerClient (0.5.14)

EdgeContainerClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport, typing.Callable[[...], google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

EdgeContainer API provides management of Kubernetes Clusters on Google Edge Cloud deployments.

Properties

api_endpoint

Return the API endpoint used by the client instance.

Returns
Type Description
str The API endpoint used by the client instance.

transport

Returns the transport used by the client instance.

Returns
Type Description
EdgeContainerTransport The transport used by the client instance.

universe_domain

Return the universe domain used by the client instance.

Returns
Type Description
str The universe domain used by the client instance.

Methods

EdgeContainerClient

EdgeContainerClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport, typing.Callable[[...], google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiates the edge container 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 Optional[Union[str,EdgeContainerTransport,Callable[..., EdgeContainerTransport]]]

The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the EdgeContainerTransport constructor. If set to None, a transport is chosen automatically.

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

Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

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.

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: typing.Optional[
        google.longrunning.operations_pb2.CancelOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.CancelOperationRequest

The request object. Request message for CancelOperation method.

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.

cluster_path

cluster_path(project: str, location: str, cluster: str) -> str

Returns a fully-qualified cluster string.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

create_cluster

create_cluster(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.CreateClusterRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    cluster: typing.Optional[
        google.cloud.edgecontainer_v1.types.resources.Cluster
    ] = None,
    cluster_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a new Cluster in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_create_cluster():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    cluster = edgecontainer_v1.Cluster()
    cluster.name = "name_value"
    cluster.fleet.project = "project_value"
    cluster.networking.cluster_ipv4_cidr_blocks = ['cluster_ipv4_cidr_blocks_value1', 'cluster_ipv4_cidr_blocks_value2']
    cluster.networking.services_ipv4_cidr_blocks = ['services_ipv4_cidr_blocks_value1', 'services_ipv4_cidr_blocks_value2']
    cluster.authorization.admin_users.username = "username_value"

    request = edgecontainer_v1.CreateClusterRequest(
        parent="parent_value",
        cluster_id="cluster_id_value",
        cluster=cluster,
    )

    # Make the request
    operation = client.create_cluster(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.CreateClusterRequest, dict]

The request object. Creates a cluster.

parent str

Required. The parent location where this cluster will be created. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

cluster google.cloud.edgecontainer_v1.types.Cluster

Required. The cluster to create. This corresponds to the cluster field on the request instance; if request is provided, this should not be set.

cluster_id str

Required. A client-specified unique identifier for the cluster. This corresponds to the cluster_id field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Cluster A Google Distributed Cloud Edge Kubernetes cluster.

create_node_pool

create_node_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.CreateNodePoolRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    node_pool: typing.Optional[
        google.cloud.edgecontainer_v1.types.resources.NodePool
    ] = None,
    node_pool_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a new NodePool in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_create_node_pool():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    node_pool = edgecontainer_v1.NodePool()
    node_pool.name = "name_value"
    node_pool.node_count = 1070

    request = edgecontainer_v1.CreateNodePoolRequest(
        parent="parent_value",
        node_pool_id="node_pool_id_value",
        node_pool=node_pool,
    )

    # Make the request
    operation = client.create_node_pool(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.CreateNodePoolRequest, dict]

The request object. Creates a node pool.

parent str

Required. The parent cluster where this node pool will be created. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

node_pool google.cloud.edgecontainer_v1.types.NodePool

Required. The node pool to create. This corresponds to the node_pool field on the request instance; if request is provided, this should not be set.

node_pool_id str

Required. A client-specified unique identifier for the node pool. This corresponds to the node_pool_id field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be NodePool A set of Kubernetes nodes in a cluster with common configuration and specification.

create_vpn_connection

create_vpn_connection(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.CreateVpnConnectionRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    vpn_connection: typing.Optional[
        google.cloud.edgecontainer_v1.types.resources.VpnConnection
    ] = None,
    vpn_connection_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a new VPN connection in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_create_vpn_connection():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    vpn_connection = edgecontainer_v1.VpnConnection()
    vpn_connection.name = "name_value"

    request = edgecontainer_v1.CreateVpnConnectionRequest(
        parent="parent_value",
        vpn_connection_id="vpn_connection_id_value",
        vpn_connection=vpn_connection,
    )

    # Make the request
    operation = client.create_vpn_connection(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.CreateVpnConnectionRequest, dict]

The request object. Creates a VPN connection.

parent str

Required. The parent location where this vpn connection will be created. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

vpn_connection google.cloud.edgecontainer_v1.types.VpnConnection

Required. The VPN connection to create. This corresponds to the vpn_connection field on the request instance; if request is provided, this should not be set.

vpn_connection_id str

Required. The VPN connection identifier. This corresponds to the vpn_connection_id field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be VpnConnection A VPN connection .

crypto_key_path

crypto_key_path(project: str, location: str, key_ring: str, crypto_key: str) -> str

Returns a fully-qualified crypto_key string.

crypto_key_version_path

crypto_key_version_path(
    project: str, location: str, key_ring: str, crypto_key: str, crypto_key_version: str
) -> str

Returns a fully-qualified crypto_key_version string.

delete_cluster

delete_cluster(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.DeleteClusterRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single Cluster.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_delete_cluster():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.DeleteClusterRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_cluster(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.DeleteClusterRequest, dict]

The request object. Deletes a cluster.

name str

Required. The resource name of the cluster. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_node_pool

delete_node_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.DeleteNodePoolRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single NodePool.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_delete_node_pool():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.DeleteNodePoolRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_node_pool(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.DeleteNodePoolRequest, dict]

The request object. Deletes a node pool.

name str

Required. The resource name of the node pool. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_operation

delete_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.DeleteOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.DeleteOperationRequest

The request object. Request message for DeleteOperation method.

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.

delete_vpn_connection

delete_vpn_connection(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.DeleteVpnConnectionRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes a single VPN connection.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_delete_vpn_connection():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.DeleteVpnConnectionRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_vpn_connection(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.DeleteVpnConnectionRequest, dict]

The request object. Deletes a vpn connection.

name str

Required. The resource name of the vpn connection. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

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

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
EdgeContainerClient The constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

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

Parameter
Name Description
info dict

The service account private key info.

Returns
Type Description
EdgeContainerClient The constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

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

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
EdgeContainerClient The constructed client.

generate_access_token

generate_access_token(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GenerateAccessTokenRequest, dict
        ]
    ] = None,
    *,
    cluster: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.service.GenerateAccessTokenResponse

Generates an access token for a Cluster.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_generate_access_token():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GenerateAccessTokenRequest(
        cluster="cluster_value",
    )

    # Make the request
    response = client.generate_access_token(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GenerateAccessTokenRequest, dict]

The request object. Generates an access token for a cluster.

cluster str

Required. The resource name of the cluster. This corresponds to the cluster field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.GenerateAccessTokenResponse An access token for a cluster.

generate_offline_credential

generate_offline_credential(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GenerateOfflineCredentialRequest,
            dict,
        ]
    ] = None,
    *,
    cluster: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.service.GenerateOfflineCredentialResponse

Generates an offline credential for a Cluster.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_generate_offline_credential():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GenerateOfflineCredentialRequest(
        cluster="cluster_value",
    )

    # Make the request
    response = client.generate_offline_credential(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GenerateOfflineCredentialRequest, dict]

The request object. Generates an offline credential(offline) for a cluster.

cluster str

Required. The resource name of the cluster. This corresponds to the cluster field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.GenerateOfflineCredentialResponse An offline credential for a cluster.

get_cluster

get_cluster(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GetClusterRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.resources.Cluster

Gets details of a single Cluster.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_get_cluster():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GetClusterRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_cluster(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GetClusterRequest, dict]

The request object. Gets a cluster.

name str

Required. The resource name of the cluster. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.Cluster A Google Distributed Cloud Edge Kubernetes cluster.

get_location

get_location(
    request: typing.Optional[
        google.cloud.location.locations_pb2.GetLocationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
Name Description
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

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
.location_pb2.Location Location object.

get_machine

get_machine(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GetMachineRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.resources.Machine

Gets details of a single Machine.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_get_machine():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GetMachineRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_machine(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GetMachineRequest, dict]

The request object. Gets a machine.

name str

Required. The resource name of the machine. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.Machine A Google Distributed Cloud Edge machine capable of acting as a Kubernetes node.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Deprecated. Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
Name Description
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If any errors happen.
Returns
Type Description
Tuple[str, Callable[[], Tuple[bytes, bytes]]] returns the API endpoint and the client cert source to use.

get_node_pool

get_node_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GetNodePoolRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.resources.NodePool

Gets details of a single NodePool.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_get_node_pool():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GetNodePoolRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_node_pool(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GetNodePoolRequest, dict]

The request object. Gets a node pool.

name str

Required. The resource name of the node pool. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.NodePool A set of Kubernetes nodes in a cluster with common configuration and specification.

get_operation

get_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.GetOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.longrunning.operations_pb2.Operation

Gets the latest state of a long-running operation.

Parameters
Name Description
request .operations_pb2.GetOperationRequest

The request object. Request message for GetOperation method.

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
.operations_pb2.Operation An Operation object.

get_server_config

get_server_config(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GetServerConfigRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.resources.ServerConfig

Gets the server config.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_get_server_config():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GetServerConfigRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_server_config(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GetServerConfigRequest, dict]

The request object. Gets the server config.

name str

Required. The name (project and location) of the server config to get, specified in the format projects//locations/. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.ServerConfig Server configuration for supported versions and release channels.

get_vpn_connection

get_vpn_connection(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.GetVpnConnectionRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.types.resources.VpnConnection

Gets details of a single VPN connection.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_get_vpn_connection():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.GetVpnConnectionRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_vpn_connection(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.GetVpnConnectionRequest, dict]

The request object. Gets a VPN connection.

name str

Required. The resource name of the vpn connection. This corresponds to the name field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.types.VpnConnection A VPN connection .

list_clusters

list_clusters(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.ListClustersRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.services.edge_container.pagers.ListClustersPager

Lists Clusters in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_list_clusters():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.ListClustersRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_clusters(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.ListClustersRequest, dict]

The request object. Lists clusters in a location.

parent str

Required. The parent location, which owns this collection of clusters. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.services.edge_container.pagers.ListClustersPager List of clusters in a location. Iterating over this object will yield results and resolve additional pages automatically.

list_locations

list_locations(
    request: typing.Optional[
        google.cloud.location.locations_pb2.ListLocationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
Name Description
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

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
.location_pb2.ListLocationsResponse Response message for ListLocations method.

list_machines

list_machines(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.ListMachinesRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.services.edge_container.pagers.ListMachinesPager

Lists Machines in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_list_machines():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.ListMachinesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_machines(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.ListMachinesRequest, dict]

The request object. Lists machines in a site.

parent str

Required. The parent site, which owns this collection of machines. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.services.edge_container.pagers.ListMachinesPager List of machines in a site. Iterating over this object will yield results and resolve additional pages automatically.

list_node_pools

list_node_pools(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.ListNodePoolsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.edgecontainer_v1.services.edge_container.pagers.ListNodePoolsPager

Lists NodePools in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_list_node_pools():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.ListNodePoolsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_node_pools(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.ListNodePoolsRequest, dict]

The request object. Lists node pools in a cluster.

parent str

Required. The parent cluster, which owns this collection of node pools. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.services.edge_container.pagers.ListNodePoolsPager List of node pools in a cluster. Iterating over this object will yield results and resolve additional pages automatically.

list_operations

list_operations(
    request: typing.Optional[
        google.longrunning.operations_pb2.ListOperationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse

Lists operations that match the specified filter in the request.

Parameters
Name Description
request .operations_pb2.ListOperationsRequest

The request object. Request message for ListOperations method.

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
.operations_pb2.ListOperationsResponse Response message for ListOperations method.

list_vpn_connections

list_vpn_connections(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.ListVpnConnectionsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
    google.cloud.edgecontainer_v1.services.edge_container.pagers.ListVpnConnectionsPager
)

Lists VPN connections in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_list_vpn_connections():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.ListVpnConnectionsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_vpn_connections(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.ListVpnConnectionsRequest, dict]

The request object. Lists VPN connections.

parent str

Required. The parent location, which owns this collection of VPN connections. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

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.edgecontainer_v1.services.edge_container.pagers.ListVpnConnectionsPager List of VPN connections in a location. Iterating over this object will yield results and resolve additional pages automatically.

machine_path

machine_path(project: str, location: str, machine: str) -> str

Returns a fully-qualified machine string.

node_pool_path

node_pool_path(project: str, location: str, cluster: str, node_pool: str) -> str

Returns a fully-qualified node_pool string.

parse_cluster_path

parse_cluster_path(path: str) -> typing.Dict[str, str]

Parses a cluster path into its component segments.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_crypto_key_path

parse_crypto_key_path(path: str) -> typing.Dict[str, str]

Parses a crypto_key path into its component segments.

parse_crypto_key_version_path

parse_crypto_key_version_path(path: str) -> typing.Dict[str, str]

Parses a crypto_key_version path into its component segments.

parse_machine_path

parse_machine_path(path: str) -> typing.Dict[str, str]

Parses a machine path into its component segments.

parse_node_pool_path

parse_node_pool_path(path: str) -> typing.Dict[str, str]

Parses a node_pool path into its component segments.

parse_vpn_connection_path

parse_vpn_connection_path(path: str) -> typing.Dict[str, str]

Parses a vpn_connection path into its component segments.

update_cluster

update_cluster(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.UpdateClusterRequest, dict
        ]
    ] = None,
    *,
    cluster: typing.Optional[
        google.cloud.edgecontainer_v1.types.resources.Cluster
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Updates the parameters of a single Cluster.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_update_cluster():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.UpdateClusterRequest(
    )

    # Make the request
    operation = client.update_cluster(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.UpdateClusterRequest, dict]

The request object. Updates a cluster.

cluster google.cloud.edgecontainer_v1.types.Cluster

The updated cluster. This corresponds to the cluster field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Cluster A Google Distributed Cloud Edge Kubernetes cluster.

update_node_pool

update_node_pool(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.UpdateNodePoolRequest, dict
        ]
    ] = None,
    *,
    node_pool: typing.Optional[
        google.cloud.edgecontainer_v1.types.resources.NodePool
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Updates the parameters of a single NodePool.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_update_node_pool():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.UpdateNodePoolRequest(
    )

    # Make the request
    operation = client.update_node_pool(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.UpdateNodePoolRequest, dict]

The request object. Updates a node pool.

node_pool google.cloud.edgecontainer_v1.types.NodePool

The updated node pool. This corresponds to the node_pool field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Field mask is used to specify the fields to be overwritten in the NodePool resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be NodePool A set of Kubernetes nodes in a cluster with common configuration and specification.

upgrade_cluster

upgrade_cluster(
    request: typing.Optional[
        typing.Union[
            google.cloud.edgecontainer_v1.types.service.UpgradeClusterRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    target_version: typing.Optional[str] = None,
    schedule: typing.Optional[
        google.cloud.edgecontainer_v1.types.service.UpgradeClusterRequest.Schedule
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Upgrades a single cluster.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import edgecontainer_v1

def sample_upgrade_cluster():
    # Create a client
    client = edgecontainer_v1.EdgeContainerClient()

    # Initialize request argument(s)
    request = edgecontainer_v1.UpgradeClusterRequest(
        name="name_value",
        target_version="target_version_value",
    )

    # Make the request
    operation = client.upgrade_cluster(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.edgecontainer_v1.types.UpgradeClusterRequest, dict]

The request object. Upgrades a cluster.

name str

Required. The resource name of the cluster. This corresponds to the name field on the request instance; if request is provided, this should not be set.

target_version str

Required. The version the cluster is going to be upgraded to. This corresponds to the target_version field on the request instance; if request is provided, this should not be set.

schedule google.cloud.edgecontainer_v1.types.UpgradeClusterRequest.Schedule

The schedule for the upgrade. This corresponds to the schedule field on the request instance; if request is provided, this should not be set.

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.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Cluster A Google Distributed Cloud Edge Kubernetes cluster.

vpn_connection_path

vpn_connection_path(project: str, location: str, vpn_connection: str) -> str

Returns a fully-qualified vpn_connection string.