Class EdgeContainerClient (0.4.1)

EdgeContainerClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport]] = None, client_options: Optional[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

transport

Returns the transport used by the client instance.

Returns
TypeDescription
EdgeContainerTransportThe transport used by the client instance.

Methods

EdgeContainerClient

EdgeContainerClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport]] = None, client_options: Optional[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
NameDescription
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, EdgeContainerTransport]

The transport to use. 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. It won't take effect if a transport instance is provided. (1) The api_endpoint property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: "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). However, the api_endpoint property takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide client certificate for mutual TLS 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.

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
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

cluster_path

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

Returns a fully-qualified cluster string.

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.

create_cluster

create_cluster(request: Optional[Union[google.cloud.edgecontainer_v1.types.service.CreateClusterRequest, dict]] = None, *, parent: Optional[str] = None, cluster: Optional[google.cloud.edgecontainer_v1.types.resources.Cluster] = 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: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())

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.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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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: Optional[Union[google.cloud.edgecontainer_v1.types.service.CreateNodePoolRequest, dict]] = None, *, parent: Optional[str] = None, node_pool: Optional[google.cloud.edgecontainer_v1.types.resources.NodePool] = None, node_pool_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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: Optional[Union[google.cloud.edgecontainer_v1.types.service.CreateVpnConnectionRequest, dict]] = None, *, parent: Optional[str] = None, vpn_connection: Optional[google.cloud.edgecontainer_v1.types.resources.VpnConnection] = None, vpn_connection_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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)

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
)

Returns a fully-qualified crypto_key_version string.

delete_cluster

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

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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: Optional[Union[google.cloud.edgecontainer_v1.types.service.DeleteNodePoolRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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_vpn_connection

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

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
EdgeContainerClientThe 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
NameDescription
info dict

The service account private key info.

Returns
TypeDescription
EdgeContainerClientThe 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
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
EdgeContainerClientThe constructed client.

generate_access_token

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

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
NameDescription
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
TypeDescription
google.cloud.edgecontainer_v1.types.GenerateAccessTokenResponseAn access token for a cluster.

get_cluster

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

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
NameDescription
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
TypeDescription
google.cloud.edgecontainer_v1.types.ClusterA Google Distributed Cloud Edge Kubernetes cluster.

get_machine

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

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
NameDescription
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
TypeDescription
google.cloud.edgecontainer_v1.types.MachineA 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: Optional[google.api_core.client_options.ClientOptions] = None,
)

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
NameDescription
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
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf any errors happen.
Returns
TypeDescription
Tuple[str, Callable[[], Tuple[bytes, bytes]]]returns the API endpoint and the client cert source to use.

get_node_pool

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

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
NameDescription
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
TypeDescription
google.cloud.edgecontainer_v1.types.NodePoolA set of Kubernetes nodes in a cluster with common configuration and specification.

get_vpn_connection

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

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
NameDescription
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
TypeDescription
google.cloud.edgecontainer_v1.types.VpnConnectionA VPN connection .

list_clusters

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

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

list_machines

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

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

list_node_pools

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

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

list_vpn_connections

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

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
NameDescription
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
TypeDescription
google.cloud.edgecontainer_v1.services.edge_container.pagers.ListVpnConnectionsPagerList 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)

Returns a fully-qualified machine string.

node_pool_path

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

Returns a fully-qualified node_pool string.

parse_cluster_path

parse_cluster_path(path: str)

Parses a cluster path into its component segments.

parse_common_billing_account_path

parse_common_billing_account_path(path: str)

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str)

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str)

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str)

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str)

Parse a project path into its component segments.

parse_crypto_key_path

parse_crypto_key_path(path: str)

Parses a crypto_key path into its component segments.

parse_crypto_key_version_path

parse_crypto_key_version_path(path: str)

Parses a crypto_key_version path into its component segments.

parse_machine_path

parse_machine_path(path: str)

Parses a machine path into its component segments.

parse_node_pool_path

parse_node_pool_path(path: str)

Parses a node_pool path into its component segments.

parse_vpn_connection_path

parse_vpn_connection_path(path: str)

Parses a vpn_connection path into its component segments.

update_cluster

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

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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: Optional[Union[google.cloud.edgecontainer_v1.types.service.UpdateNodePoolRequest, dict]] = None, *, node_pool: Optional[google.cloud.edgecontainer_v1.types.resources.NodePool] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())

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
NameDescription
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
TypeDescription
google.api_core.operation.OperationAn 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.

vpn_connection_path

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

Returns a fully-qualified vpn_connection string.