As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Services for Google Cloud Dataproc v1 API

class google.cloud.dataproc_v1.services.autoscaling_policy_service.AutoscalingPolicyServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.dataproc_v1.services.autoscaling_policy_service.transports.base.AutoscalingPolicyServiceTransport, None] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The API interface for managing autoscaling policies in the Dataproc API.

Instantiate the autoscaling policy service client.

Parameters
  • 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, AutoscalingPolicyServiceTransport]) – The transport to use. If set to None, a transport is chosen automatically.

  • client_options (client_options_lib.ClientOptions) – 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.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

static autoscaling_policy_path(project: str, location: str, autoscaling_policy: str) → str[source]

Return a fully-qualified autoscaling_policy string.

static common_billing_account_path(billing_account: str) → str[source]

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str[source]

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str[source]

Return a fully-qualified location string.

static common_organization_path(organization: str) → str[source]

Return a fully-qualified organization string.

static common_project_path(project: str) → str[source]

Return a fully-qualified project string.

create_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.CreateAutoscalingPolicyRequest = None, *, parent: str = None, policy: google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy[source]

Creates new autoscaling policy.

Parameters
  • request (CreateAutoscalingPolicyRequest) – The request object. A request to create an autoscaling policy.

  • parent (str) –

    Required. The “resource name” of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}

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

  • policy (AutoscalingPolicy) – Required. The autoscaling policy to create. This corresponds to the policy 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

Describes an autoscaling policy for Dataproc cluster autoscaler.

Return type

AutoscalingPolicy

delete_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.DeleteAutoscalingPolicyRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → None[source]

Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.

Parameters
  • request (DeleteAutoscalingPolicyRequest) – The request object. A request to delete an autoscaling policy. Autoscaling policies in use by one or more clusters will not be deleted.

  • name (str) –

    Required. The “resource name” of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}

    • For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

    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.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

get_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.GetAutoscalingPolicyRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy[source]

Retrieves autoscaling policy.

Parameters
  • request (GetAutoscalingPolicyRequest) – The request object. A request to fetch an autoscaling policy.

  • name (str) –

    Required. The “resource name” of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}

    • For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

    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

Describes an autoscaling policy for Dataproc cluster autoscaler.

Return type

AutoscalingPolicy

list_autoscaling_policies(request: google.cloud.dataproc_v1.types.autoscaling_policies.ListAutoscalingPoliciesRequest = None, *, parent: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.autoscaling_policy_service.pagers.ListAutoscalingPoliciesPager[source]

Lists autoscaling policies in the project.

Parameters
  • request (ListAutoscalingPoliciesRequest) – The request object. A request to list autoscaling policies in a project.

  • parent (str) –

    Required. The “resource name” of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}

    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

A response to a request to list autoscaling policies in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListAutoscalingPoliciesPager

static parse_autoscaling_policy_path(path: str) → Dict[str, str][source]

Parse a autoscaling_policy path into its component segments.

static parse_common_billing_account_path(path: str) → Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str][source]

Parse a project path into its component segments.

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

AutoscalingPolicyServiceTransport

update_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.UpdateAutoscalingPolicyRequest = None, *, policy: google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy[source]

Updates (replaces) autoscaling policy.

Disabled check for update_mask, because all updates will be full replacements.

Parameters
  • request (UpdateAutoscalingPolicyRequest) – The request object. A request to update an autoscaling policy.

  • policy (AutoscalingPolicy) – Required. The updated autoscaling policy. This corresponds to the policy 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

Describes an autoscaling policy for Dataproc cluster autoscaler.

Return type

AutoscalingPolicy

class google.cloud.dataproc_v1.services.autoscaling_policy_service.AutoscalingPolicyServiceAsyncClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.dataproc_v1.services.autoscaling_policy_service.transports.base.AutoscalingPolicyServiceTransport] = 'grpc_asyncio', client_options: <module 'google.api_core.client_options' from '/workspace/.nox/docs/lib/python3.8/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The API interface for managing autoscaling policies in the Dataproc API.

Instantiate the autoscaling policy service client.

Parameters
  • 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, AutoscalingPolicyServiceTransport]) – 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 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.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

static autoscaling_policy_path(project: str, location: str, autoscaling_policy: str) → str

Return a fully-qualified autoscaling_policy string.

static common_billing_account_path(billing_account: str) → str

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str

Return a fully-qualified location string.

static common_organization_path(organization: str) → str

Return a fully-qualified organization string.

static common_project_path(project: str) → str

Return a fully-qualified project string.

async create_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.CreateAutoscalingPolicyRequest = None, *, parent: str = None, policy: google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy[source]

Creates new autoscaling policy.

Parameters
  • request (CreateAutoscalingPolicyRequest) – The request object. A request to create an autoscaling policy.

  • parent (str) –

    Required. The “resource name” of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}

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

  • policy (AutoscalingPolicy) – Required. The autoscaling policy to create. This corresponds to the policy 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

Describes an autoscaling policy for Dataproc cluster autoscaler.

Return type

AutoscalingPolicy

async delete_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.DeleteAutoscalingPolicyRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → None[source]

Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.

Parameters
  • request (DeleteAutoscalingPolicyRequest) – The request object. A request to delete an autoscaling policy. Autoscaling policies in use by one or more clusters will not be deleted.

  • name (str) –

    Required. The “resource name” of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}

    • For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

    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.

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

async get_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.GetAutoscalingPolicyRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy[source]

Retrieves autoscaling policy.

Parameters
  • request (GetAutoscalingPolicyRequest) – The request object. A request to fetch an autoscaling policy.

  • name (str) –

    Required. The “resource name” of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}

    • For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

    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

Describes an autoscaling policy for Dataproc cluster autoscaler.

Return type

AutoscalingPolicy

get_transport_class = functools.partial(<function AutoscalingPolicyServiceClientMeta.get_transport_class>, <class 'google.cloud.dataproc_v1.services.autoscaling_policy_service.client.AutoscalingPolicyServiceClientMeta'>)
async list_autoscaling_policies(request: google.cloud.dataproc_v1.types.autoscaling_policies.ListAutoscalingPoliciesRequest = None, *, parent: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.autoscaling_policy_service.pagers.ListAutoscalingPoliciesAsyncPager[source]

Lists autoscaling policies in the project.

Parameters
  • request (ListAutoscalingPoliciesRequest) – The request object. A request to list autoscaling policies in a project.

  • parent (str) –

    Required. The “resource name” of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}

    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

A response to a request to list autoscaling policies in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListAutoscalingPoliciesAsyncPager

static parse_autoscaling_policy_path(path: str) → Dict[str, str]

Parse a autoscaling_policy path into its component segments.

static parse_common_billing_account_path(path: str) → Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str]

Parse a project path into its component segments.

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

AutoscalingPolicyServiceTransport

async update_autoscaling_policy(request: google.cloud.dataproc_v1.types.autoscaling_policies.UpdateAutoscalingPolicyRequest = None, *, policy: google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.autoscaling_policies.AutoscalingPolicy[source]

Updates (replaces) autoscaling policy.

Disabled check for update_mask, because all updates will be full replacements.

Parameters
  • request (UpdateAutoscalingPolicyRequest) – The request object. A request to update an autoscaling policy.

  • policy (AutoscalingPolicy) – Required. The updated autoscaling policy. This corresponds to the policy 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

Describes an autoscaling policy for Dataproc cluster autoscaler.

Return type

AutoscalingPolicy

class google.cloud.dataproc_v1.services.cluster_controller.ClusterControllerClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.dataproc_v1.services.cluster_controller.transports.base.ClusterControllerTransport, None] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The ClusterControllerService provides methods to manage clusters of Compute Engine instances.

Instantiate the cluster controller client.

Parameters
  • 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, ClusterControllerTransport]) – The transport to use. If set to None, a transport is chosen automatically.

  • client_options (client_options_lib.ClientOptions) – 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.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

static common_billing_account_path(billing_account: str) → str[source]

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str[source]

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str[source]

Return a fully-qualified location string.

static common_organization_path(organization: str) → str[source]

Return a fully-qualified organization string.

static common_project_path(project: str) → str[source]

Return a fully-qualified project string.

create_cluster(request: google.cloud.dataproc_v1.types.clusters.CreateClusterRequest = None, *, project_id: str = None, region: str = None, cluster: google.cloud.dataproc_v1.types.clusters.Cluster = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
  • request (CreateClusterRequest) – The request object. A request to create a cluster.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster (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.

  • 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

An object representing a long-running operation.

The result type for the operation will be :class:~.clusters.Cluster: Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Return type

Operation

delete_cluster(request: google.cloud.dataproc_v1.types.clusters.DeleteClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
  • request (DeleteClusterRequest) – The request object. A request to delete a cluster.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_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

An object representing a long-running operation.

The result type for the operation will be :class:~.empty.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);
}

The JSON representation for Empty is empty JSON object {}.

Return type

Operation

diagnose_cluster(request: google.cloud.dataproc_v1.types.clusters.DiagnoseClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Gets cluster diagnostic information. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata. After the operation completes, [Operation.response][google.longrunning.Operation.response] contains DiagnoseClusterResults.

Parameters
  • request (DiagnoseClusterRequest) – The request object. A request to collect cluster diagnostic information.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_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

An object representing a long-running operation.

The result type for the operation will be :class:~.clusters.DiagnoseClusterResults: The location of diagnostic output.

Return type

Operation

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

get_cluster(request: google.cloud.dataproc_v1.types.clusters.GetClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.clusters.Cluster[source]

Gets the resource representation for a cluster in a project.

Parameters
  • request (GetClusterRequest) – The request object. Request to get the resource representation for a cluster in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_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

Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Return type

Cluster

list_clusters(request: google.cloud.dataproc_v1.types.clusters.ListClustersRequest = None, *, project_id: str = None, region: str = None, filter: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.cluster_controller.pagers.ListClustersPager[source]

Lists all regions/{region}/clusters in a project alphabetically.

Parameters
  • request (ListClustersRequest) – The request object. A request to list the clusters in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • filter (str) –

    Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:

    field = value [AND [field = value]] …

    where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.

    Example filter:

    status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * This corresponds to the filter 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

The list of all clusters in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListClustersPager

static parse_common_billing_account_path(path: str) → Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str][source]

Parse a project path into its component segments.

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

ClusterControllerTransport

update_cluster(request: google.cloud.dataproc_v1.types.clusters.UpdateClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, cluster: google.cloud.dataproc_v1.types.clusters.Cluster = None, update_mask: google.protobuf.field_mask_pb2.FieldMask = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Updates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
  • request (UpdateClusterRequest) – The request object. A request to update a cluster.

  • project_id (str) – Required. The ID of the Google Cloud Platform project the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_name field on the request instance; if request is provided, this should not be set.

  • cluster (Cluster) – Required. The changes to the cluster. This corresponds to the cluster field on the request instance; if request is provided, this should not be set.

  • update_mask (FieldMask) –

    Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:

    {
      "config":{
        "workerConfig":{
          "numInstances":"5"
        }
      }
    }
    

    Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:

    {
      "config":{
        "secondaryWorkerConfig":{
          "numInstances":"5"
        }
      }
    }
    

    Note: Currently, only the following fields can be updated:

    Mask Purpose
    labels Update labels
    config.worker_config.num_instances Resize primary worker group
    config.secondary_worker_config.num_instances Resize secondary worker group
    config.autoscaling_config.policy_uriUse, stop using, or change autoscaling policies

    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

An object representing a long-running operation.

The result type for the operation will be :class:~.clusters.Cluster: Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Return type

Operation

class google.cloud.dataproc_v1.services.cluster_controller.ClusterControllerAsyncClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.dataproc_v1.services.cluster_controller.transports.base.ClusterControllerTransport] = 'grpc_asyncio', client_options: <module 'google.api_core.client_options' from '/workspace/.nox/docs/lib/python3.8/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The ClusterControllerService provides methods to manage clusters of Compute Engine instances.

Instantiate the cluster controller client.

Parameters
  • 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, ClusterControllerTransport]) – 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 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.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

static common_billing_account_path(billing_account: str) → str

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str

Return a fully-qualified location string.

static common_organization_path(organization: str) → str

Return a fully-qualified organization string.

static common_project_path(project: str) → str

Return a fully-qualified project string.

async create_cluster(request: google.cloud.dataproc_v1.types.clusters.CreateClusterRequest = None, *, project_id: str = None, region: str = None, cluster: google.cloud.dataproc_v1.types.clusters.Cluster = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Creates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
  • request (CreateClusterRequest) – The request object. A request to create a cluster.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster (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.

  • 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

An object representing a long-running operation.

The result type for the operation will be :class:~.clusters.Cluster: Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Return type

AsyncOperation

async delete_cluster(request: google.cloud.dataproc_v1.types.clusters.DeleteClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Deletes a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
  • request (DeleteClusterRequest) – The request object. A request to delete a cluster.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_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

An object representing a long-running operation.

The result type for the operation will be :class:~.empty.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);
}

The JSON representation for Empty is empty JSON object {}.

Return type

AsyncOperation

async diagnose_cluster(request: google.cloud.dataproc_v1.types.clusters.DiagnoseClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Gets cluster diagnostic information. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata. After the operation completes, [Operation.response][google.longrunning.Operation.response] contains DiagnoseClusterResults.

Parameters
  • request (DiagnoseClusterRequest) – The request object. A request to collect cluster diagnostic information.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_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

An object representing a long-running operation.

The result type for the operation will be :class:~.clusters.DiagnoseClusterResults: The location of diagnostic output.

Return type

AsyncOperation

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

async get_cluster(request: google.cloud.dataproc_v1.types.clusters.GetClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.clusters.Cluster[source]

Gets the resource representation for a cluster in a project.

Parameters
  • request (GetClusterRequest) – The request object. Request to get the resource representation for a cluster in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_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

Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Return type

Cluster

get_transport_class = functools.partial(<function ClusterControllerClientMeta.get_transport_class>, <class 'google.cloud.dataproc_v1.services.cluster_controller.client.ClusterControllerClientMeta'>)
async list_clusters(request: google.cloud.dataproc_v1.types.clusters.ListClustersRequest = None, *, project_id: str = None, region: str = None, filter: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.cluster_controller.pagers.ListClustersAsyncPager[source]

Lists all regions/{region}/clusters in a project alphabetically.

Parameters
  • request (ListClustersRequest) – The request object. A request to list the clusters in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • filter (str) –

    Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:

    field = value [AND [field = value]] …

    where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.

    Example filter:

    status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * This corresponds to the filter 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

The list of all clusters in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListClustersAsyncPager

static parse_common_billing_account_path(path: str) → Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str]

Parse a project path into its component segments.

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

ClusterControllerTransport

async update_cluster(request: google.cloud.dataproc_v1.types.clusters.UpdateClusterRequest = None, *, project_id: str = None, region: str = None, cluster_name: str = None, cluster: google.cloud.dataproc_v1.types.clusters.Cluster = None, update_mask: google.protobuf.field_mask_pb2.FieldMask = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Updates a cluster in a project. The returned [Operation.metadata][google.longrunning.Operation.metadata] will be ClusterOperationMetadata.

Parameters
  • request (UpdateClusterRequest) – The request object. A request to update a cluster.

  • project_id (str) – Required. The ID of the Google Cloud Platform project the cluster belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • cluster_name (str) – Required. The cluster name. This corresponds to the cluster_name field on the request instance; if request is provided, this should not be set.

  • cluster (Cluster) – Required. The changes to the cluster. This corresponds to the cluster field on the request instance; if request is provided, this should not be set.

  • update_mask (FieldMask) –

    Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:

    {
      "config":{
        "workerConfig":{
          "numInstances":"5"
        }
      }
    }
    

    Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:

    {
      "config":{
        "secondaryWorkerConfig":{
          "numInstances":"5"
        }
      }
    }
    

    Note: Currently, only the following fields can be updated:

    Mask Purpose
    labels Update labels
    config.worker_config.num_instances Resize primary worker group
    config.secondary_worker_config.num_instances Resize secondary worker group
    config.autoscaling_config.policy_uriUse, stop using, or change autoscaling policies

    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

An object representing a long-running operation.

The result type for the operation will be :class:~.clusters.Cluster: Describes the identifying information, config, and status of a cluster of Compute Engine instances.

Return type

AsyncOperation

class google.cloud.dataproc_v1.services.job_controller.JobControllerClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.dataproc_v1.services.job_controller.transports.base.JobControllerTransport, None] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The JobController provides methods to manage jobs.

Instantiate the job controller client.

Parameters
  • 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, JobControllerTransport]) – The transport to use. If set to None, a transport is chosen automatically.

  • client_options (client_options_lib.ClientOptions) – 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.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

cancel_job(request: google.cloud.dataproc_v1.types.jobs.CancelJobRequest = None, *, project_id: str = None, region: str = None, job_id: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.

Parameters
  • request (CancelJobRequest) – The request object. A request to cancel a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job_id (str) – Required. The job ID. This corresponds to the job_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

A Dataproc job resource.

Return type

Job

static common_billing_account_path(billing_account: str) → str[source]

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str[source]

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str[source]

Return a fully-qualified location string.

static common_organization_path(organization: str) → str[source]

Return a fully-qualified organization string.

static common_project_path(project: str) → str[source]

Return a fully-qualified project string.

delete_job(request: google.cloud.dataproc_v1.types.jobs.DeleteJobRequest = None, *, project_id: str = None, region: str = None, job_id: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → None[source]

Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.

Parameters
  • request (DeleteJobRequest) – The request object. A request to delete a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job_id (str) – Required. The job ID. This corresponds to the job_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.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

get_job(request: google.cloud.dataproc_v1.types.jobs.GetJobRequest = None, *, project_id: str = None, region: str = None, job_id: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Gets the resource representation for a job in a project.

Parameters
  • request (GetJobRequest) – The request object. A request to get the resource representation for a job in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job_id (str) – Required. The job ID. This corresponds to the job_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

A Dataproc job resource.

Return type

Job

list_jobs(request: google.cloud.dataproc_v1.types.jobs.ListJobsRequest = None, *, project_id: str = None, region: str = None, filter: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.job_controller.pagers.ListJobsPager[source]

Lists regions/{region}/jobs in a project.

Parameters
  • request (ListJobsRequest) – The request object. A request to list jobs in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • filter (str) –

    Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:

    [field = value] AND [field [= value]] …

    where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.

    Example filter:

    status.state = ACTIVE AND labels.env = staging AND labels.starred = * This corresponds to the filter 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

A list of jobs in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListJobsPager

static parse_common_billing_account_path(path: str) → Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str][source]

Parse a project path into its component segments.

submit_job(request: google.cloud.dataproc_v1.types.jobs.SubmitJobRequest = None, *, project_id: str = None, region: str = None, job: google.cloud.dataproc_v1.types.jobs.Job = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Submits a job to a cluster.

Parameters
  • request (SubmitJobRequest) – The request object. A request to submit a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job (Job) – Required. The job resource. This corresponds to the job 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

A Dataproc job resource.

Return type

Job

submit_job_as_operation(request: google.cloud.dataproc_v1.types.jobs.SubmitJobRequest = None, *, project_id: str = None, region: str = None, job: google.cloud.dataproc_v1.types.jobs.Job = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Submits job to a cluster.

Parameters
  • request (SubmitJobRequest) – The request object. A request to submit a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job (Job) – Required. The job resource. This corresponds to the job 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

An object representing a long-running operation.

The result type for the operation will be :class:~.jobs.Job: A Dataproc job resource.

Return type

Operation

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

JobControllerTransport

update_job(request: google.cloud.dataproc_v1.types.jobs.UpdateJobRequest = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Updates a job in a project.

Parameters
  • request (UpdateJobRequest) – The request object. A request to update a job.

  • 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

A Dataproc job resource.

Return type

Job

class google.cloud.dataproc_v1.services.job_controller.JobControllerAsyncClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.dataproc_v1.services.job_controller.transports.base.JobControllerTransport] = 'grpc_asyncio', client_options: <module 'google.api_core.client_options' from '/workspace/.nox/docs/lib/python3.8/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The JobController provides methods to manage jobs.

Instantiate the job controller client.

Parameters
  • 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, JobControllerTransport]) – 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 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.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

async cancel_job(request: google.cloud.dataproc_v1.types.jobs.CancelJobRequest = None, *, project_id: str = None, region: str = None, job_id: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.

Parameters
  • request (CancelJobRequest) – The request object. A request to cancel a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job_id (str) – Required. The job ID. This corresponds to the job_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

A Dataproc job resource.

Return type

Job

static common_billing_account_path(billing_account: str) → str

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str

Return a fully-qualified location string.

static common_organization_path(organization: str) → str

Return a fully-qualified organization string.

static common_project_path(project: str) → str

Return a fully-qualified project string.

async delete_job(request: google.cloud.dataproc_v1.types.jobs.DeleteJobRequest = None, *, project_id: str = None, region: str = None, job_id: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → None[source]

Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.

Parameters
  • request (DeleteJobRequest) – The request object. A request to delete a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job_id (str) – Required. The job ID. This corresponds to the job_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.

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

async get_job(request: google.cloud.dataproc_v1.types.jobs.GetJobRequest = None, *, project_id: str = None, region: str = None, job_id: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Gets the resource representation for a job in a project.

Parameters
  • request (GetJobRequest) – The request object. A request to get the resource representation for a job in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job_id (str) – Required. The job ID. This corresponds to the job_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

A Dataproc job resource.

Return type

Job

get_transport_class = functools.partial(<function JobControllerClientMeta.get_transport_class>, <class 'google.cloud.dataproc_v1.services.job_controller.client.JobControllerClientMeta'>)
async list_jobs(request: google.cloud.dataproc_v1.types.jobs.ListJobsRequest = None, *, project_id: str = None, region: str = None, filter: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.job_controller.pagers.ListJobsAsyncPager[source]

Lists regions/{region}/jobs in a project.

Parameters
  • request (ListJobsRequest) – The request object. A request to list jobs in a project.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • filter (str) –

    Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:

    [field = value] AND [field [= value]] …

    where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.

    Example filter:

    status.state = ACTIVE AND labels.env = staging AND labels.starred = * This corresponds to the filter 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

A list of jobs in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListJobsAsyncPager

static parse_common_billing_account_path(path: str) → Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str]

Parse a project path into its component segments.

async submit_job(request: google.cloud.dataproc_v1.types.jobs.SubmitJobRequest = None, *, project_id: str = None, region: str = None, job: google.cloud.dataproc_v1.types.jobs.Job = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Submits a job to a cluster.

Parameters
  • request (SubmitJobRequest) – The request object. A request to submit a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job (Job) – Required. The job resource. This corresponds to the job 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

A Dataproc job resource.

Return type

Job

async submit_job_as_operation(request: google.cloud.dataproc_v1.types.jobs.SubmitJobRequest = None, *, project_id: str = None, region: str = None, job: google.cloud.dataproc_v1.types.jobs.Job = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Submits job to a cluster.

Parameters
  • request (SubmitJobRequest) – The request object. A request to submit a job.

  • project_id (str) – Required. The ID of the Google Cloud Platform project that the job belongs to. This corresponds to the project_id field on the request instance; if request is provided, this should not be set.

  • region (str) – Required. The Dataproc region in which to handle the request. This corresponds to the region field on the request instance; if request is provided, this should not be set.

  • job (Job) – Required. The job resource. This corresponds to the job 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

An object representing a long-running operation.

The result type for the operation will be :class:~.jobs.Job: A Dataproc job resource.

Return type

AsyncOperation

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

JobControllerTransport

async update_job(request: google.cloud.dataproc_v1.types.jobs.UpdateJobRequest = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.jobs.Job[source]

Updates a job in a project.

Parameters
  • request (UpdateJobRequest) – The request object. A request to update a job.

  • 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

A Dataproc job resource.

Return type

Job

class google.cloud.dataproc_v1.services.workflow_template_service.WorkflowTemplateServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.dataproc_v1.services.workflow_template_service.transports.base.WorkflowTemplateServiceTransport, None] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The API interface for managing Workflow Templates in the Dataproc API.

Instantiate the workflow template service client.

Parameters
  • 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, WorkflowTemplateServiceTransport]) – The transport to use. If set to None, a transport is chosen automatically.

  • client_options (client_options_lib.ClientOptions) – 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.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

static common_billing_account_path(billing_account: str) → str[source]

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str[source]

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str[source]

Return a fully-qualified location string.

static common_organization_path(organization: str) → str[source]

Return a fully-qualified organization string.

static common_project_path(project: str) → str[source]

Return a fully-qualified project string.

create_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.CreateWorkflowTemplateRequest = None, *, parent: str = None, template: google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate[source]

Creates new workflow template.

Parameters
  • request (CreateWorkflowTemplateRequest) – The request object. A request to create a workflow template.

  • parent (str) –

    Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}

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

  • template (WorkflowTemplate) – Required. The Dataproc workflow template to create. This corresponds to the template 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

A Dataproc workflow template resource.

Return type

WorkflowTemplate

delete_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.DeleteWorkflowTemplateRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → None[source]

Deletes a workflow template. It does not cancel in- rogress workflows.

Parameters
  • request (DeleteWorkflowTemplateRequest) – The request object. A request to delete a workflow template. Currently started workflows will remain running.

  • name (str) –

    Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

    • For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

    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.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

get_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.GetWorkflowTemplateRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate[source]

Retrieves the latest workflow template. Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
  • request (GetWorkflowTemplateRequest) – The request object. A request to fetch a workflow template.

  • name (str) –

    Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

    • For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

    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

A Dataproc workflow template resource.

Return type

WorkflowTemplate

instantiate_inline_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.InstantiateInlineWorkflowTemplateRequest = None, *, parent: str = None, template: google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
  • request (InstantiateInlineWorkflowTemplateRequest) – The request object. A request to instantiate an inline workflow template.

  • parent (str) –

    Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}

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

  • template (WorkflowTemplate) – Required. The workflow template to instantiate. This corresponds to the template 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

An object representing a long-running operation.

The result type for the operation will be :class:~.empty.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);
}

The JSON representation for Empty is empty JSON object {}.

Return type

Operation

instantiate_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.InstantiateWorkflowTemplateRequest = None, *, name: str = None, parameters: Sequence[google.cloud.dataproc_v1.types.workflow_templates.InstantiateWorkflowTemplateRequest.ParametersEntry] = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
  • request (InstantiateWorkflowTemplateRequest) – The request object. A request to instantiate a workflow template.

  • name (str) –

    Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

    • For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

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

  • parameters (Sequence[~.workflow_templates.InstantiateWorkflowTemplateRequest.ParametersEntry]) – Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 100 characters. This corresponds to the parameters 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

An object representing a long-running operation.

The result type for the operation will be :class:~.empty.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);
}

The JSON representation for Empty is empty JSON object {}.

Return type

Operation

list_workflow_templates(request: google.cloud.dataproc_v1.types.workflow_templates.ListWorkflowTemplatesRequest = None, *, parent: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.workflow_template_service.pagers.ListWorkflowTemplatesPager[source]

Lists workflows that match the specified filter in the request.

Parameters
  • request (ListWorkflowTemplatesRequest) – The request object. A request to list workflow templates in a project.

  • parent (str) –

    Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}

    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

A response to a request to list workflow templates in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListWorkflowTemplatesPager

static parse_common_billing_account_path(path: str) → Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str][source]

Parse a project path into its component segments.

static parse_workflow_template_path(path: str) → Dict[str, str][source]

Parse a workflow_template path into its component segments.

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

WorkflowTemplateServiceTransport

update_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.UpdateWorkflowTemplateRequest = None, *, template: google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate[source]

Updates (replaces) workflow template. The updated template must contain version that matches the current server version.

Parameters
  • request (UpdateWorkflowTemplateRequest) – The request object. A request to update a workflow template.

  • template (WorkflowTemplate) –

    Required. The updated workflow template.

    The template.version field must match the current version. This corresponds to the template 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

A Dataproc workflow template resource.

Return type

WorkflowTemplate

static workflow_template_path(project: str, region: str, workflow_template: str) → str[source]

Return a fully-qualified workflow_template string.

class google.cloud.dataproc_v1.services.workflow_template_service.WorkflowTemplateServiceAsyncClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.dataproc_v1.services.workflow_template_service.transports.base.WorkflowTemplateServiceTransport] = 'grpc_asyncio', client_options: <module 'google.api_core.client_options' from '/workspace/.nox/docs/lib/python3.8/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The API interface for managing Workflow Templates in the Dataproc API.

Instantiate the workflow template service client.

Parameters
  • 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, WorkflowTemplateServiceTransport]) – 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 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.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

static common_billing_account_path(billing_account: str) → str

Return a fully-qualified billing_account string.

static common_folder_path(folder: str) → str

Return a fully-qualified folder string.

static common_location_path(project: str, location: str) → str

Return a fully-qualified location string.

static common_organization_path(organization: str) → str

Return a fully-qualified organization string.

static common_project_path(project: str) → str

Return a fully-qualified project string.

async create_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.CreateWorkflowTemplateRequest = None, *, parent: str = None, template: google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate[source]

Creates new workflow template.

Parameters
  • request (CreateWorkflowTemplateRequest) – The request object. A request to create a workflow template.

  • parent (str) –

    Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}

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

  • template (WorkflowTemplate) – Required. The Dataproc workflow template to create. This corresponds to the template 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

A Dataproc workflow template resource.

Return type

WorkflowTemplate

async delete_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.DeleteWorkflowTemplateRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → None[source]

Deletes a workflow template. It does not cancel in- rogress workflows.

Parameters
  • request (DeleteWorkflowTemplateRequest) – The request object. A request to delete a workflow template. Currently started workflows will remain running.

  • name (str) –

    Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

    • For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

    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.

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

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

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

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

{@api.name}

get_transport_class = functools.partial(<function WorkflowTemplateServiceClientMeta.get_transport_class>, <class 'google.cloud.dataproc_v1.services.workflow_template_service.client.WorkflowTemplateServiceClientMeta'>)
async get_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.GetWorkflowTemplateRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate[source]

Retrieves the latest workflow template. Can retrieve previously instantiated template by specifying optional version parameter.

Parameters
  • request (GetWorkflowTemplateRequest) – The request object. A request to fetch a workflow template.

  • name (str) –

    Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

    • For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

    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

A Dataproc workflow template resource.

Return type

WorkflowTemplate

async instantiate_inline_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.InstantiateInlineWorkflowTemplateRequest = None, *, parent: str = None, template: google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Instantiates a template and begins execution.

This method is equivalent to executing the sequence [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
  • request (InstantiateInlineWorkflowTemplateRequest) – The request object. A request to instantiate an inline workflow template.

  • parent (str) –

    Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}

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

  • template (WorkflowTemplate) – Required. The workflow template to instantiate. This corresponds to the template 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

An object representing a long-running operation.

The result type for the operation will be :class:~.empty.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);
}

The JSON representation for Empty is empty JSON object {}.

Return type

AsyncOperation

async instantiate_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.InstantiateWorkflowTemplateRequest = None, *, name: str = None, parameters: Sequence[google.cloud.dataproc_v1.types.workflow_templates.InstantiateWorkflowTemplateRequest.ParametersEntry] = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]

Instantiates a template and begins execution.

The returned Operation can be used to track execution of workflow by polling [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when entire workflow is finished.

The running workflow can be aborted via [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.

The [Operation.metadata][google.longrunning.Operation.metadata] will be WorkflowMetadata. Also see Using WorkflowMetadata.

On successful completion, [Operation.response][google.longrunning.Operation.response] will be [Empty][google.protobuf.Empty].

Parameters
  • request (InstantiateWorkflowTemplateRequest) – The request object. A request to instantiate a workflow template.

  • name (str) –

    Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

    • For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

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

  • parameters (Sequence[~.workflow_templates.InstantiateWorkflowTemplateRequest.ParametersEntry]) – Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 100 characters. This corresponds to the parameters 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

An object representing a long-running operation.

The result type for the operation will be :class:~.empty.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);
}

The JSON representation for Empty is empty JSON object {}.

Return type

AsyncOperation

async list_workflow_templates(request: google.cloud.dataproc_v1.types.workflow_templates.ListWorkflowTemplatesRequest = None, *, parent: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.services.workflow_template_service.pagers.ListWorkflowTemplatesAsyncPager[source]

Lists workflows that match the specified filter in the request.

Parameters
  • request (ListWorkflowTemplatesRequest) – The request object. A request to list workflow templates in a project.

  • parent (str) –

    Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}

    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

A response to a request to list workflow templates in a project. Iterating over this object will yield results and resolve additional pages automatically.

Return type

ListWorkflowTemplatesAsyncPager

static parse_common_billing_account_path(path: str) → Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) → Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) → Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) → Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) → Dict[str, str]

Parse a project path into its component segments.

static parse_workflow_template_path(path: str) → Dict[str, str]

Parse a workflow_template path into its component segments.

property transport

Return the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

WorkflowTemplateServiceTransport

async update_workflow_template(request: google.cloud.dataproc_v1.types.workflow_templates.UpdateWorkflowTemplateRequest = None, *, template: google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.dataproc_v1.types.workflow_templates.WorkflowTemplate[source]

Updates (replaces) workflow template. The updated template must contain version that matches the current server version.

Parameters
  • request (UpdateWorkflowTemplateRequest) – The request object. A request to update a workflow template.

  • template (WorkflowTemplate) –

    Required. The updated workflow template.

    The template.version field must match the current version. This corresponds to the template 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

A Dataproc workflow template resource.

Return type

WorkflowTemplate

static workflow_template_path(project: str, region: str, workflow_template: str) → str

Return a fully-qualified workflow_template string.