EdgeContainerAsyncClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport] = 'grpc_asyncio', client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
EdgeContainer API provides management of Kubernetes Clusters on Google Edge Cloud deployments.
Properties
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
EdgeContainerTransport | The transport used by the client instance. |
Methods
EdgeContainerAsyncClient
EdgeContainerAsyncClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.edgecontainer_v1.services.edge_container.transports.base.EdgeContainerTransport] = 'grpc_asyncio', client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the 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 |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. It won't take effect if a |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError | If mutual TLS transport creation failed for any reason. |
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
async def sample_create_cluster():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.CreateClusterRequest, dict]]
The request object. Creates a cluster. |
parent |
Required. The parent location where this cluster will be created. This corresponds to the |
cluster |
Cluster
Required. The cluster to create. This corresponds to the |
cluster_id |
Required. A client-specified unique identifier for the cluster. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | 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: 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
async def sample_create_node_pool():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.CreateNodePoolRequest, dict]]
The request object. Creates a node pool. |
parent |
Required. The parent cluster where this node pool will be created. This corresponds to the |
node_pool |
NodePool
Required. The node pool to create. This corresponds to the |
node_pool_id |
Required. A client-specified unique identifier for the node pool. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | 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: 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
async def sample_create_vpn_connection():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.CreateVpnConnectionRequest, dict]]
The request object. Creates a VPN connection. |
parent |
Required. The parent location where this vpn connection will be created. This corresponds to the |
vpn_connection |
VpnConnection
Required. The VPN connection to create. This corresponds to the |
vpn_connection_id |
Required. The VPN connection identifier. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | 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)
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
async def sample_delete_cluster():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.DeleteClusterRequest, dict]]
The request object. Deletes a cluster. |
name |
Required. The resource name of the cluster. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | 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: 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
async def sample_delete_node_pool():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.DeleteNodePoolRequest, dict]]
The request object. Deletes a node pool. |
name |
Required. The resource name of the node pool. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | 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_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
async def sample_delete_vpn_connection():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.DeleteVpnConnectionRequest, dict]]
The request object. Deletes a vpn connection. |
name |
Required. The resource name of the vpn connection. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | 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 |
EdgeContainerAsyncClient | 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 |
EdgeContainerAsyncClient | 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 |
EdgeContainerAsyncClient | The 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
async def sample_generate_access_token():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.GenerateAccessTokenRequest(
cluster="cluster_value",
)
# Make the request
response = await client.generate_access_token(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.GenerateAccessTokenRequest, dict]]
The request object. Generates an access token for a cluster. |
cluster |
Required. The resource name of the cluster. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.types.GenerateAccessTokenResponse | An 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
async def sample_get_cluster():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.GetClusterRequest(
name="name_value",
)
# Make the request
response = await client.get_cluster(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.GetClusterRequest, dict]]
The request object. Gets a cluster. |
name |
Required. The resource name of the cluster. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.types.Cluster | A 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
async def sample_get_machine():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.GetMachineRequest(
name="name_value",
)
# Make the request
response = await client.get_machine(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.GetMachineRequest, dict]]
The request object. Gets a machine. |
name |
Required. The resource name of the machine. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.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: 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 variabel 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 |
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: 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
async def sample_get_node_pool():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.GetNodePoolRequest(
name="name_value",
)
# Make the request
response = await client.get_node_pool(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.GetNodePoolRequest, dict]]
The request object. Gets a node pool. |
name |
Required. The resource name of the node pool. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.types.NodePool | A set of Kubernetes nodes in a cluster with common configuration and specification. |
get_transport_class
get_transport_class()
Returns an appropriate transport class.
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
async def sample_get_vpn_connection():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.GetVpnConnectionRequest(
name="name_value",
)
# Make the request
response = await client.get_vpn_connection(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.GetVpnConnectionRequest, dict]]
The request object. Gets a VPN connection. |
name |
Required. The resource name of the vpn connection. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.types.VpnConnection | A 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
async def sample_list_clusters():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.ListClustersRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_clusters(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.ListClustersRequest, dict]]
The request object. Lists clusters in a location. |
parent |
Required. The parent location, which owns this collection of clusters. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.services.edge_container.pagers.ListClustersAsyncPager | List 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
async def sample_list_machines():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.ListMachinesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_machines(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.ListMachinesRequest, dict]]
The request object. Lists machines in a site. |
parent |
Required. The parent site, which owns this collection of machines. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.services.edge_container.pagers.ListMachinesAsyncPager | 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: 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
async def sample_list_node_pools():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.ListNodePoolsRequest, dict]]
The request object. Lists node pools in a cluster. |
parent |
Required. The parent cluster, which owns this collection of node pools. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.services.edge_container.pagers.ListNodePoolsAsyncPager | List 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
async def sample_list_vpn_connections():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.ListVpnConnectionsRequest, dict]]
The request object. Lists VPN connections. |
parent |
Required. The parent location, which owns this collection of VPN connections. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.edgecontainer_v1.services.edge_container.pagers.ListVpnConnectionsAsyncPager | 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)
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
async def sample_update_cluster():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# Initialize request argument(s)
request = edgecontainer_v1.UpdateClusterRequest(
)
# Make the request
operation = client.update_cluster(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.UpdateClusterRequest, dict]]
The request object. Updates a cluster. |
cluster |
Cluster
The updated cluster. This corresponds to the |
update_mask |
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 |
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_async.AsyncOperation | 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: 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
async def sample_update_node_pool():
# Create a client
client = edgecontainer_v1.EdgeContainerAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.edgecontainer_v1.types.UpdateNodePoolRequest, dict]]
The request object. Updates a node pool. |
node_pool |
NodePool
The updated node pool. This corresponds to the |
update_mask |
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 |
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_async.AsyncOperation | 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. |
vpn_connection_path
vpn_connection_path(project: str, location: str, vpn_connection: str)
Returns a fully-qualified vpn_connection string.