DataplexServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.dataplex_v1.services.dataplex_service.transports.base.DataplexServiceTransport]] = 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>)
Dataplex service provides data lakes as a service. The primary resources offered by this service are Lakes, Zones and Assets which collectively allow a data administrator to organize, manage, secure and catalog data across their organization located across cloud projects in a variety of storage systems including Cloud Storage and BigQuery.
Inheritance
builtins.object > DataplexServiceClientProperties
transport
Returns the transport used by the client instance.
Type | Description |
DataplexServiceTransport | The transport used by the client instance. |
Methods
DataplexServiceClient
DataplexServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.dataplex_v1.services.dataplex_service.transports.base.DataplexServiceTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the dataplex service client.
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str, DataplexServiceTransport]
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. It won't take effect if a |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)
Releases underlying transport's resources.
action_path
action_path(project: str, location: str, lake: str, action: str)
Returns a fully-qualified action string.
asset_path
asset_path(project: str, location: str, lake: str, zone: str, asset: str)
Returns a fully-qualified asset string.
cancel_job
cancel_job(request: Optional[Union[google.cloud.dataplex_v1.types.service.CancelJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Cancel jobs running for the task resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_cancel_job():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.CancelJobRequest(
name="name_value",
)
# Make the request
client.cancel_job(request=request)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.CancelJobRequest, dict]
The request object. Cancel task jobs. |
name |
str
Required. The resource name of the 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. |
cancel_operation
cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success
is not guaranteed. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Name | Description |
request |
`.operations_pb2.CancelOperationRequest`
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
common_billing_account_path
common_billing_account_path(billing_account: str)
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str)
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str)
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str)
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str)
Returns a fully-qualified project string.
create_asset
create_asset(request: Optional[Union[google.cloud.dataplex_v1.types.service.CreateAssetRequest, dict]] = None, *, parent: Optional[str] = None, asset: Optional[google.cloud.dataplex_v1.types.resources.Asset] = None, asset_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Creates an asset resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_create_asset():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
asset = dataplex_v1.Asset()
asset.resource_spec.type_ = "BIGQUERY_DATASET"
request = dataplex_v1.CreateAssetRequest(
parent="parent_value",
asset_id="asset_id_value",
asset=asset,
)
# Make the request
operation = client.create_asset(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.CreateAssetRequest, dict]
The request object. Create asset request. |
parent |
str
Required. The resource name of the parent zone: |
asset |
google.cloud.dataplex_v1.types.Asset
Required. Asset resource. This corresponds to the |
asset_id |
str
Required. Asset identifier. This ID will be used to generate names such as table names when publishing metadata to Hive Metastore and BigQuery. - Must contain only lowercase letters, numbers and hyphens. - Must start with a letter. - Must end with a number or a letter. - Must be between 1-63 characters. - Must be unique within the zone. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Asset An asset represents a cloud resource that is being managed within a lake as a member of a zone. |
create_environment
create_environment(request: Optional[Union[google.cloud.dataplex_v1.types.service.CreateEnvironmentRequest, dict]] = None, *, parent: Optional[str] = None, environment: Optional[google.cloud.dataplex_v1.types.analyze.Environment] = None, environment_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Create an environment resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_create_environment():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
environment = dataplex_v1.Environment()
environment.infrastructure_spec.os_image.image_version = "image_version_value"
request = dataplex_v1.CreateEnvironmentRequest(
parent="parent_value",
environment_id="environment_id_value",
environment=environment,
)
# Make the request
operation = client.create_environment(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.CreateEnvironmentRequest, dict]
The request object. Create environment request. |
parent |
str
Required. The resource name of the parent lake: |
environment |
google.cloud.dataplex_v1.types.Environment
Required. Environment resource. This corresponds to the |
environment_id |
str
Required. Environment identifier. - Must contain only lowercase letters, numbers and hyphens. - Must start with a letter. - Must be between 1-63 characters. - Must end with a number or a letter. - Must be unique within the lake. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Environment Environment represents a user-visible compute infrastructure for analytics within a lake. |
create_lake
create_lake(request: Optional[Union[google.cloud.dataplex_v1.types.service.CreateLakeRequest, dict]] = None, *, parent: Optional[str] = None, lake: Optional[google.cloud.dataplex_v1.types.resources.Lake] = None, lake_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Creates a lake resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_create_lake():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.CreateLakeRequest(
parent="parent_value",
lake_id="lake_id_value",
)
# Make the request
operation = client.create_lake(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.CreateLakeRequest, dict]
The request object. Create lake request. |
parent |
str
Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where |
lake |
google.cloud.dataplex_v1.types.Lake
Required. Lake resource This corresponds to the |
lake_id |
str
Required. Lake identifier. This ID will be used to generate names such as database and dataset names when publishing metadata to Hive Metastore and BigQuery. - Must contain only lowercase letters, numbers and hyphens. - Must start with a letter. - Must end with a number or a letter. - Must be between 1-63 characters. - Must be unique within the customer project / location. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Lake A lake is a centralized repository for managing enterprise data across the organization distributed across many cloud projects, and stored in a variety of storage services such as Google Cloud Storage and BigQuery. The resources attached to a lake are referred to as managed resources. Data within these managed resources can be structured or unstructured. A lake provides data admins with tools to organize, secure and manage their data at scale, and provides data scientists and data engineers an integrated experience to easily search, discover, analyze and transform data and associated metadata. |
create_task
create_task(request: Optional[Union[google.cloud.dataplex_v1.types.service.CreateTaskRequest, dict]] = None, *, parent: Optional[str] = None, task: Optional[google.cloud.dataplex_v1.types.tasks.Task] = None, task_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Creates a task resource within a lake.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_create_task():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
task = dataplex_v1.Task()
task.spark.main_jar_file_uri = "main_jar_file_uri_value"
task.trigger_spec.schedule = "schedule_value"
task.trigger_spec.type_ = "RECURRING"
task.execution_spec.service_account = "service_account_value"
request = dataplex_v1.CreateTaskRequest(
parent="parent_value",
task_id="task_id_value",
task=task,
)
# Make the request
operation = client.create_task(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.CreateTaskRequest, dict]
The request object. Create task request. |
parent |
str
Required. The resource name of the parent lake: |
task |
google.cloud.dataplex_v1.types.Task
Required. Task resource. This corresponds to the |
task_id |
str
Required. Task identifier. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Task A task represents a user-visible job. |
create_zone
create_zone(request: Optional[Union[google.cloud.dataplex_v1.types.service.CreateZoneRequest, dict]] = None, *, parent: Optional[str] = None, zone: Optional[google.cloud.dataplex_v1.types.resources.Zone] = None, zone_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Creates a zone resource within a lake.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_create_zone():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
zone = dataplex_v1.Zone()
zone.type_ = "CURATED"
zone.resource_spec.location_type = "MULTI_REGION"
request = dataplex_v1.CreateZoneRequest(
parent="parent_value",
zone_id="zone_id_value",
zone=zone,
)
# Make the request
operation = client.create_zone(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.CreateZoneRequest, dict]
The request object. Create zone request. |
parent |
str
Required. The resource name of the parent lake: |
zone |
google.cloud.dataplex_v1.types.Zone
Required. Zone resource. This corresponds to the |
zone_id |
str
Required. Zone identifier. This ID will be used to generate names such as database and dataset names when publishing metadata to Hive Metastore and BigQuery. - Must contain only lowercase letters, numbers and hyphens. - Must start with a letter. - Must end with a number or a letter. - Must be between 1-63 characters. - Must be unique across all lakes from all locations in a project. - Must not be one of the reserved IDs (i.e. "default", "global-temp") This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Zone A zone represents a logical group of related assets within a lake. A zone can be used to map to organizational structure or represent stages of data readiness from raw to curated. It provides managing behavior that is shared or inherited by all contained assets. |
delete_asset
delete_asset(request: Optional[Union[google.cloud.dataplex_v1.types.service.DeleteAssetRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_delete_asset():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.DeleteAssetRequest(
name="name_value",
)
# Make the request
operation = client.delete_asset(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.DeleteAssetRequest, dict]
The request object. Delete asset request. |
name |
str
Required. The resource name of the asset: |
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. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be `google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_environment
delete_environment(request: Optional[Union[google.cloud.dataplex_v1.types.service.DeleteEnvironmentRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_delete_environment():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.DeleteEnvironmentRequest(
name="name_value",
)
# Make the request
operation = client.delete_environment(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.DeleteEnvironmentRequest, dict]
The request object. Delete environment request. |
name |
str
Required. The resource name of the environment: |
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. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be `google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_lake
delete_lake(request: Optional[Union[google.cloud.dataplex_v1.types.service.DeleteLakeRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_delete_lake():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.DeleteLakeRequest(
name="name_value",
)
# Make the request
operation = client.delete_lake(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.DeleteLakeRequest, dict]
The request object. Delete lake request. |
name |
str
Required. The resource name of the lake: |
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. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be `google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_operation
delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes a long-running operation.
This method indicates that the client is no longer interested
in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Name | Description |
request |
`.operations_pb2.DeleteOperationRequest`
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_task
delete_task(request: Optional[Union[google.cloud.dataplex_v1.types.service.DeleteTaskRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Delete the task resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_delete_task():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.DeleteTaskRequest(
name="name_value",
)
# Make the request
operation = client.delete_task(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.DeleteTaskRequest, dict]
The request object. Delete task request. |
name |
str
Required. The resource name of the task: |
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. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be `google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_zone
delete_zone(request: Optional[Union[google.cloud.dataplex_v1.types.service.DeleteZoneRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_delete_zone():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.DeleteZoneRequest(
name="name_value",
)
# Make the request
operation = client.delete_zone(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.DeleteZoneRequest, dict]
The request object. Delete zone request. |
name |
str
Required. The resource name of the zone: |
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. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be `google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
environment_path
environment_path(project: str, location: str, lake: str, environment: str)
Returns a fully-qualified environment string.
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
DataplexServiceClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Name | Description |
info |
dict
The service account private key info. |
Type | Description |
DataplexServiceClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Name | Description |
filename |
str
The path to the service account private key json file. |
Type | Description |
DataplexServiceClient | The constructed client. |
get_asset
get_asset(request: Optional[Union[google.cloud.dataplex_v1.types.service.GetAssetRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Retrieves an asset resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_get_asset():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.GetAssetRequest(
name="name_value",
)
# Make the request
response = client.get_asset(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.GetAssetRequest, dict]
The request object. Get asset request. |
name |
str
Required. The resource name of the asset: |
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. |
Type | Description |
google.cloud.dataplex_v1.types.Asset | An asset represents a cloud resource that is being managed within a lake as a member of a zone. |
get_environment
get_environment(request: Optional[Union[google.cloud.dataplex_v1.types.service.GetEnvironmentRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get environment resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_get_environment():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.GetEnvironmentRequest(
name="name_value",
)
# Make the request
response = client.get_environment(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.GetEnvironmentRequest, dict]
The request object. Get environment request. |
name |
str
Required. The resource name of the environment: |
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. |
Type | Description |
google.cloud.dataplex_v1.types.Environment | Environment represents a user-visible compute infrastructure for analytics within a lake. |
get_job
get_job(request: Optional[Union[google.cloud.dataplex_v1.types.service.GetJobRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get job resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_get_job():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.GetJobRequest(
name="name_value",
)
# Make the request
response = client.get_job(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.GetJobRequest, dict]
The request object. Get job request. |
name |
str
Required. The resource name of the 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. |
Type | Description |
google.cloud.dataplex_v1.types.Job | A job represents an instance of a task. |
get_lake
get_lake(request: Optional[Union[google.cloud.dataplex_v1.types.service.GetLakeRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Retrieves a lake resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_get_lake():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.GetLakeRequest(
name="name_value",
)
# Make the request
response = client.get_lake(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.GetLakeRequest, dict]
The request object. Get lake request. |
name |
str
Required. The resource name of the lake: |
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. |
Type | Description |
google.cloud.dataplex_v1.types.Lake | A lake is a centralized repository for managing enterprise data across the organization distributed across many cloud projects, and stored in a variety of storage services such as Google Cloud Storage and BigQuery. The resources attached to a lake are referred to as managed resources. Data within these managed resources can be structured or unstructured. A lake provides data admins with tools to organize, secure and manage their data at scale, and provides data scientists and data engineers an integrated experience to easily search, discover, analyze and transform data and associated metadata. |
get_location
get_location(request: Optional[google.cloud.location.locations_pb2.GetLocationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Gets information about a location.
Name | Description |
request |
`.location_pb2.GetLocationRequest`
The request object. Request message for |
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. |
Type | Description |
`.location_pb2.Location` | Location object. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: Optional[google.api_core.client_options.ClientOptions] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If any errors happen. |
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] | returns the API endpoint and the client cert source to use. |
get_operation
get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Gets the latest state of a long-running operation.
Name | Description |
request |
`.operations_pb2.GetOperationRequest`
The request object. Request message for |
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. |
Type | Description |
`.operations_pb2.Operation` | An ``Operation`` object. |
get_task
get_task(request: Optional[Union[google.cloud.dataplex_v1.types.service.GetTaskRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Get task resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_get_task():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.GetTaskRequest(
name="name_value",
)
# Make the request
response = client.get_task(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.GetTaskRequest, dict]
The request object. Get task request. |
name |
str
Required. The resource name of the task: |
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. |
Type | Description |
google.cloud.dataplex_v1.types.Task | A task represents a user-visible job. |
get_zone
get_zone(request: Optional[Union[google.cloud.dataplex_v1.types.service.GetZoneRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Retrieves a zone resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_get_zone():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.GetZoneRequest(
name="name_value",
)
# Make the request
response = client.get_zone(request=request)
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.GetZoneRequest, dict]
The request object. Get zone request. |
name |
str
Required. The resource name of the zone: |
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. |
Type | Description |
google.cloud.dataplex_v1.types.Zone | A zone represents a logical group of related assets within a lake. A zone can be used to map to organizational structure or represent stages of data readiness from raw to curated. It provides managing behavior that is shared or inherited by all contained assets. |
job_path
job_path(project: str, location: str, lake: str, task: str, job: str)
Returns a fully-qualified job string.
lake_path
lake_path(project: str, location: str, lake: str)
Returns a fully-qualified lake string.
list_asset_actions
list_asset_actions(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListAssetActionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists action resources in an asset.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_asset_actions():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListAssetActionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_asset_actions(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListAssetActionsRequest, dict]
The request object. List asset actions request. |
parent |
str
Required. The resource name of the parent asset: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListAssetActionsPager | List actions response. Iterating over this object will yield results and resolve additional pages automatically. |
list_assets
list_assets(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListAssetsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists asset resources in a zone.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_assets():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListAssetsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_assets(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListAssetsRequest, dict]
The request object. List assets request. |
parent |
str
Required. The resource name of the parent zone: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListAssetsPager | List assets response. Iterating over this object will yield results and resolve additional pages automatically. |
list_environments
list_environments(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListEnvironmentsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists environments under the given lake.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_environments():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListEnvironmentsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_environments(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListEnvironmentsRequest, dict]
The request object. List environments request. |
parent |
str
Required. The resource name of the parent lake: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListEnvironmentsPager | List environments response. Iterating over this object will yield results and resolve additional pages automatically. |
list_jobs
list_jobs(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListJobsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists Jobs under the given task.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_jobs():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListJobsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_jobs(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListJobsRequest, dict]
The request object. List jobs request. |
parent |
str
Required. The resource name of the parent environment: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListJobsPager | List jobs response. Iterating over this object will yield results and resolve additional pages automatically. |
list_lake_actions
list_lake_actions(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListLakeActionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists action resources in a lake.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_lake_actions():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListLakeActionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_lake_actions(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListLakeActionsRequest, dict]
The request object. List lake actions request. |
parent |
str
Required. The resource name of the parent lake: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListLakeActionsPager | List actions response. Iterating over this object will yield results and resolve additional pages automatically. |
list_lakes
list_lakes(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListLakesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists lake resources in a project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_lakes():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListLakesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_lakes(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListLakesRequest, dict]
The request object. List lakes request. |
parent |
str
Required. The resource name of the lake location, of the form: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListLakesPager | List lakes response. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(request: Optional[google.cloud.location.locations_pb2.ListLocationsRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists information about the supported locations for this service.
Name | Description |
request |
`.location_pb2.ListLocationsRequest`
The request object. Request message for |
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. |
Type | Description |
`.location_pb2.ListLocationsResponse` | Response message for ``ListLocations`` method. |
list_operations
list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists operations that match the specified filter in the request.
Name | Description |
request |
`.operations_pb2.ListOperationsRequest`
The request object. Request message for |
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. |
Type | Description |
`.operations_pb2.ListOperationsResponse` | Response message for ``ListOperations`` method. |
list_sessions
list_sessions(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListSessionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists session resources in an environment.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_sessions():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListSessionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_sessions(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListSessionsRequest, dict]
The request object. List sessions request. |
parent |
str
Required. The resource name of the parent environment: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListSessionsPager | List sessions response. Iterating over this object will yield results and resolve additional pages automatically. |
list_tasks
list_tasks(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListTasksRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists tasks under the given lake.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_tasks():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListTasksRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_tasks(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListTasksRequest, dict]
The request object. List tasks request. |
parent |
str
Required. The resource name of the parent lake: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListTasksPager | List tasks response. Iterating over this object will yield results and resolve additional pages automatically. |
list_zone_actions
list_zone_actions(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListZoneActionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists action resources in a zone.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_zone_actions():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListZoneActionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_zone_actions(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListZoneActionsRequest, dict]
The request object. List zone actions request. |
parent |
str
Required. The resource name of the parent zone: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListZoneActionsPager | List actions response. Iterating over this object will yield results and resolve additional pages automatically. |
list_zones
list_zones(request: Optional[Union[google.cloud.dataplex_v1.types.service.ListZonesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Lists zone resources in a lake.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_list_zones():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.ListZonesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_zones(request=request)
# Handle the response
for response in page_result:
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.ListZonesRequest, dict]
The request object. List zones request. |
parent |
str
Required. The resource name of the parent lake: |
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. |
Type | Description |
google.cloud.dataplex_v1.services.dataplex_service.pagers.ListZonesPager | List zones response. Iterating over this object will yield results and resolve additional pages automatically. |
parse_action_path
parse_action_path(path: str)
Parses a action path into its component segments.
parse_asset_path
parse_asset_path(path: str)
Parses a asset path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str)
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str)
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str)
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str)
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str)
Parse a project path into its component segments.
parse_environment_path
parse_environment_path(path: str)
Parses a environment path into its component segments.
parse_job_path
parse_job_path(path: str)
Parses a job path into its component segments.
parse_lake_path
parse_lake_path(path: str)
Parses a lake path into its component segments.
parse_session_path
parse_session_path(path: str)
Parses a session path into its component segments.
parse_task_path
parse_task_path(path: str)
Parses a task path into its component segments.
parse_zone_path
parse_zone_path(path: str)
Parses a zone path into its component segments.
session_path
session_path(
project: str, location: str, lake: str, environment: str, session: str
)
Returns a fully-qualified session string.
task_path
task_path(project: str, location: str, lake: str, task: str)
Returns a fully-qualified task string.
update_asset
update_asset(request: Optional[Union[google.cloud.dataplex_v1.types.service.UpdateAssetRequest, dict]] = None, *, asset: Optional[google.cloud.dataplex_v1.types.resources.Asset] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Updates an asset resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_update_asset():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
asset = dataplex_v1.Asset()
asset.resource_spec.type_ = "BIGQUERY_DATASET"
request = dataplex_v1.UpdateAssetRequest(
asset=asset,
)
# Make the request
operation = client.update_asset(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.UpdateAssetRequest, dict]
The request object. Update asset request. |
asset |
google.cloud.dataplex_v1.types.Asset
Required. Update description. Only fields specified in |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Mask of fields to update. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Asset An asset represents a cloud resource that is being managed within a lake as a member of a zone. |
update_environment
update_environment(request: Optional[Union[google.cloud.dataplex_v1.types.service.UpdateEnvironmentRequest, dict]] = None, *, environment: Optional[google.cloud.dataplex_v1.types.analyze.Environment] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Update the environment resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_update_environment():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
environment = dataplex_v1.Environment()
environment.infrastructure_spec.os_image.image_version = "image_version_value"
request = dataplex_v1.UpdateEnvironmentRequest(
environment=environment,
)
# Make the request
operation = client.update_environment(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.UpdateEnvironmentRequest, dict]
The request object. Update environment request. |
environment |
google.cloud.dataplex_v1.types.Environment
Required. Update description. Only fields specified in |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Mask of fields to update. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Environment Environment represents a user-visible compute infrastructure for analytics within a lake. |
update_lake
update_lake(request: Optional[Union[google.cloud.dataplex_v1.types.service.UpdateLakeRequest, dict]] = None, *, lake: Optional[google.cloud.dataplex_v1.types.resources.Lake] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Updates a lake resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_update_lake():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
request = dataplex_v1.UpdateLakeRequest(
)
# Make the request
operation = client.update_lake(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.UpdateLakeRequest, dict]
The request object. Update lake request. |
lake |
google.cloud.dataplex_v1.types.Lake
Required. Update description. Only fields specified in |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Mask of fields to update. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Lake A lake is a centralized repository for managing enterprise data across the organization distributed across many cloud projects, and stored in a variety of storage services such as Google Cloud Storage and BigQuery. The resources attached to a lake are referred to as managed resources. Data within these managed resources can be structured or unstructured. A lake provides data admins with tools to organize, secure and manage their data at scale, and provides data scientists and data engineers an integrated experience to easily search, discover, analyze and transform data and associated metadata. |
update_task
update_task(request: Optional[Union[google.cloud.dataplex_v1.types.service.UpdateTaskRequest, dict]] = None, *, task: Optional[google.cloud.dataplex_v1.types.tasks.Task] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Update the task resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_update_task():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
task = dataplex_v1.Task()
task.spark.main_jar_file_uri = "main_jar_file_uri_value"
task.trigger_spec.schedule = "schedule_value"
task.trigger_spec.type_ = "RECURRING"
task.execution_spec.service_account = "service_account_value"
request = dataplex_v1.UpdateTaskRequest(
task=task,
)
# Make the request
operation = client.update_task(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.UpdateTaskRequest, dict]
The request object. Update task request. |
task |
google.cloud.dataplex_v1.types.Task
Required. Update description. Only fields specified in |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Mask of fields to update. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Task A task represents a user-visible job. |
update_zone
update_zone(request: Optional[Union[google.cloud.dataplex_v1.types.service.UpdateZoneRequest, dict]] = None, *, zone: Optional[google.cloud.dataplex_v1.types.resources.Zone] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())
Updates a zone resource.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1
def sample_update_zone():
# Create a client
client = dataplex_v1.DataplexServiceClient()
# Initialize request argument(s)
zone = dataplex_v1.Zone()
zone.type_ = "CURATED"
zone.resource_spec.location_type = "MULTI_REGION"
request = dataplex_v1.UpdateZoneRequest(
zone=zone,
)
# Make the request
operation = client.update_zone(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Name | Description |
request |
Union[google.cloud.dataplex_v1.types.UpdateZoneRequest, dict]
The request object. Update zone request. |
zone |
google.cloud.dataplex_v1.types.Zone
Required. Update description. Only fields specified in |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Mask of fields to update. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Type | Description |
google.api_core.operation.Operation | An object representing a long-running operation. The result type for the operation will be Zone A zone represents a logical group of related assets within a lake. A zone can be used to map to organizational structure or represent stages of data readiness from raw to curated. It provides managing behavior that is shared or inherited by all contained assets. |
zone_path
zone_path(project: str, location: str, lake: str, zone: str)
Returns a fully-qualified zone string.