airflow.providers.google.cloud.hooks.datacatalog

Module Contents

Classes

CloudDataCatalogHook

Hook for Google Cloud Data Catalog Service.

class airflow.providers.google.cloud.hooks.datacatalog.CloudDataCatalogHook(gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None)[source]

Bases: airflow.providers.google.common.hooks.base_google.GoogleBaseHook

Hook for Google Cloud Data Catalog Service.

Parameters
  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (Optional[str]) -- The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

get_conn(self)[source]

Retrieves client library object that allow access to Cloud Data Catalog service.

create_entry(self, location, entry_group, entry_id, entry, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Creates an entry.

Currently only entries of 'FILESET' type can be created.

Parameters
  • location (str) -- Required. The location of the entry to create.

  • entry_group (str) -- Required. Entry group ID under which the entry is created.

  • entry_id (str) -- Required. The id of the entry to create.

  • entry (Union[dict, google.cloud.datacatalog.Entry]) -- Required. The entry to create. If a dict is provided, it must be of the same form as the protobuf message Entry

  • project_id (str) -- The ID of the Google Cloud project that owns the entry. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If set to None or missing, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

create_entry_group(self, location, entry_group_id, entry_group, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Creates an EntryGroup.

Parameters
  • location (str) -- Required. The location of the entry group to create.

  • entry_group_id (str) -- Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters.

  • entry_group (Union[Dict, google.cloud.datacatalog.EntryGroup]) --

    The entry group to create. Defaults to an empty entry group.

    If a dict is provided, it must be of the same form as the protobuf message EntryGroup

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

create_tag(self, location, entry_group, entry, tag, project_id=PROVIDE_PROJECT_ID, template_id=None, retry=DEFAULT, timeout=None, metadata=())[source]

Creates a tag on an entry.

Parameters
  • location (str) -- Required. The location of the tag to create.

  • entry_group (str) -- Required. Entry group ID under which the tag is created.

  • entry (str) -- Required. Entry group ID under which the tag is created.

  • tag (Union[dict, google.cloud.datacatalog.Tag]) -- Required. The tag to create. If a dict is provided, it must be of the same form as the protobuf message Tag

  • template_id (Optional[str]) -- Required. Template ID used to create tag

  • project_id (str) -- The ID of the Google Cloud project that owns the tag. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

create_tag_template(self, location, tag_template_id, tag_template, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Creates a tag template.

Parameters
  • location -- Required. The location of the tag template to create.

  • tag_template_id (str) -- Required. The id of the tag template to create.

  • tag_template (Union[dict, google.cloud.datacatalog.TagTemplate]) --

    Required. The tag template to create.

    If a dict is provided, it must be of the same form as the protobuf message TagTemplate

  • project_id (str) -- The ID of the Google Cloud project that owns the tag template. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

create_tag_template_field(self, location, tag_template, tag_template_field_id, tag_template_field, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Creates a field in a tag template.

Parameters
  • location (str) -- Required. The location of the tag template field to create.

  • tag_template (str) -- Required. The id of the tag template to create.

  • tag_template_field_id (str) -- Required. The ID of the tag template field to create. 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.

  • tag_template_field (Union[dict, google.cloud.datacatalog.TagTemplateField]) --

    Required. The tag template field to create.

    If a dict is provided, it must be of the same form as the protobuf message TagTemplateField

  • project_id (str) -- The ID of the Google Cloud project that owns the tag template field. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

delete_entry(self, location, entry_group, entry, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Deletes an existing entry.

Parameters
  • location (str) -- Required. The location of the entry to delete.

  • entry_group (str) -- Required. Entry group ID for entries that is deleted.

  • entry (str) -- Entry ID that is deleted.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

delete_entry_group(self, location, entry_group, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Deletes an EntryGroup.

Only entry groups that do not contain entries can be deleted.

Parameters
  • location -- Required. The location of the entry group to delete.

  • entry_group -- Entry group ID that is deleted.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

delete_tag(self, location, entry_group, entry, tag, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Deletes a tag.

Parameters
  • location (str) -- Required. The location of the tag to delete.

  • entry_group (str) -- Entry group ID for tag that is deleted.

  • entry (str) -- Entry ID for tag that is deleted.

  • tag (str) -- Identifier for TAG that is deleted.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

delete_tag_template(self, location, tag_template, force, project_id, retry=DEFAULT, timeout=None, metadata=())[source]

Deletes a tag template and all tags using the template.

Parameters
  • location -- Required. The location of the tag template to delete.

  • tag_template -- ID for tag template that is deleted.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • force (bool) -- Required. Currently, this field must always be set to true. This confirms the deletion of any possible tags using this template. force = false will be supported in the future.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

delete_tag_template_field(self, location, tag_template, field, force, project_id, retry=DEFAULT, timeout=None, metadata=())[source]

Deletes a field in a tag template and all uses of that field.

Parameters
  • location (str) -- Required. The location of the tag template to delete.

  • tag_template (str) -- Tag Template ID for tag template field that is deleted.

  • field (str) -- Name of field that is deleted.

  • force (bool) -- Required. This confirms the deletion of this field from any tags using this field.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

get_entry(self, location, entry_group, entry, project_id, retry=DEFAULT, timeout=None, metadata=())[source]

Gets an entry.

Parameters
  • location (str) -- Required. The location of the entry to get.

  • entry_group (str) -- Required. The entry group of the entry to get.

  • entry (str) -- The ID of the entry to get.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

get_entry_group(self, location, entry_group, project_id, read_mask=None, retry=DEFAULT, timeout=None, metadata=())[source]

Gets an entry group.

Parameters
  • location (str) -- Required. The location of the entry group to get.

  • entry_group (str) -- The ID of the entry group to get.

  • read_mask (Optional[google.protobuf.field_mask_pb2.FieldMask]) --

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

    If a dict is provided, it must be of the same form as the protobuf message FieldMask

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

get_tag_template(self, location, tag_template, project_id, retry=DEFAULT, timeout=None, metadata=())[source]

Gets a tag template.

Parameters
  • location (str) -- Required. The location of the tag template to get.

  • tag_template (str) -- Required. The ID of the tag template to get.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

list_tags(self, location, entry_group, entry, project_id, page_size=100, retry=DEFAULT, timeout=None, metadata=())[source]

Lists the tags on an Entry.

Parameters
  • location (str) -- Required. The location of the tags to get.

  • entry_group (str) -- Required. The entry group of the tags to get.

  • entry_group -- Required. The entry of the tags to get.

  • page_size (int) -- The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

get_tag_for_template_name(self, location, entry_group, entry, template_name, project_id, retry=DEFAULT, timeout=None, metadata=())[source]

Gets for a tag with a specific template for a specific entry.

Parameters
  • location (str) -- Required. The location which contains the entry to search for.

  • entry_group (str) -- The entry group ID which contains the entry to search for.

  • entry (str) -- The name of the entry to search for.

  • template_name (str) -- The name of the template that will be the search criterion.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

lookup_entry(self, linked_resource=None, sql_resource=None, retry=DEFAULT, timeout=None, metadata=())[source]

Get an entry by target resource name.

This method allows clients to use the resource name from the source Google Cloud service to get the Data Catalog Entry.

Parameters
  • linked_resource (Optional[str]) -- The full name of the Google Cloud resource the Data Catalog entry represents. See: https://cloud.google.com/apis/design/resource_names#full_resource_name. Full names are case-sensitive.

  • sql_resource (Optional[str]) -- The SQL name of the entry. SQL names are case-sensitive.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

rename_tag_template_field(self, location, tag_template, field, new_tag_template_field_id, project_id, retry=DEFAULT, timeout=None, metadata=())[source]

Renames a field in a tag template.

Parameters
  • location (str) -- Required. The location of the tag template field to rename.

  • tag_template (str) -- The tag template ID for field that is renamed.

  • field (str) -- Required. The old ID of this tag template field. For example, my_old_field.

  • new_tag_template_field_id (str) -- Required. The new ID of this tag template field. For example, my_new_field.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

search_catalog(self, scope, query, page_size=100, order_by=None, retry=DEFAULT, timeout=None, metadata=())[source]

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

This does not return the complete resource, only the resource identifier and high level fields. Clients can subsequently call Get methods.

Note that searches do not have full recall. There may be results that match your query but are not returned, even in subsequent pages of results. These missing results may vary across repeated calls to search. Do not rely on this method if you need to guarantee full recall.

Parameters
  • scope (Union[Dict, google.cloud.datacatalog.SearchCatalogRequest.Scope]) --

    Required. The scope of this search request.

    If a dict is provided, it must be of the same form as the protobuf message Scope

  • query (str) --

    Required. The query string in search query syntax. The query must be non-empty.

    Query strings can be simple as "x" or more qualified as:

    • name:x

    • column:x

    • description:y

    Note: Query tokens need to have a minimum of 3 characters for substring matching to work correctly. See Data Catalog Search Syntax for more information.

  • page_size (int) -- The maximum number of resources contained in the underlying API response. If page streaming is performed per-resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.

  • order_by (Optional[str]) --

    Specifies the ordering of results, currently supported case-sensitive choices are:

    • relevance, only supports descending

    • last_access_timestamp [asc|desc], defaults to descending if not specified

    • last_modified_timestamp [asc|desc], defaults to descending if not specified

    If not specified, defaults to relevance descending.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

update_entry(self, entry, update_mask, project_id, location=None, entry_group=None, entry_id=None, retry=DEFAULT, timeout=None, metadata=())[source]

Updates an existing entry.

Parameters
  • entry (Union[Dict, google.cloud.datacatalog.Entry]) --

    Required. The updated entry. The "name" field must be set.

    If a dict is provided, it must be of the same form as the protobuf message Entry

  • update_mask (Union[dict, google.protobuf.field_mask_pb2.FieldMask]) --

    The fields to update on the entry. If absent or empty, all modifiable fields are updated.

    If a dict is provided, it must be of the same form as the protobuf message FieldMask

  • location (Optional[str]) -- Required. The location of the entry to update.

  • entry_group (Optional[str]) -- The entry group ID for the entry that is being updated.

  • entry_id (Optional[str]) -- The entry ID that is being updated.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

update_tag(self, tag, update_mask, project_id, location=None, entry_group=None, entry=None, tag_id=None, retry=DEFAULT, timeout=None, metadata=())[source]

Updates an existing tag.

Parameters
  • tag (Union[Dict, google.cloud.datacatalog.Tag]) --

    Required. The updated tag. The "name" field must be set.

    If a dict is provided, it must be of the same form as the protobuf message Tag

  • update_mask (Union[Dict, google.protobuf.field_mask_pb2.FieldMask]) --

    The fields to update on the Tag. If absent or empty, all modifiable fields are updated. Currently the only modifiable field is the field fields.

    If a dict is provided, it must be of the same form as the protobuf message FieldMask

  • location (Optional[str]) -- Required. The location of the tag to rename.

  • entry_group (Optional[str]) -- The entry group ID for the tag that is being updated.

  • entry (Optional[str]) -- The entry ID for the tag that is being updated.

  • tag_id (Optional[str]) -- The tag ID that is being updated.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

update_tag_template(self, tag_template, update_mask, project_id, location=None, tag_template_id=None, retry=DEFAULT, timeout=None, metadata=())[source]

Updates a tag template.

This method cannot be used to update the fields of a template. The tag template fields are represented as separate resources and should be updated using their own create/update/delete methods.

Parameters
  • tag_template (Union[dict, google.cloud.datacatalog.TagTemplate]) --

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

    If a dict is provided, it must be of the same form as the protobuf message TagTemplate

  • update_mask (Union[dict, google.protobuf.field_mask_pb2.FieldMask]) --

    The field mask specifies the parts of the template to overwrite.

    If absent or empty, all of the allowed fields above will be updated.

    If a dict is provided, it must be of the same form as the protobuf message FieldMask

  • location (Optional[str]) -- Required. The location of the tag template to rename.

  • tag_template_id (Optional[str]) -- Optional. The tag template ID for the entry that is being updated.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

update_tag_template_field(self, tag_template_field, update_mask, project_id, tag_template_field_name=None, location=None, tag_template=None, tag_template_field_id=None, retry=DEFAULT, timeout=None, metadata=())[source]

Updates a field in a tag template. This method cannot be used to update the field type.

Parameters
  • tag_template_field (Union[dict, google.cloud.datacatalog.TagTemplateField]) --

    Required. The template to update.

    If a dict is provided, it must be of the same form as the protobuf message TagTemplateField

  • update_mask (Union[dict, google.protobuf.field_mask_pb2.FieldMask]) --

    The field mask specifies the parts of the template to be updated. Allowed fields:

    • display_name

    • type.enum_type

    If update_mask is not set or empty, all of the allowed fields above will be updated.

    When updating an enum type, the provided values will be merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted nor renamed.

    If a dict is provided, it must be of the same form as the protobuf message FieldMask

  • tag_template_field_name (Optional[str]) -- Optional. The name of the tag template field to rename.

  • location (Optional[str]) -- Optional. The location of the tag to rename.

  • tag_template (Optional[str]) -- Optional. The tag template ID for tag template field to rename.

  • tag_template_field_id (Optional[str]) -- Optional. The ID of tag template field to rename.

  • project_id (str) -- The ID of the Google Cloud project that owns the entry group. If set to None or missing, the default project_id from the Google Cloud connection is used.

  • retry (Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault]) -- A retry object used to retry requests. If None is specified, requests will be retried using a default configuration.

  • timeout (Optional[float]) -- The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (Sequence[Tuple[str, str]]) -- Additional metadata that is provided to the method.

Was this entry helpful?