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.

DataCatalog

class google.cloud.datacatalog_v1.services.data_catalog.DataCatalogAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport, typing.Callable[[...], google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport]]] = 'grpc_asyncio', client_options: typing.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]

Data Catalog API service allows you to discover, understand, and manage your data.

Instantiates the data catalog async 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 (Optional[Union[str,DataCatalogTransport,Callable[..., DataCatalogTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the DataCatalogTransport constructor. If set to None, a transport is chosen automatically.

  • client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –

    Custom options for the client.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises

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

property api_endpoint

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

async cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Starts asynchronous cancellation on a long-running operation.

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

Parameters
  • request (CancelOperationRequest) – The request object. Request message for CancelOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

None

static common_billing_account_path(billing_account: str) str

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str

Returns a fully-qualified folder string.

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

Returns a fully-qualified location string.

static common_organization_path(organization: str) str

Returns a fully-qualified organization string.

static common_project_path(project: str) str

Returns a fully-qualified project string.

async create_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateEntryRequest, dict]] = None, *, parent: Optional[str] = None, entry_id: Optional[str] = None, entry: Optional[google.cloud.datacatalog_v1.types.datacatalog.Entry] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Creates an entry.

You can create entries only with ‘FILESET’, ‘CLUSTER’, ‘DATA_STREAM’, or custom types. Data Catalog automatically creates entries with other types during metadata ingestion from integrated systems.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

An entry group can have a maximum of 100,000 entries.

# 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 datacatalog_v1

async def sample_create_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    entry = datacatalog_v1.Entry()
    entry.type_ = "FEATURE_GROUP"
    entry.integrated_system = "VERTEX_AI"
    entry.gcs_fileset_spec.file_patterns = ['file_patterns_value1', 'file_patterns_value2']

    request = datacatalog_v1.CreateEntryRequest(
        parent="parent_value",
        entry_id="entry_id_value",
        entry=entry,
    )

    # Make the request
    response = await client.create_entry(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.CreateEntryRequest, dict]]) – The request object. Request message for [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry].

  • parent (str) –

    Required. The name of the entry group this entry belongs to. Note: The entry itself and its child resources might not be stored in the location specified in its name.

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

  • entry_id (str) –

    Required. The ID of the entry to create.

    The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores (_). The maximum size is 64 bytes when encoded in UTF-8.

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

  • entry (google.cloud.datacatalog_v1.types.Entry) – Required. The entry to create. This corresponds to the entry field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

async create_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateEntryGroupRequest, dict]] = None, *, parent: Optional[str] = None, entry_group_id: Optional[str] = None, entry_group: Optional[google.cloud.datacatalog_v1.types.datacatalog.EntryGroup] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryGroup[source]

Creates an entry group.

An entry group contains logically related entries together with Cloud Identity and Access Management policies. These policies specify users who can create, edit, and view entries within entry groups.

Data Catalog automatically creates entry groups with names that start with the @ symbol for the following resources:

  • BigQuery entries (@bigquery)

  • Pub/Sub topics (@pubsub)

  • Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})

You can create your own entry groups for Cloud Storage fileset entries and custom entries together with the corresponding IAM policies. User-created entry groups can’t contain the @ symbol, it is reserved for automatically created groups.

Entry groups, like entries, can be searched.

A maximum of 10,000 entry groups may be created per organization across all locations.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_create_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.CreateEntryGroupRequest(
        parent="parent_value",
        entry_group_id="entry_group_id_value",
    )

    # Make the request
    response = await client.create_entry_group(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.CreateEntryGroupRequest, dict]]) – The request object. Request message for [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup].

  • parent (str) –

    Required. The names of the project and location that the new entry group belongs to.

    Note: The entry group itself and its child resources might not be stored in the location specified in its name.

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

  • entry_group_id (str) –

    Required. The ID of the entry group to create.

    The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.

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

  • entry_group (google.cloud.datacatalog_v1.types.EntryGroup) –

    The entry group to create. Defaults to empty.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Entry group metadata.

An EntryGroup resource represents a logical grouping of zero or more Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.

Return type

google.cloud.datacatalog_v1.types.EntryGroup

async create_tag(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateTagRequest, dict]] = None, *, parent: Optional[str] = None, tag: Optional[google.cloud.datacatalog_v1.types.tags.Tag] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.Tag[source]

Creates a tag and assigns it to:

  • An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is projects.locations.entryGroups.entries.tags.create.

  • Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method name is projects.locations.entryGroups.tags.create.

Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.

# 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 datacatalog_v1

async def sample_create_tag():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    tag = datacatalog_v1.Tag()
    tag.column = "column_value"
    tag.template = "template_value"

    request = datacatalog_v1.CreateTagRequest(
        parent="parent_value",
        tag=tag,
    )

    # Make the request
    response = await client.create_tag(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.CreateTagRequest, dict]]) – The request object. Request message for [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag].

  • parent (str) –

    Required. The name of the resource to attach this tag to. Tags can be attached to entries or entry groups. An entry can have up to 1000 attached tags.

    Note: The tag and its child resources might not be stored in the location specified in its name.

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

  • tag (google.cloud.datacatalog_v1.types.Tag) – Required. The tag to create. This corresponds to the tag field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Tags contain custom metadata and are attached to Data Catalog resources. Tags

conform with the specification of their tag template.

See [Data Catalog IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information on the permissions needed to create or view tags.

Return type

google.cloud.datacatalog_v1.types.Tag

async create_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateTagTemplateRequest, dict]] = None, *, parent: Optional[str] = None, tag_template_id: Optional[str] = None, tag_template: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplate] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplate[source]

Creates a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

# 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 datacatalog_v1

async def sample_create_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.CreateTagTemplateRequest(
        parent="parent_value",
        tag_template_id="tag_template_id_value",
    )

    # Make the request
    response = await client.create_tag_template(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.CreateTagTemplateRequest, dict]]) – The request object. Request message for [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate].

  • parent (str) –

    Required. The name of the project and the template location region.

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

  • tag_template_id (str) –

    Required. The ID of the tag template to create.

    The ID must contain only lowercase letters (a-z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.

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

  • tag_template (google.cloud.datacatalog_v1.types.TagTemplate) – Required. The tag template to create. This corresponds to the tag_template field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – 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 tag template defines a tag that can have one or more typed fields.

The template is used to create tags that are attached to Google Cloud

resources. [Tag template roles]

(https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) provide permissions to create, edit, and use the template. For example, see the [TagTemplate User] (https://cloud.google.com/data-catalog/docs/how-to/template-user) role that includes a permission to use the tag template to tag resources.

Return type

google.cloud.datacatalog_v1.types.TagTemplate

async create_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateTagTemplateFieldRequest, dict]] = None, *, parent: Optional[str] = None, tag_template_field_id: Optional[str] = None, tag_template_field: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplateField] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Creates a field in a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_create_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    tag_template_field = datacatalog_v1.TagTemplateField()
    tag_template_field.type_.primitive_type = "RICHTEXT"

    request = datacatalog_v1.CreateTagTemplateFieldRequest(
        parent="parent_value",
        tag_template_field_id="tag_template_field_id_value",
        tag_template_field=tag_template_field,
    )

    # Make the request
    response = await client.create_tag_template_field(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.CreateTagTemplateFieldRequest, dict]]) – The request object. Request message for [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField].

  • parent (str) –

    Required. The name of the project and the template location region.

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

  • tag_template_field_id (str) –

    Required. The ID of the tag template field to create.

    Note: Adding a required field to an existing template is not allowed.

    Field IDs can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template.

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

  • tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField) –

    Required. The tag template field to create.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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 template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

async delete_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes an existing entry.

You can delete only the entries created by the [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_delete_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteEntryRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_entry(request=request)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.DeleteEntryRequest, dict]]) – The request object. Request message for [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry].

  • name (str) –

    Required. The name of the entry to delete.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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.

async delete_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteEntryGroupRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes an entry group.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_delete_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteEntryGroupRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_entry_group(request=request)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.DeleteEntryGroupRequest, dict]]) – The request object. Request message for [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup].

  • name (str) –

    Required. The name of the entry group to delete.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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.

async delete_operation(request: Optional[google.longrunning.operations_pb2.DeleteOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a long-running operation.

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

Parameters
  • request (DeleteOperationRequest) – The request object. Request message for DeleteOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

None

async delete_tag(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteTagRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a tag.

# 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 datacatalog_v1

async def sample_delete_tag():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteTagRequest(
        name="name_value",
    )

    # Make the request
    await client.delete_tag(request=request)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.DeleteTagRequest, dict]]) – The request object. Request message for [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag].

  • name (str) –

    Required. The name of the tag to delete.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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.

async delete_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteTagTemplateRequest, dict]] = None, *, name: Optional[str] = None, force: Optional[bool] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a tag template and all tags that use it.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_delete_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteTagTemplateRequest(
        name="name_value",
        force=True,
    )

    # Make the request
    await client.delete_tag_template(request=request)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.DeleteTagTemplateRequest, dict]]) – The request object. Request message for [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate].

  • name (str) –

    Required. The name of the tag template to delete.

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

  • force (bool) –

    Required. If true, deletes all tags that use this template.

    Currently, true is the only supported value.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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.

async delete_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteTagTemplateFieldRequest, dict]] = None, *, name: Optional[str] = None, force: Optional[bool] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a field in a tag template and all uses of this field from the tags based on this template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_delete_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteTagTemplateFieldRequest(
        name="name_value",
        force=True,
    )

    # Make the request
    await client.delete_tag_template_field(request=request)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.DeleteTagTemplateFieldRequest, dict]]) – The request object. Request message for [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField].

  • name (str) –

    Required. The name of the tag template field to delete.

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

  • force (bool) –

    Required. If true, deletes this field from any tags that use it.

    Currently, true is the only supported value.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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.

static entry_group_path(project: str, location: str, entry_group: str) str

Returns a fully-qualified entry_group string.

static entry_path(project: str, location: str, entry_group: str, entry: str) str

Returns a fully-qualified entry string.

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

DataCatalogAsyncClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataCatalogAsyncClient

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

DataCatalogAsyncClient

async get_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.GetEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Gets an entry.

# 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 datacatalog_v1

async def sample_get_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.GetEntryRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_entry(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.GetEntryRequest, dict]]) – The request object. Request message for [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry].

  • name (str) –

    Required. The name of the entry to get.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

async get_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.GetEntryGroupRequest, dict]] = None, *, name: Optional[str] = None, read_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryGroup[source]

Gets an entry group.

# 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 datacatalog_v1

async def sample_get_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.GetEntryGroupRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_entry_group(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.GetEntryGroupRequest, dict]]) – The request object. Request message for [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup].

  • name (str) –

    Required. The name of the entry group to get.

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

  • read_mask (google.protobuf.field_mask_pb2.FieldMask) –

    The fields to return. If empty or omitted, all fields are returned.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Entry group metadata.

An EntryGroup resource represents a logical grouping of zero or more Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.

Return type

google.cloud.datacatalog_v1.types.EntryGroup

async get_iam_policy(request: Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]] = None, *, resource: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy[source]

Gets the access control policy for a resource.

May return:

  • ANOT_FOUND error if the resource doesn’t exist or you don’t have the permission to view it.

  • An empty policy if the resource exists but doesn’t have a set policy.

Supported resources are:

  • Tag templates

  • Entry groups

Note: This method doesn’t get policies from Google Cloud Platform resources ingested into Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.getIamPolicy to get policies on tag templates.

  • datacatalog.entryGroups.getIamPolicy to get policies on entry groups.

# 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 datacatalog_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

async def sample_get_iam_policy():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.GetIamPolicyRequest(
        resource="resource_value",
    )

    # Make the request
    response = await client.get_iam_policy(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]) – The request object. Request message for GetIamPolicy method.

  • resource (str) –

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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 Identity and Access Management (IAM) policy, which specifies access

controls for Google Cloud resources.

A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.

For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

JSON example:

`     {       "bindings": [         {           "role": "roles/resourcemanager.organizationAdmin",           "members": [             "user:mike@example.com",             "group:admins@example.com",             "domain:google.com",             "serviceAccount:my-project-id@appspot.gserviceaccount.com"           ]         },         {           "role": "roles/resourcemanager.organizationViewer",           "members": [             "user:eve@example.com"           ],           "condition": {             "title": "expirable access",             "description": "Does not grant access after Sep 2020",             "expression": "request.time <             timestamp('2020-10-01T00:00:00.000Z')",           }         }       ],       "etag": "BwWWja0YfJA=",       "version": 3     }`

YAML example:

`     bindings:     - members:       - user:mike@example.com       - group:admins@example.com       - domain:google.com       - serviceAccount:my-project-id@appspot.gserviceaccount.com       role: roles/resourcemanager.organizationAdmin     - members:       - user:eve@example.com       role: roles/resourcemanager.organizationViewer       condition:         title: expirable access         description: Does not grant access after Sep 2020         expression: request.time < timestamp('2020-10-01T00:00:00.000Z')     etag: BwWWja0YfJA=     version: 3`

For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).

Return type

google.iam.v1.policy_pb2.Policy

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

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

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

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

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

Parameters

client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

async get_operation(request: Optional[google.longrunning.operations_pb2.GetOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.longrunning.operations_pb2.Operation[source]

Gets the latest state of a long-running operation.

Parameters
  • request (GetOperationRequest) – The request object. Request message for GetOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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 Operation object.

Return type

Operation

async get_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.GetTagTemplateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplate[source]

Gets a tag template.

# 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 datacatalog_v1

async def sample_get_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.GetTagTemplateRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_tag_template(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.GetTagTemplateRequest, dict]]) – The request object. Request message for [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate].

  • name (str) –

    Required. The name of the tag template to get.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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 tag template defines a tag that can have one or more typed fields.

The template is used to create tags that are attached to Google Cloud

resources. [Tag template roles]

(https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) provide permissions to create, edit, and use the template. For example, see the [TagTemplate User] (https://cloud.google.com/data-catalog/docs/how-to/template-user) role that includes a permission to use the tag template to tag resources.

Return type

google.cloud.datacatalog_v1.types.TagTemplate

classmethod get_transport_class(label: Optional[str] = None) Type[google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport]

Returns an appropriate transport class.

Parameters

label – The name of the desired transport. If none is provided, then the first transport in the registry is used.

Returns

The transport class to use.

async import_entries(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ImportEntriesRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

Imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog. Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog.

ImportEntries accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of [DumpItem][google.cloud.datacatalog.v1.DumpItem] type.

ImportEntries returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] and an [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] message.

# 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 datacatalog_v1

async def sample_import_entries():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ImportEntriesRequest(
        gcs_bucket_path="gcs_bucket_path_value",
        parent="parent_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ImportEntriesRequest, dict]]) – The request object. Request message for [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries] method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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 google.cloud.datacatalog_v1.types.ImportEntriesResponse Response message for [long-running operation][google.longrunning.Operation]

returned by the [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries].

Return type

google.api_core.operation_async.AsyncOperation

async list_entries(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ListEntriesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesAsyncPager[source]

Lists entries.

Note: Currently, this method can list only custom entries. To get a list of both custom and automatically created entries, use [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

# 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 datacatalog_v1

async def sample_list_entries():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ListEntriesRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ListEntriesRequest, dict]]) – The request object. Request message for [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].

  • parent (str) –

    Required. The name of the entry group that contains the entries to list. Can be provided in URL format.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for

[ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesAsyncPager

async list_entry_groups(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsAsyncPager[source]

Lists entry groups.

# 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 datacatalog_v1

async def sample_list_entry_groups():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ListEntryGroupsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ListEntryGroupsRequest, dict]]) – The request object. Request message for [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].

  • parent (str) –

    Required. The name of the location that contains the entry groups to list. Can be provided as a URL.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for

[ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsAsyncPager

async list_operations(request: Optional[google.longrunning.operations_pb2.ListOperationsRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.longrunning.operations_pb2.ListOperationsResponse[source]

Lists operations that match the specified filter in the request.

Parameters
  • request (ListOperationsRequest) – The request object. Request message for ListOperations method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for ListOperations method.

Return type

ListOperationsResponse

async list_tags(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ListTagsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsAsyncPager[source]

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are lowercased.

# 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 datacatalog_v1

async def sample_list_tags():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ListTagsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ListTagsRequest, dict]]) – The request object. Request message for [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].

  • parent (str) –

    Required. The name of the Data Catalog resource to list the tags of.

    The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] (without /entries/{entries} at the end).

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for

[ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsAsyncPager

async lookup_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.LookupEntryRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Gets an entry by its target resource name.

The resource name comes from the source Google Cloud Platform service.

# 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 datacatalog_v1

async def sample_lookup_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.LookupEntryRequest(
        linked_resource="linked_resource_value",
    )

    # Make the request
    response = await client.lookup_entry(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.LookupEntryRequest, dict]]) – The request object. Request message for [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry].

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

async modify_entry_contacts(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ModifyEntryContactsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Contacts[source]

Modifies contacts, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry].

To call this method, you must have the datacatalog.entries.updateContacts IAM permission on the corresponding project.

# 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 datacatalog_v1

async def sample_modify_entry_contacts():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ModifyEntryContactsRequest(
        name="name_value",
    )

    # Make the request
    response = await client.modify_entry_contacts(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ModifyEntryContactsRequest, dict]]) – The request object. Request message for [ModifyEntryContacts][google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContacts].

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Contact people for the entry.

Return type

google.cloud.datacatalog_v1.types.Contacts

async modify_entry_overview(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ModifyEntryOverviewRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryOverview[source]

Modifies entry overview, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry].

To call this method, you must have the datacatalog.entries.updateOverview IAM permission on the corresponding project.

# 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 datacatalog_v1

async def sample_modify_entry_overview():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ModifyEntryOverviewRequest(
        name="name_value",
    )

    # Make the request
    response = await client.modify_entry_overview(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ModifyEntryOverviewRequest, dict]]) – The request object. Request message for [ModifyEntryOverview][google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverview].

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Entry overview fields for rich text descriptions of entries.

Return type

google.cloud.datacatalog_v1.types.EntryOverview

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_entry_group_path(path: str) Dict[str, str]

Parses a entry_group path into its component segments.

static parse_entry_path(path: str) Dict[str, str]

Parses a entry path into its component segments.

static parse_tag_path(path: str) Dict[str, str]

Parses a tag path into its component segments.

static parse_tag_template_field_enum_value_path(path: str) Dict[str, str]

Parses a tag_template_field_enum_value path into its component segments.

static parse_tag_template_field_path(path: str) Dict[str, str]

Parses a tag_template_field path into its component segments.

static parse_tag_template_path(path: str) Dict[str, str]

Parses a tag_template path into its component segments.

async reconcile_tags(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ReconcileTagsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation_async.AsyncOperation[source]

ReconcileTags creates or updates a list of tags on the entry. If the [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] parameter is set, the operation deletes tags not included in the input tag list.

ReconcileTags returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ReconcileTagsMetadata] [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and a [ReconcileTagsResponse] [google.cloud.datacatalog.v1.ReconcileTagsResponse] message.

# 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 datacatalog_v1

async def sample_reconcile_tags():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ReconcileTagsRequest(
        parent="parent_value",
        tag_template="tag_template_value",
    )

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

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

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.ReconcileTagsRequest, dict]]) – The request object. Request message for [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags].

  • retry (google.api_core.retry_async.AsyncRetry) – 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 google.cloud.datacatalog_v1.types.ReconcileTagsResponse [Long-running operation][google.longrunning.Operation]

response message returned by [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags].

Return type

google.api_core.operation_async.AsyncOperation

async rename_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.RenameTagTemplateFieldRequest, dict]] = None, *, name: Optional[str] = None, new_tag_template_field_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Renames a field in a tag template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

# 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 datacatalog_v1

async def sample_rename_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.RenameTagTemplateFieldRequest(
        name="name_value",
        new_tag_template_field_id="new_tag_template_field_id_value",
    )

    # Make the request
    response = await client.rename_tag_template_field(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.RenameTagTemplateFieldRequest, dict]]) – The request object. Request message for [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField].

  • name (str) –

    Required. The name of the tag template field.

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

  • new_tag_template_field_id (str) –

    Required. The new ID of this tag template field. For example, my_new_field.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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 template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

async rename_tag_template_field_enum_value(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.RenameTagTemplateFieldEnumValueRequest, dict]] = None, *, name: Optional[str] = None, new_enum_value_display_name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Renames an enum value in a tag template.

Within a single enum field, enum values must be unique.

# 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 datacatalog_v1

async def sample_rename_tag_template_field_enum_value():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.RenameTagTemplateFieldEnumValueRequest(
        name="name_value",
        new_enum_value_display_name="new_enum_value_display_name_value",
    )

    # Make the request
    response = await client.rename_tag_template_field_enum_value(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.RenameTagTemplateFieldEnumValueRequest, dict]]) – The request object. Request message for [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue].

  • name (str) –

    Required. The name of the enum field value.

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

  • new_enum_value_display_name (str) –

    Required. The new display name of the enum value. For example, my_new_enum_value.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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 template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

async search_catalog(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogRequest, dict]] = None, *, scope: Optional[google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogRequest.Scope] = None, query: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogAsyncPager[source]

Searches Data Catalog for multiple resources like entries and tags that match a query.

This is a [Custom Method] (https://cloud.google.com/apis/design/custom_methods) that doesn’t return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods.

Note: Data Catalog search queries don’t guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries.

For more information, see [Data Catalog search syntax] (https://cloud.google.com/data-catalog/docs/how-to/search-reference).

# 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 datacatalog_v1

async def sample_search_catalog():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.SearchCatalogRequest(
    )

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

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.SearchCatalogRequest, dict]]) – The request object. Request message for [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

  • scope (google.cloud.datacatalog_v1.types.SearchCatalogRequest.Scope) –

    Required. The scope of this search request.

    The scope is invalid if include_org_ids, include_project_ids are empty AND include_gcp_public_datasets is set to false. In this case, the request returns an error.

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

  • query (str) –

    Optional. The query string with a minimum of 3 characters and specific syntax. For more information, see Data Catalog search syntax.

    An empty query string returns all data assets (in the specified scope) that you have access to.

    A query string can be a simple xyz or qualified by predicates:

    • name:x

    • column:y

    • description:z

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for

[SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogAsyncPager

async set_iam_policy(request: Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]] = None, *, resource: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy[source]

Sets an access control policy for a resource. Replaces any existing policy.

Supported resources are:

  • Tag templates

  • Entry groups

Note: This method sets policies only within Data Catalog and can’t be used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources synced with the Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.setIamPolicy to set policies on tag templates.

  • datacatalog.entryGroups.setIamPolicy to set policies on entry groups.

# 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 datacatalog_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

async def sample_set_iam_policy():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.SetIamPolicyRequest(
        resource="resource_value",
    )

    # Make the request
    response = await client.set_iam_policy(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]) – The request object. Request message for SetIamPolicy method.

  • resource (str) –

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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 Identity and Access Management (IAM) policy, which specifies access

controls for Google Cloud resources.

A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.

For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

JSON example:

`     {       "bindings": [         {           "role": "roles/resourcemanager.organizationAdmin",           "members": [             "user:mike@example.com",             "group:admins@example.com",             "domain:google.com",             "serviceAccount:my-project-id@appspot.gserviceaccount.com"           ]         },         {           "role": "roles/resourcemanager.organizationViewer",           "members": [             "user:eve@example.com"           ],           "condition": {             "title": "expirable access",             "description": "Does not grant access after Sep 2020",             "expression": "request.time <             timestamp('2020-10-01T00:00:00.000Z')",           }         }       ],       "etag": "BwWWja0YfJA=",       "version": 3     }`

YAML example:

`     bindings:     - members:       - user:mike@example.com       - group:admins@example.com       - domain:google.com       - serviceAccount:my-project-id@appspot.gserviceaccount.com       role: roles/resourcemanager.organizationAdmin     - members:       - user:eve@example.com       role: roles/resourcemanager.organizationViewer       condition:         title: expirable access         description: Does not grant access after Sep 2020         expression: request.time < timestamp('2020-10-01T00:00:00.000Z')     etag: BwWWja0YfJA=     version: 3`

For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).

Return type

google.iam.v1.policy_pb2.Policy

async star_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.StarEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.StarEntryResponse[source]

Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by the current user. Starring information is private to each user.

# 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 datacatalog_v1

async def sample_star_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.StarEntryRequest(
        name="name_value",
    )

    # Make the request
    response = await client.star_entry(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.StarEntryRequest, dict]]) – The request object. Request message for [StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry].

  • name (str) –

    Required. The name of the entry to mark as starred.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for

[StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry]. Empty for now

Return type

google.cloud.datacatalog_v1.types.StarEntryResponse

static tag_path(project: str, location: str, entry_group: str, entry: str, tag: str) str

Returns a fully-qualified tag string.

static tag_template_field_enum_value_path(project: str, location: str, tag_template: str, tag_template_field_id: str, enum_value_display_name: str) str

Returns a fully-qualified tag_template_field_enum_value string.

static tag_template_field_path(project: str, location: str, tag_template: str, field: str) str

Returns a fully-qualified tag_template_field string.

static tag_template_path(project: str, location: str, tag_template: str) str

Returns a fully-qualified tag_template string.

async test_iam_permissions(request: Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse[source]

Gets your permissions on a resource.

Returns an empty set of permissions if the resource doesn’t exist.

Supported resources are:

  • Tag templates

  • Entry groups

Note: This method gets policies only within Data Catalog and can’t be used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources ingested into Data Catalog.

No Google IAM permissions are required to call this method.

# 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 datacatalog_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

async def sample_test_iam_permissions():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.TestIamPermissionsRequest(
        resource="resource_value",
        permissions=['permissions_value1', 'permissions_value2'],
    )

    # Make the request
    response = await client.test_iam_permissions(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]) – The request object. Request message for TestIamPermissions method.

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for TestIamPermissions method.

Return type

google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse

property transport: google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport

Returns the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

DataCatalogTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used

by the client instance.

Return type

str

async unstar_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UnstarEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.UnstarEntryResponse[source]

Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by the current user. Starring information is private to each user.

# 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 datacatalog_v1

async def sample_unstar_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.UnstarEntryRequest(
        name="name_value",
    )

    # Make the request
    response = await client.unstar_entry(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.UnstarEntryRequest, dict]]) – The request object. Request message for [UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry].

  • name (str) –

    Required. The name of the entry to mark as not starred.

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

  • retry (google.api_core.retry_async.AsyncRetry) – 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

Response message for

[UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry]. Empty for now

Return type

google.cloud.datacatalog_v1.types.UnstarEntryResponse

async update_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateEntryRequest, dict]] = None, *, entry: Optional[google.cloud.datacatalog_v1.types.datacatalog.Entry] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Updates an existing entry.

You must enable the Data Catalog API in the project identified by the entry.name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_update_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    entry = datacatalog_v1.Entry()
    entry.type_ = "FEATURE_GROUP"
    entry.integrated_system = "VERTEX_AI"
    entry.gcs_fileset_spec.file_patterns = ['file_patterns_value1', 'file_patterns_value2']

    request = datacatalog_v1.UpdateEntryRequest(
        entry=entry,
    )

    # Make the request
    response = await client.update_entry(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.UpdateEntryRequest, dict]]) – The request object. Request message for [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry].

  • entry (google.cloud.datacatalog_v1.types.Entry) –

    Required. Updates for the entry. The name field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on an entry.

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    You can modify only the fields listed below.

    For entries with type DATA_STREAM:

    • schema

    For entries with type FILESET:

    • schema

    • display_name

    • description

    • gcs_fileset_spec

    • gcs_fileset_spec.file_patterns

    For entries with user_specified_type:

    • schema

    • display_name

    • description

    • user_specified_type

    • user_specified_system

    • linked_resource

    • source_system_timestamps

    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_async.AsyncRetry) – 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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

async update_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateEntryGroupRequest, dict]] = None, *, entry_group: Optional[google.cloud.datacatalog_v1.types.datacatalog.EntryGroup] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryGroup[source]

Updates an entry group.

You must enable the Data Catalog API in the project identified by the entry_group.name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_update_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.UpdateEntryGroupRequest(
    )

    # Make the request
    response = await client.update_entry_group(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.UpdateEntryGroupRequest, dict]]) – The request object. Request message for [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup].

  • entry_group (google.cloud.datacatalog_v1.types.EntryGroup) –

    Required. Updates for the entry group. The name field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on an entry group. If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    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_async.AsyncRetry) – 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

Entry group metadata.

An EntryGroup resource represents a logical grouping of zero or more Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.

Return type

google.cloud.datacatalog_v1.types.EntryGroup

async update_tag(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateTagRequest, dict]] = None, *, tag: Optional[google.cloud.datacatalog_v1.types.tags.Tag] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.Tag[source]

Updates an existing tag.

# 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 datacatalog_v1

async def sample_update_tag():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    tag = datacatalog_v1.Tag()
    tag.column = "column_value"
    tag.template = "template_value"

    request = datacatalog_v1.UpdateTagRequest(
        tag=tag,
    )

    # Make the request
    response = await client.update_tag(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.UpdateTagRequest, dict]]) – The request object. Request message for [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag].

  • tag (google.cloud.datacatalog_v1.types.Tag) –

    Required. The updated tag. The “name” field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on a tag. Currently, a tag has the only modifiable field with the name fields.

    In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    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_async.AsyncRetry) – 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

Tags contain custom metadata and are attached to Data Catalog resources. Tags

conform with the specification of their tag template.

See [Data Catalog IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information on the permissions needed to create or view tags.

Return type

google.cloud.datacatalog_v1.types.Tag

async update_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateTagTemplateRequest, dict]] = None, *, tag_template: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplate] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplate[source]

Updates a tag template.

You can’t update template fields with this method. These fields are separate resources with their own create, update, and delete methods.

You must enable the Data Catalog API in the project identified by the tag_template.name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_update_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    request = datacatalog_v1.UpdateTagTemplateRequest(
    )

    # Make the request
    response = await client.update_tag_template(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.UpdateTagTemplateRequest, dict]]) – The request object. Request message for [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate].

  • tag_template (google.cloud.datacatalog_v1.types.TagTemplate) –

    Required. The template to update. The name field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on a tag template. Currently, only display_name and is_publicly_readable can be overwritten.

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    Note: Updating the is_publicly_readable field may require up to 12 hours to take effect in search results.

    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_async.AsyncRetry) – 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 tag template defines a tag that can have one or more typed fields.

The template is used to create tags that are attached to Google Cloud

resources. [Tag template roles]

(https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) provide permissions to create, edit, and use the template. For example, see the [TagTemplate User] (https://cloud.google.com/data-catalog/docs/how-to/template-user) role that includes a permission to use the tag template to tag resources.

Return type

google.cloud.datacatalog_v1.types.TagTemplate

async update_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateTagTemplateFieldRequest, dict]] = None, *, name: Optional[str] = None, tag_template_field: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplateField] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Updates a field in a tag template.

You can’t update the field type with this method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

async def sample_update_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogAsyncClient()

    # Initialize request argument(s)
    tag_template_field = datacatalog_v1.TagTemplateField()
    tag_template_field.type_.primitive_type = "RICHTEXT"

    request = datacatalog_v1.UpdateTagTemplateFieldRequest(
        name="name_value",
        tag_template_field=tag_template_field,
    )

    # Make the request
    response = await client.update_tag_template_field(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.cloud.datacatalog_v1.types.UpdateTagTemplateFieldRequest, dict]]) – The request object. Request message for [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField].

  • name (str) –

    Required. The name of the tag template field.

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

  • tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField) – Required. The template to update. This corresponds to the tag_template_field field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. Names of fields whose values to overwrite on an individual field of a tag template. The following fields are modifiable:

    • display_name

    • type.enum_type

    • is_required

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied with one exception: when updating an enum type, the provided values are merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted or renamed.

    Additionally, updating a template field from optional to required is not allowed.

    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_async.AsyncRetry) – 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 template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

class google.cloud.datacatalog_v1.services.data_catalog.DataCatalogClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport, typing.Callable[[...], google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Data Catalog API service allows you to discover, understand, and manage your data.

Instantiates the data catalog 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 (Optional[Union[str,DataCatalogTransport,Callable[..., DataCatalogTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the DataCatalogTransport constructor. If set to None, a transport is chosen automatically.

  • client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –

    Custom options for the client.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises

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

__exit__(type, value, traceback)[source]

Releases underlying transport’s resources.

Warning

ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!

property api_endpoint

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

cancel_operation(request: Optional[google.longrunning.operations_pb2.CancelOperationRequest] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Starts asynchronous cancellation on a long-running operation.

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

Parameters
  • request (CancelOperationRequest) – The request object. Request message for CancelOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

None

static common_billing_account_path(billing_account: str) str[source]

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str[source]

Returns a fully-qualified folder string.

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

Returns a fully-qualified location string.

static common_organization_path(organization: str) str[source]

Returns a fully-qualified organization string.

static common_project_path(project: str) str[source]

Returns a fully-qualified project string.

create_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateEntryRequest, dict]] = None, *, parent: Optional[str] = None, entry_id: Optional[str] = None, entry: Optional[google.cloud.datacatalog_v1.types.datacatalog.Entry] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Creates an entry.

You can create entries only with ‘FILESET’, ‘CLUSTER’, ‘DATA_STREAM’, or custom types. Data Catalog automatically creates entries with other types during metadata ingestion from integrated systems.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

An entry group can have a maximum of 100,000 entries.

# 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 datacatalog_v1

def sample_create_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    entry = datacatalog_v1.Entry()
    entry.type_ = "FEATURE_GROUP"
    entry.integrated_system = "VERTEX_AI"
    entry.gcs_fileset_spec.file_patterns = ['file_patterns_value1', 'file_patterns_value2']

    request = datacatalog_v1.CreateEntryRequest(
        parent="parent_value",
        entry_id="entry_id_value",
        entry=entry,
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.CreateEntryRequest, dict]) – The request object. Request message for [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry].

  • parent (str) –

    Required. The name of the entry group this entry belongs to. Note: The entry itself and its child resources might not be stored in the location specified in its name.

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

  • entry_id (str) –

    Required. The ID of the entry to create.

    The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores (_). The maximum size is 64 bytes when encoded in UTF-8.

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

  • entry (google.cloud.datacatalog_v1.types.Entry) – Required. The entry to create. This corresponds to the entry 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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

create_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateEntryGroupRequest, dict]] = None, *, parent: Optional[str] = None, entry_group_id: Optional[str] = None, entry_group: Optional[google.cloud.datacatalog_v1.types.datacatalog.EntryGroup] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryGroup[source]

Creates an entry group.

An entry group contains logically related entries together with Cloud Identity and Access Management policies. These policies specify users who can create, edit, and view entries within entry groups.

Data Catalog automatically creates entry groups with names that start with the @ symbol for the following resources:

  • BigQuery entries (@bigquery)

  • Pub/Sub topics (@pubsub)

  • Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})

You can create your own entry groups for Cloud Storage fileset entries and custom entries together with the corresponding IAM policies. User-created entry groups can’t contain the @ symbol, it is reserved for automatically created groups.

Entry groups, like entries, can be searched.

A maximum of 10,000 entry groups may be created per organization across all locations.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_create_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.CreateEntryGroupRequest(
        parent="parent_value",
        entry_group_id="entry_group_id_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.CreateEntryGroupRequest, dict]) – The request object. Request message for [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup].

  • parent (str) –

    Required. The names of the project and location that the new entry group belongs to.

    Note: The entry group itself and its child resources might not be stored in the location specified in its name.

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

  • entry_group_id (str) –

    Required. The ID of the entry group to create.

    The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.

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

  • entry_group (google.cloud.datacatalog_v1.types.EntryGroup) –

    The entry group to create. Defaults to empty.

    This corresponds to the entry_group 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

Entry group metadata.

An EntryGroup resource represents a logical grouping of zero or more Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.

Return type

google.cloud.datacatalog_v1.types.EntryGroup

create_tag(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateTagRequest, dict]] = None, *, parent: Optional[str] = None, tag: Optional[google.cloud.datacatalog_v1.types.tags.Tag] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.Tag[source]

Creates a tag and assigns it to:

  • An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is projects.locations.entryGroups.entries.tags.create.

  • Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method name is projects.locations.entryGroups.tags.create.

Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.

# 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 datacatalog_v1

def sample_create_tag():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    tag = datacatalog_v1.Tag()
    tag.column = "column_value"
    tag.template = "template_value"

    request = datacatalog_v1.CreateTagRequest(
        parent="parent_value",
        tag=tag,
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.CreateTagRequest, dict]) – The request object. Request message for [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag].

  • parent (str) –

    Required. The name of the resource to attach this tag to. Tags can be attached to entries or entry groups. An entry can have up to 1000 attached tags.

    Note: The tag and its child resources might not be stored in the location specified in its name.

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

  • tag (google.cloud.datacatalog_v1.types.Tag) – Required. The tag to create. This corresponds to the tag 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

Tags contain custom metadata and are attached to Data Catalog resources. Tags

conform with the specification of their tag template.

See [Data Catalog IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information on the permissions needed to create or view tags.

Return type

google.cloud.datacatalog_v1.types.Tag

create_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateTagTemplateRequest, dict]] = None, *, parent: Optional[str] = None, tag_template_id: Optional[str] = None, tag_template: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplate] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplate[source]

Creates a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

# 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 datacatalog_v1

def sample_create_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.CreateTagTemplateRequest(
        parent="parent_value",
        tag_template_id="tag_template_id_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.CreateTagTemplateRequest, dict]) – The request object. Request message for [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate].

  • parent (str) –

    Required. The name of the project and the template location region.

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

  • tag_template_id (str) –

    Required. The ID of the tag template to create.

    The ID must contain only lowercase letters (a-z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.

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

  • tag_template (google.cloud.datacatalog_v1.types.TagTemplate) – Required. The tag template to create. This corresponds to the tag_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 tag template defines a tag that can have one or more typed fields.

The template is used to create tags that are attached to Google Cloud

resources. [Tag template roles]

(https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) provide permissions to create, edit, and use the template. For example, see the [TagTemplate User] (https://cloud.google.com/data-catalog/docs/how-to/template-user) role that includes a permission to use the tag template to tag resources.

Return type

google.cloud.datacatalog_v1.types.TagTemplate

create_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.CreateTagTemplateFieldRequest, dict]] = None, *, parent: Optional[str] = None, tag_template_field_id: Optional[str] = None, tag_template_field: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplateField] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Creates a field in a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_create_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    tag_template_field = datacatalog_v1.TagTemplateField()
    tag_template_field.type_.primitive_type = "RICHTEXT"

    request = datacatalog_v1.CreateTagTemplateFieldRequest(
        parent="parent_value",
        tag_template_field_id="tag_template_field_id_value",
        tag_template_field=tag_template_field,
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.CreateTagTemplateFieldRequest, dict]) – The request object. Request message for [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField].

  • parent (str) –

    Required. The name of the project and the template location region.

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

  • tag_template_field_id (str) –

    Required. The ID of the tag template field to create.

    Note: Adding a required field to an existing template is not allowed.

    Field IDs can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template.

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

  • tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField) –

    Required. The tag template field to create.

    This corresponds to the tag_template_field 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 template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

delete_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes an existing entry.

You can delete only the entries created by the [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_delete_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteEntryRequest(
        name="name_value",
    )

    # Make the request
    client.delete_entry(request=request)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.DeleteEntryRequest, dict]) – The request object. Request message for [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry].

  • name (str) –

    Required. The name of the entry to delete.

    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.

delete_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteEntryGroupRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes an entry group.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_delete_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteEntryGroupRequest(
        name="name_value",
    )

    # Make the request
    client.delete_entry_group(request=request)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.DeleteEntryGroupRequest, dict]) – The request object. Request message for [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup].

  • name (str) –

    Required. The name of the entry group to delete.

    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.

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

Deletes a long-running operation.

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

Parameters
  • request (DeleteOperationRequest) – The request object. Request message for DeleteOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

None

delete_tag(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteTagRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a tag.

# 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 datacatalog_v1

def sample_delete_tag():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteTagRequest(
        name="name_value",
    )

    # Make the request
    client.delete_tag(request=request)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.DeleteTagRequest, dict]) – The request object. Request message for [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag].

  • name (str) –

    Required. The name of the tag to delete.

    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.

delete_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteTagTemplateRequest, dict]] = None, *, name: Optional[str] = None, force: Optional[bool] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a tag template and all tags that use it.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_delete_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteTagTemplateRequest(
        name="name_value",
        force=True,
    )

    # Make the request
    client.delete_tag_template(request=request)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.DeleteTagTemplateRequest, dict]) – The request object. Request message for [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate].

  • name (str) –

    Required. The name of the tag template to delete.

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

  • force (bool) –

    Required. If true, deletes all tags that use this template.

    Currently, true is the only supported value.

    This corresponds to the force 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.

delete_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.DeleteTagTemplateFieldRequest, dict]] = None, *, name: Optional[str] = None, force: Optional[bool] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a field in a tag template and all uses of this field from the tags based on this template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_delete_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.DeleteTagTemplateFieldRequest(
        name="name_value",
        force=True,
    )

    # Make the request
    client.delete_tag_template_field(request=request)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.DeleteTagTemplateFieldRequest, dict]) – The request object. Request message for [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField].

  • name (str) –

    Required. The name of the tag template field to delete.

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

  • force (bool) –

    Required. If true, deletes this field from any tags that use it.

    Currently, true is the only supported value.

    This corresponds to the force 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.

static entry_group_path(project: str, location: str, entry_group: str) str[source]

Returns a fully-qualified entry_group string.

static entry_path(project: str, location: str, entry_group: str, entry: str) str[source]

Returns a fully-qualified entry string.

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

DataCatalogClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DataCatalogClient

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

DataCatalogClient

get_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.GetEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Gets an entry.

# 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 datacatalog_v1

def sample_get_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.GetEntryRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.GetEntryRequest, dict]) – The request object. Request message for [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry].

  • name (str) –

    Required. The name of the entry to get.

    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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

get_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.GetEntryGroupRequest, dict]] = None, *, name: Optional[str] = None, read_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryGroup[source]

Gets an entry group.

# 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 datacatalog_v1

def sample_get_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.GetEntryGroupRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.GetEntryGroupRequest, dict]) – The request object. Request message for [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup].

  • name (str) –

    Required. The name of the entry group to get.

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

  • read_mask (google.protobuf.field_mask_pb2.FieldMask) –

    The fields to return. If empty or omitted, all fields are returned.

    This corresponds to the read_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

Entry group metadata.

An EntryGroup resource represents a logical grouping of zero or more Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.

Return type

google.cloud.datacatalog_v1.types.EntryGroup

get_iam_policy(request: Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]] = None, *, resource: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy[source]

Gets the access control policy for a resource.

May return:

  • ANOT_FOUND error if the resource doesn’t exist or you don’t have the permission to view it.

  • An empty policy if the resource exists but doesn’t have a set policy.

Supported resources are:

  • Tag templates

  • Entry groups

Note: This method doesn’t get policies from Google Cloud Platform resources ingested into Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.getIamPolicy to get policies on tag templates.

  • datacatalog.entryGroups.getIamPolicy to get policies on entry groups.

# 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 datacatalog_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

def sample_get_iam_policy():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.GetIamPolicyRequest(
        resource="resource_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]) – The request object. Request message for GetIamPolicy method.

  • resource (str) –

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

    This corresponds to the resource 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 Identity and Access Management (IAM) policy, which specifies access

controls for Google Cloud resources.

A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.

For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

JSON example:

`     {       "bindings": [         {           "role": "roles/resourcemanager.organizationAdmin",           "members": [             "user:mike@example.com",             "group:admins@example.com",             "domain:google.com",             "serviceAccount:my-project-id@appspot.gserviceaccount.com"           ]         },         {           "role": "roles/resourcemanager.organizationViewer",           "members": [             "user:eve@example.com"           ],           "condition": {             "title": "expirable access",             "description": "Does not grant access after Sep 2020",             "expression": "request.time <             timestamp('2020-10-01T00:00:00.000Z')",           }         }       ],       "etag": "BwWWja0YfJA=",       "version": 3     }`

YAML example:

`     bindings:     - members:       - user:mike@example.com       - group:admins@example.com       - domain:google.com       - serviceAccount:my-project-id@appspot.gserviceaccount.com       role: roles/resourcemanager.organizationAdmin     - members:       - user:eve@example.com       role: roles/resourcemanager.organizationViewer       condition:         title: expirable access         description: Does not grant access after Sep 2020         expression: request.time < timestamp('2020-10-01T00:00:00.000Z')     etag: BwWWja0YfJA=     version: 3`

For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).

Return type

google.iam.v1.policy_pb2.Policy

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

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

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

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

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

Parameters

client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

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

Gets the latest state of a long-running operation.

Parameters
  • request (GetOperationRequest) – The request object. Request message for GetOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

An Operation object.

Return type

Operation

get_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.GetTagTemplateRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplate[source]

Gets a tag template.

# 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 datacatalog_v1

def sample_get_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.GetTagTemplateRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.GetTagTemplateRequest, dict]) – The request object. Request message for [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate].

  • name (str) –

    Required. The name of the tag template to get.

    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 tag template defines a tag that can have one or more typed fields.

The template is used to create tags that are attached to Google Cloud

resources. [Tag template roles]

(https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) provide permissions to create, edit, and use the template. For example, see the [TagTemplate User] (https://cloud.google.com/data-catalog/docs/how-to/template-user) role that includes a permission to use the tag template to tag resources.

Return type

google.cloud.datacatalog_v1.types.TagTemplate

import_entries(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ImportEntriesRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation[source]

Imports entries from a source, such as data previously dumped into a Cloud Storage bucket, into Data Catalog. Import of entries is a sync operation that reconciles the state of the third-party system with the Data Catalog.

ImportEntries accepts source data snapshots of a third-party system. Snapshot should be delivered as a .wire or base65-encoded .txt file containing a sequence of Protocol Buffer messages of [DumpItem][google.cloud.datacatalog.v1.DumpItem] type.

ImportEntries returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ImportEntriesMetadata][google.cloud.datacatalog.v1.ImportEntriesMetadata] and an [ImportEntriesResponse][google.cloud.datacatalog.v1.ImportEntriesResponse] message.

# 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 datacatalog_v1

def sample_import_entries():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ImportEntriesRequest(
        gcs_bucket_path="gcs_bucket_path_value",
        parent="parent_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.datacatalog_v1.types.ImportEntriesResponse Response message for [long-running operation][google.longrunning.Operation]

returned by the [ImportEntries][google.cloud.datacatalog.v1.DataCatalog.ImportEntries].

Return type

google.api_core.operation.Operation

list_entries(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ListEntriesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesPager[source]

Lists entries.

Note: Currently, this method can list only custom entries. To get a list of both custom and automatically created entries, use [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

# 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 datacatalog_v1

def sample_list_entries():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ListEntriesRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.ListEntriesRequest, dict]) – The request object. Request message for [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].

  • parent (str) –

    Required. The name of the entry group that contains the entries to list. Can be provided in URL format.

    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

Response message for

[ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesPager

list_entry_groups(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsPager[source]

Lists entry groups.

# 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 datacatalog_v1

def sample_list_entry_groups():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ListEntryGroupsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.ListEntryGroupsRequest, dict]) – The request object. Request message for [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].

  • parent (str) –

    Required. The name of the location that contains the entry groups to list. Can be provided as a URL.

    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

Response message for

[ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsPager

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

Lists operations that match the specified filter in the request.

Parameters
  • request (ListOperationsRequest) – The request object. Request message for ListOperations method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Response message for ListOperations method.

Return type

ListOperationsResponse

list_tags(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ListTagsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsPager[source]

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are lowercased.

# 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 datacatalog_v1

def sample_list_tags():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ListTagsRequest(
        parent="parent_value",
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.ListTagsRequest, dict]) – The request object. Request message for [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].

  • parent (str) –

    Required. The name of the Data Catalog resource to list the tags of.

    The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] (without /entries/{entries} at the end).

    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

Response message for

[ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsPager

lookup_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.LookupEntryRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Gets an entry by its target resource name.

The resource name comes from the source Google Cloud Platform service.

# 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 datacatalog_v1

def sample_lookup_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.LookupEntryRequest(
        linked_resource="linked_resource_value",
    )

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

    # Handle the response
    print(response)
Parameters
Returns

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

modify_entry_contacts(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ModifyEntryContactsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Contacts[source]

Modifies contacts, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry].

To call this method, you must have the datacatalog.entries.updateContacts IAM permission on the corresponding project.

# 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 datacatalog_v1

def sample_modify_entry_contacts():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ModifyEntryContactsRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
Returns

Contact people for the entry.

Return type

google.cloud.datacatalog_v1.types.Contacts

modify_entry_overview(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ModifyEntryOverviewRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryOverview[source]

Modifies entry overview, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry].

To call this method, you must have the datacatalog.entries.updateOverview IAM permission on the corresponding project.

# 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 datacatalog_v1

def sample_modify_entry_overview():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ModifyEntryOverviewRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
Returns

Entry overview fields for rich text descriptions of entries.

Return type

google.cloud.datacatalog_v1.types.EntryOverview

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_entry_group_path(path: str) Dict[str, str][source]

Parses a entry_group path into its component segments.

static parse_entry_path(path: str) Dict[str, str][source]

Parses a entry path into its component segments.

static parse_tag_path(path: str) Dict[str, str][source]

Parses a tag path into its component segments.

static parse_tag_template_field_enum_value_path(path: str) Dict[str, str][source]

Parses a tag_template_field_enum_value path into its component segments.

static parse_tag_template_field_path(path: str) Dict[str, str][source]

Parses a tag_template_field path into its component segments.

static parse_tag_template_path(path: str) Dict[str, str][source]

Parses a tag_template path into its component segments.

reconcile_tags(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.ReconcileTagsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.api_core.operation.Operation[source]

ReconcileTags creates or updates a list of tags on the entry. If the [ReconcileTagsRequest.force_delete_missing][google.cloud.datacatalog.v1.ReconcileTagsRequest.force_delete_missing] parameter is set, the operation deletes tags not included in the input tag list.

ReconcileTags returns a [long-running operation] [google.longrunning.Operation] resource that can be queried with [Operations.GetOperation][google.longrunning.Operations.GetOperation] to return [ReconcileTagsMetadata] [google.cloud.datacatalog.v1.ReconcileTagsMetadata] and a [ReconcileTagsResponse] [google.cloud.datacatalog.v1.ReconcileTagsResponse] message.

# 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 datacatalog_v1

def sample_reconcile_tags():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.ReconcileTagsRequest(
        parent="parent_value",
        tag_template="tag_template_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Returns

An object representing a long-running operation.

The result type for the operation will be google.cloud.datacatalog_v1.types.ReconcileTagsResponse [Long-running operation][google.longrunning.Operation]

response message returned by [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags].

Return type

google.api_core.operation.Operation

rename_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.RenameTagTemplateFieldRequest, dict]] = None, *, name: Optional[str] = None, new_tag_template_field_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Renames a field in a tag template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

# 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 datacatalog_v1

def sample_rename_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.RenameTagTemplateFieldRequest(
        name="name_value",
        new_tag_template_field_id="new_tag_template_field_id_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.RenameTagTemplateFieldRequest, dict]) – The request object. Request message for [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField].

  • name (str) –

    Required. The name of the tag template field.

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

  • new_tag_template_field_id (str) –

    Required. The new ID of this tag template field. For example, my_new_field.

    This corresponds to the new_tag_template_field_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

The template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

rename_tag_template_field_enum_value(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.RenameTagTemplateFieldEnumValueRequest, dict]] = None, *, name: Optional[str] = None, new_enum_value_display_name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Renames an enum value in a tag template.

Within a single enum field, enum values must be unique.

# 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 datacatalog_v1

def sample_rename_tag_template_field_enum_value():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.RenameTagTemplateFieldEnumValueRequest(
        name="name_value",
        new_enum_value_display_name="new_enum_value_display_name_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.RenameTagTemplateFieldEnumValueRequest, dict]) – The request object. Request message for [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue].

  • name (str) –

    Required. The name of the enum field value.

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

  • new_enum_value_display_name (str) –

    Required. The new display name of the enum value. For example, my_new_enum_value.

    This corresponds to the new_enum_value_display_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

The template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

search_catalog(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogRequest, dict]] = None, *, scope: Optional[google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogRequest.Scope] = None, query: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogPager[source]

Searches Data Catalog for multiple resources like entries and tags that match a query.

This is a [Custom Method] (https://cloud.google.com/apis/design/custom_methods) that doesn’t return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods.

Note: Data Catalog search queries don’t guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries.

For more information, see [Data Catalog search syntax] (https://cloud.google.com/data-catalog/docs/how-to/search-reference).

# 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 datacatalog_v1

def sample_search_catalog():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.SearchCatalogRequest(
    )

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

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.SearchCatalogRequest, dict]) – The request object. Request message for [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

  • scope (google.cloud.datacatalog_v1.types.SearchCatalogRequest.Scope) –

    Required. The scope of this search request.

    The scope is invalid if include_org_ids, include_project_ids are empty AND include_gcp_public_datasets is set to false. In this case, the request returns an error.

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

  • query (str) –

    Optional. The query string with a minimum of 3 characters and specific syntax. For more information, see Data Catalog search syntax.

    An empty query string returns all data assets (in the specified scope) that you have access to.

    A query string can be a simple xyz or qualified by predicates:

    • name:x

    • column:y

    • description:z

    This corresponds to the query 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

Response message for

[SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogPager

set_iam_policy(request: Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]] = None, *, resource: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.policy_pb2.Policy[source]

Sets an access control policy for a resource. Replaces any existing policy.

Supported resources are:

  • Tag templates

  • Entry groups

Note: This method sets policies only within Data Catalog and can’t be used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources synced with the Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.setIamPolicy to set policies on tag templates.

  • datacatalog.entryGroups.setIamPolicy to set policies on entry groups.

# 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 datacatalog_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

def sample_set_iam_policy():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.SetIamPolicyRequest(
        resource="resource_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]) – The request object. Request message for SetIamPolicy method.

  • resource (str) –

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

    This corresponds to the resource 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 Identity and Access Management (IAM) policy, which specifies access

controls for Google Cloud resources.

A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.

For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

JSON example:

`     {       "bindings": [         {           "role": "roles/resourcemanager.organizationAdmin",           "members": [             "user:mike@example.com",             "group:admins@example.com",             "domain:google.com",             "serviceAccount:my-project-id@appspot.gserviceaccount.com"           ]         },         {           "role": "roles/resourcemanager.organizationViewer",           "members": [             "user:eve@example.com"           ],           "condition": {             "title": "expirable access",             "description": "Does not grant access after Sep 2020",             "expression": "request.time <             timestamp('2020-10-01T00:00:00.000Z')",           }         }       ],       "etag": "BwWWja0YfJA=",       "version": 3     }`

YAML example:

`     bindings:     - members:       - user:mike@example.com       - group:admins@example.com       - domain:google.com       - serviceAccount:my-project-id@appspot.gserviceaccount.com       role: roles/resourcemanager.organizationAdmin     - members:       - user:eve@example.com       role: roles/resourcemanager.organizationViewer       condition:         title: expirable access         description: Does not grant access after Sep 2020         expression: request.time < timestamp('2020-10-01T00:00:00.000Z')     etag: BwWWja0YfJA=     version: 3`

For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).

Return type

google.iam.v1.policy_pb2.Policy

star_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.StarEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.StarEntryResponse[source]

Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by the current user. Starring information is private to each user.

# 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 datacatalog_v1

def sample_star_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.StarEntryRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.StarEntryRequest, dict]) – The request object. Request message for [StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry].

  • name (str) –

    Required. The name of the entry to mark as starred.

    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

Response message for

[StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry]. Empty for now

Return type

google.cloud.datacatalog_v1.types.StarEntryResponse

static tag_path(project: str, location: str, entry_group: str, entry: str, tag: str) str[source]

Returns a fully-qualified tag string.

static tag_template_field_enum_value_path(project: str, location: str, tag_template: str, tag_template_field_id: str, enum_value_display_name: str) str[source]

Returns a fully-qualified tag_template_field_enum_value string.

static tag_template_field_path(project: str, location: str, tag_template: str, field: str) str[source]

Returns a fully-qualified tag_template_field string.

static tag_template_path(project: str, location: str, tag_template: str) str[source]

Returns a fully-qualified tag_template string.

test_iam_permissions(request: Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse[source]

Gets your permissions on a resource.

Returns an empty set of permissions if the resource doesn’t exist.

Supported resources are:

  • Tag templates

  • Entry groups

Note: This method gets policies only within Data Catalog and can’t be used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources ingested into Data Catalog.

No Google IAM permissions are required to call this method.

# 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 datacatalog_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

def sample_test_iam_permissions():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.TestIamPermissionsRequest(
        resource="resource_value",
        permissions=['permissions_value1', 'permissions_value2'],
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]) – The request object. Request message for TestIamPermissions method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

Response message for TestIamPermissions method.

Return type

google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse

property transport: google.cloud.datacatalog_v1.services.data_catalog.transports.base.DataCatalogTransport

Returns the transport used by the client instance.

Returns

The transport used by the client

instance.

Return type

DataCatalogTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used by the client instance.

Return type

str

unstar_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UnstarEntryRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.UnstarEntryResponse[source]

Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by the current user. Starring information is private to each user.

# 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 datacatalog_v1

def sample_unstar_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.UnstarEntryRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.UnstarEntryRequest, dict]) – The request object. Request message for [UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry].

  • name (str) –

    Required. The name of the entry to mark as not starred.

    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

Response message for

[UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry]. Empty for now

Return type

google.cloud.datacatalog_v1.types.UnstarEntryResponse

update_entry(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateEntryRequest, dict]] = None, *, entry: Optional[google.cloud.datacatalog_v1.types.datacatalog.Entry] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.Entry[source]

Updates an existing entry.

You must enable the Data Catalog API in the project identified by the entry.name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_update_entry():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    entry = datacatalog_v1.Entry()
    entry.type_ = "FEATURE_GROUP"
    entry.integrated_system = "VERTEX_AI"
    entry.gcs_fileset_spec.file_patterns = ['file_patterns_value1', 'file_patterns_value2']

    request = datacatalog_v1.UpdateEntryRequest(
        entry=entry,
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.UpdateEntryRequest, dict]) – The request object. Request message for [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry].

  • entry (google.cloud.datacatalog_v1.types.Entry) –

    Required. Updates for the entry. The name field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on an entry.

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    You can modify only the fields listed below.

    For entries with type DATA_STREAM:

    • schema

    For entries with type FILESET:

    • schema

    • display_name

    • description

    • gcs_fileset_spec

    • gcs_fileset_spec.file_patterns

    For entries with user_specified_type:

    • schema

    • display_name

    • description

    • user_specified_type

    • user_specified_system

    • linked_resource

    • source_system_timestamps

    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

Entry metadata.

A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the linked_resource field in the entry resource to refer to the original resource ID of the source system.

An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a [Tag][google.cloud.datacatalog.v1.Tag].

Return type

google.cloud.datacatalog_v1.types.Entry

update_entry_group(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateEntryGroupRequest, dict]] = None, *, entry_group: Optional[google.cloud.datacatalog_v1.types.datacatalog.EntryGroup] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.datacatalog.EntryGroup[source]

Updates an entry group.

You must enable the Data Catalog API in the project identified by the entry_group.name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_update_entry_group():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.UpdateEntryGroupRequest(
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.UpdateEntryGroupRequest, dict]) – The request object. Request message for [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup].

  • entry_group (google.cloud.datacatalog_v1.types.EntryGroup) –

    Required. Updates for the entry group. The name field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on an entry group. If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    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

Entry group metadata.

An EntryGroup resource represents a logical grouping of zero or more Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.

Return type

google.cloud.datacatalog_v1.types.EntryGroup

update_tag(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateTagRequest, dict]] = None, *, tag: Optional[google.cloud.datacatalog_v1.types.tags.Tag] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.Tag[source]

Updates an existing tag.

# 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 datacatalog_v1

def sample_update_tag():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    tag = datacatalog_v1.Tag()
    tag.column = "column_value"
    tag.template = "template_value"

    request = datacatalog_v1.UpdateTagRequest(
        tag=tag,
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.UpdateTagRequest, dict]) – The request object. Request message for [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag].

  • tag (google.cloud.datacatalog_v1.types.Tag) –

    Required. The updated tag. The “name” field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on a tag. Currently, a tag has the only modifiable field with the name fields.

    In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    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

Tags contain custom metadata and are attached to Data Catalog resources. Tags

conform with the specification of their tag template.

See [Data Catalog IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information on the permissions needed to create or view tags.

Return type

google.cloud.datacatalog_v1.types.Tag

update_tag_template(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateTagTemplateRequest, dict]] = None, *, tag_template: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplate] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplate[source]

Updates a tag template.

You can’t update template fields with this method. These fields are separate resources with their own create, update, and delete methods.

You must enable the Data Catalog API in the project identified by the tag_template.name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_update_tag_template():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    request = datacatalog_v1.UpdateTagTemplateRequest(
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.UpdateTagTemplateRequest, dict]) – The request object. Request message for [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate].

  • tag_template (google.cloud.datacatalog_v1.types.TagTemplate) –

    Required. The template to update. The name field must be set.

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

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Names of fields whose values to overwrite on a tag template. Currently, only display_name and is_publicly_readable can be overwritten.

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    Note: Updating the is_publicly_readable field may require up to 12 hours to take effect in search results.

    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

A tag template defines a tag that can have one or more typed fields.

The template is used to create tags that are attached to Google Cloud

resources. [Tag template roles]

(https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) provide permissions to create, edit, and use the template. For example, see the [TagTemplate User] (https://cloud.google.com/data-catalog/docs/how-to/template-user) role that includes a permission to use the tag template to tag resources.

Return type

google.cloud.datacatalog_v1.types.TagTemplate

update_tag_template_field(request: Optional[Union[google.cloud.datacatalog_v1.types.datacatalog.UpdateTagTemplateFieldRequest, dict]] = None, *, name: Optional[str] = None, tag_template_field: Optional[google.cloud.datacatalog_v1.types.tags.TagTemplateField] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.cloud.datacatalog_v1.types.tags.TagTemplateField[source]

Updates a field in a tag template.

You can’t update the field type with this method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

# 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 datacatalog_v1

def sample_update_tag_template_field():
    # Create a client
    client = datacatalog_v1.DataCatalogClient()

    # Initialize request argument(s)
    tag_template_field = datacatalog_v1.TagTemplateField()
    tag_template_field.type_.primitive_type = "RICHTEXT"

    request = datacatalog_v1.UpdateTagTemplateFieldRequest(
        name="name_value",
        tag_template_field=tag_template_field,
    )

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

    # Handle the response
    print(response)
Parameters
  • request (Union[google.cloud.datacatalog_v1.types.UpdateTagTemplateFieldRequest, dict]) – The request object. Request message for [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField].

  • name (str) –

    Required. The name of the tag template field.

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

  • tag_template_field (google.cloud.datacatalog_v1.types.TagTemplateField) – Required. The template to update. This corresponds to the tag_template_field field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. Names of fields whose values to overwrite on an individual field of a tag template. The following fields are modifiable:

    • display_name

    • type.enum_type

    • is_required

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied with one exception: when updating an enum type, the provided values are merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted or renamed.

    Additionally, updating a template field from optional to required is not allowed.

    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

The template for an individual field within a tag template.

Return type

google.cloud.datacatalog_v1.types.TagTemplateField

class google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesAsyncPager(method: Callable[[...], Awaitable[google.cloud.datacatalog_v1.types.datacatalog.ListEntriesResponse]], request: google.cloud.datacatalog_v1.types.datacatalog.ListEntriesRequest, response: google.cloud.datacatalog_v1.types.datacatalog.ListEntriesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_entries requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.ListEntriesResponse object, and provides an __aiter__ method to iterate through its entries field.

If there are more pages, the __aiter__ method will make additional ListEntries requests and continue to iterate through the entries field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.ListEntriesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntriesPager(method: Callable[[...], google.cloud.datacatalog_v1.types.datacatalog.ListEntriesResponse], request: google.cloud.datacatalog_v1.types.datacatalog.ListEntriesRequest, response: google.cloud.datacatalog_v1.types.datacatalog.ListEntriesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_entries requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.ListEntriesResponse object, and provides an __iter__ method to iterate through its entries field.

If there are more pages, the __iter__ method will make additional ListEntries requests and continue to iterate through the entries field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.ListEntriesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsResponse]], request: google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsRequest, response: google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_entry_groups requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.ListEntryGroupsResponse object, and provides an __aiter__ method to iterate through its entry_groups field.

If there are more pages, the __aiter__ method will make additional ListEntryGroups requests and continue to iterate through the entry_groups field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.ListEntryGroupsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.ListEntryGroupsPager(method: Callable[[...], google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsResponse], request: google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsRequest, response: google.cloud.datacatalog_v1.types.datacatalog.ListEntryGroupsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_entry_groups requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.ListEntryGroupsResponse object, and provides an __iter__ method to iterate through its entry_groups field.

If there are more pages, the __iter__ method will make additional ListEntryGroups requests and continue to iterate through the entry_groups field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.ListEntryGroupsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsAsyncPager(method: Callable[[...], Awaitable[google.cloud.datacatalog_v1.types.datacatalog.ListTagsResponse]], request: google.cloud.datacatalog_v1.types.datacatalog.ListTagsRequest, response: google.cloud.datacatalog_v1.types.datacatalog.ListTagsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_tags requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.ListTagsResponse object, and provides an __aiter__ method to iterate through its tags field.

If there are more pages, the __aiter__ method will make additional ListTags requests and continue to iterate through the tags field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.ListTagsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.ListTagsPager(method: Callable[[...], google.cloud.datacatalog_v1.types.datacatalog.ListTagsResponse], request: google.cloud.datacatalog_v1.types.datacatalog.ListTagsRequest, response: google.cloud.datacatalog_v1.types.datacatalog.ListTagsResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_tags requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.ListTagsResponse object, and provides an __iter__ method to iterate through its tags field.

If there are more pages, the __iter__ method will make additional ListTags requests and continue to iterate through the tags field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.ListTagsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogAsyncPager(method: Callable[[...], Awaitable[google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogResponse]], request: google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogRequest, response: google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through search_catalog requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.SearchCatalogResponse object, and provides an __aiter__ method to iterate through its results field.

If there are more pages, the __aiter__ method will make additional SearchCatalog requests and continue to iterate through the results field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.SearchCatalogResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.cloud.datacatalog_v1.services.data_catalog.pagers.SearchCatalogPager(method: Callable[[...], google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogResponse], request: google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogRequest, response: google.cloud.datacatalog_v1.types.datacatalog.SearchCatalogResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through search_catalog requests.

This class thinly wraps an initial google.cloud.datacatalog_v1.types.SearchCatalogResponse object, and provides an __iter__ method to iterate through its results field.

If there are more pages, the __iter__ method will make additional SearchCatalog requests and continue to iterate through the results field on the corresponding responses.

All the usual google.cloud.datacatalog_v1.types.SearchCatalogResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters