DataCatalogAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.datacatalog_v1beta1.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>)
Data Catalog API service allows clients to discover, understand, and manage their data.
Properties
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
DataCatalogTransport | The transport used by the client instance. |
Methods
DataCatalogAsyncClient
DataCatalogAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Union[str, google.cloud.datacatalog_v1beta1.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>)
Instantiates the data catalog client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. It won't take effect if a |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError | If mutual TLS transport creation failed for any reason. |
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
create_entry
create_entry(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.CreateEntryRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
entry_id: typing.Optional[str] = None,
entry: typing.Optional[
google.cloud.datacatalog_v1beta1.types.datacatalog.Entry
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.Entry
Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
Users should enable the Data Catalog API in the project
identified by the parent
parameter (see Data Catalog
Resource Project
for more information).
A maximum of 100,000 entries may be created per 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_v1beta1
async def sample_create_entry():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
entry = datacatalog_v1beta1.Entry()
entry.type_ = "FILESET"
entry.integrated_system = "CLOUD_PUBSUB"
entry.gcs_fileset_spec.file_patterns = ['file_patterns_value1', 'file_patterns_value2']
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.CreateEntryRequest, dict]]
The request object. Request message for CreateEntry. |
parent |
Required. The name of the entry group this entry is in. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} Note that this Entry and its child resources may not actually be stored in the location in this name. This corresponds to the |
entry_id |
Required. The id of the entry to create. This corresponds to the |
entry |
Entry
Required. The entry to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.Entry | Entry Metadata. A Data Catalog Entry resource represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or outside of Google Cloud Platform. Clients 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, such as its schema. An Entry can also be used to attach flexible metadata, such as a Tag. |
create_entry_group
create_entry_group(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.CreateEntryGroupRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
entry_group_id: typing.Optional[str] = None,
entry_group: typing.Optional[
google.cloud.datacatalog_v1beta1.types.datacatalog.EntryGroup
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.EntryGroup
A maximum of 10,000 entry groups may be created per organization across all locations.
Users should enable the Data Catalog API in the project
identified by the parent
parameter (see Data Catalog
Resource Project
for more information).
# 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_v1beta1
async def sample_create_entry_group():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.CreateEntryGroupRequest, dict]]
The request object. Request message for CreateEntryGroup. |
parent |
Required. The name of the project this entry group is in. Example: - projects/{project_id}/locations/{location} Note that this EntryGroup and its child resources may not actually be stored in the location in this name. This corresponds to the |
entry_group_id |
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. This corresponds to the |
entry_group |
EntryGroup
The entry group to create. Defaults to an empty entry group. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.EntryGroup | EntryGroup Metadata. An EntryGroup resource represents a logical grouping of zero or more Data Catalog Entry resources. |
create_tag
create_tag(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.CreateTagRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
tag: typing.Optional[google.cloud.datacatalog_v1beta1.types.tags.Tag] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.Tag
Creates a tag on an
xref_Entry. Note: The
project identified by the parent
parameter for the
tag <https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters>
and the tag
template <https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters>
used to create the tag must be from 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_v1beta1
async def sample_create_tag():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
tag = datacatalog_v1beta1.Tag()
tag.column = "column_value"
tag.template = "template_value"
request = datacatalog_v1beta1.CreateTagRequest(
parent="parent_value",
tag=tag,
)
# Make the request
response = await client.create_tag(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.CreateTagRequest, dict]]
The request object. Request message for CreateTag. |
parent |
Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} Note that this Tag and its child resources may not actually be stored in the location in this name. This corresponds to the |
tag |
Tag
Required. The tag to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.Tag | Tags are used to attach custom metadata to Data Catalog resources. Tags conform to the specifications within 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. |
create_tag_template
create_tag_template(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.CreateTagTemplateRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
tag_template_id: typing.Optional[str] = None,
tag_template: typing.Optional[
google.cloud.datacatalog_v1beta1.types.tags.TagTemplate
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplate
Creates a tag template. The user should enable the Data Catalog
API in the project identified by the parent
parameter (see
Data Catalog Resource
Project <https://cloud.google.com/data-catalog/docs/concepts/resource-project>
__
for more information).
# 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_v1beta1
async def sample_create_tag_template():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.CreateTagTemplateRequest, dict]]
The request object. Request message for CreateTagTemplate. |
parent |
Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions. Example: - projects/{project_id}/locations/us-central1 This corresponds to the |
tag_template_id |
Required. The id of the tag template to create. This corresponds to the |
tag_template |
TagTemplate
Required. The tag template to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplate | A tag template defines a tag, which can have one or more typed fields. The template is used to create and attach the tag 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. See, for example, the [TagTemplate User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) role, which includes permission to use the tag template to tag resources. |
create_tag_template_field
create_tag_template_field(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.CreateTagTemplateFieldRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
tag_template_field_id: typing.Optional[str] = None,
tag_template_field: typing.Optional[
google.cloud.datacatalog_v1beta1.types.tags.TagTemplateField
] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplateField
Creates a field in a tag template. The user should enable the
Data Catalog API in the project identified by the parent
parameter (see Data Catalog Resource
Project <https://cloud.google.com/data-catalog/docs/concepts/resource-project>
__
for more information).
# 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_v1beta1
async def sample_create_tag_template_field():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
tag_template_field = datacatalog_v1beta1.TagTemplateField()
tag_template_field.type_.primitive_type = "TIMESTAMP"
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.CreateTagTemplateFieldRequest, dict]]
The request object. Request message for CreateTagTemplateField. |
parent |
Required. The name of the project and the template location |
tag_template_field_id |
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. This corresponds to the |
tag_template_field |
TagTemplateField
Required. The tag template field to create. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplateField | The template for an individual field within a tag template. |
delete_entry
delete_entry(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.DeleteEntryRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes an existing entry. Only entries created through
xref_CreateEntry
method can be deleted. Users should enable the Data Catalog API
in the project identified by the name
parameter (see Data
Catalog Resource Project
for more information).
# 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_v1beta1
async def sample_delete_entry():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.DeleteEntryRequest(
name="name_value",
)
# Make the request
await client.delete_entry(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.DeleteEntryRequest, dict]]
The request object. Request message for DeleteEntry. |
name |
Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_entry_group
delete_entry_group(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.DeleteEntryGroupRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes an EntryGroup. Only entry groups that do not contain
entries can be deleted. Users should enable the Data Catalog API
in the project identified by the name
parameter (see Data
Catalog Resource Project
for more information).
# 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_v1beta1
async def sample_delete_entry_group():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.DeleteEntryGroupRequest(
name="name_value",
)
# Make the request
await client.delete_entry_group(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.DeleteEntryGroupRequest, dict]]
The request object. Request message for DeleteEntryGroup. |
name |
Required. The name of the entry group. For example, |
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
delete_tag(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.DeleteTagRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
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_v1beta1
async def sample_delete_tag():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.DeleteTagRequest(
name="name_value",
)
# Make the request
await client.delete_tag(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.DeleteTagRequest, dict]]
The request object. Request message for DeleteTag. |
name |
Required. The name of the tag to delete. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_tag_template
delete_tag_template(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.DeleteTagTemplateRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
force: typing.Optional[bool] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a tag template and all tags using the template. Users
should enable the Data Catalog API in the project identified by
the name
parameter (see Data Catalog Resource Project
for more information).
# 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_v1beta1
async def sample_delete_tag_template():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.DeleteTagTemplateRequest(
name="name_value",
force=True,
)
# Make the request
await client.delete_tag_template(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.DeleteTagTemplateRequest, dict]]
The request object. Request message for DeleteTagTemplate. |
name |
Required. The name of the tag template to delete. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} This corresponds to the |
force |
Required. Currently, this field must always be set to |
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
delete_tag_template_field(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.DeleteTagTemplateFieldRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
force: typing.Optional[bool] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None
Deletes a field in a tag template and all uses of that field.
Users should enable the Data Catalog API in the project
identified by the name
parameter (see Data Catalog Resource
Project
for more information).
# 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_v1beta1
async def sample_delete_tag_template_field():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.DeleteTagTemplateFieldRequest(
name="name_value",
force=True,
)
# Make the request
await client.delete_tag_template_field(request=request)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.DeleteTagTemplateFieldRequest, dict]]
The request object. Request message for DeleteTagTemplateField. |
name |
Required. The name of the tag template field to delete. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} This corresponds to the |
force |
Required. Currently, this field must always be set to |
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. |
entry_group_path
entry_group_path(project: str, location: str, entry_group: str) -> str
Returns a fully-qualified entry_group string.
entry_path
entry_path(project: str, location: str, entry_group: str, entry: str) -> str
Returns a fully-qualified entry string.
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
DataCatalogAsyncClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
DataCatalogAsyncClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
DataCatalogAsyncClient | The constructed client. |
get_entry
get_entry(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.GetEntryRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.Entry
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_v1beta1
async def sample_get_entry():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.GetEntryRequest(
name="name_value",
)
# Make the request
response = await client.get_entry(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.GetEntryRequest, dict]]
The request object. Request message for GetEntry. |
name |
Required. The name of the entry. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.Entry | Entry Metadata. A Data Catalog Entry resource represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or outside of Google Cloud Platform. Clients 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, such as its schema. An Entry can also be used to attach flexible metadata, such as a Tag. |
get_entry_group
get_entry_group(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.GetEntryGroupRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
read_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.EntryGroup
Gets an EntryGroup.
# 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_v1beta1
async def sample_get_entry_group():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.GetEntryGroupRequest(
name="name_value",
)
# Make the request
response = await client.get_entry_group(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.GetEntryGroupRequest, dict]]
The request object. Request message for GetEntryGroup. |
name |
Required. The name of the entry group. For example, |
read_mask |
The fields to return. If not set or empty, all fields are returned. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.EntryGroup | EntryGroup Metadata. An EntryGroup resource represents a logical grouping of zero or more Data Catalog Entry resources. |
get_iam_policy
get_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
] = None,
*,
resource: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy
Gets the access control policy for a resource. A NOT_FOUND
error is returned if the resource does not exist. An empty
policy is returned if the resource exists but does not have a
policy set on it.
Supported resources are:
- Tag templates.
- Entries.
- Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission
datacatalog.tagTemplates.getIamPolicy
to get policies on tag templates.datacatalog.entries.getIamPolicy
to get policies on entries.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_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
async def sample_get_iam_policy():
# Create a client
client = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]
The request object. Request message for |
resource |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.iam.v1.policy_pb2.Policy | 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:** :literal:\ { "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:** :literal:\ 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:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/). |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment 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.
Parameter | |
---|---|
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If any errors happen. |
Returns | |
---|---|
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] | returns the API endpoint and the client cert source to use. |
get_tag_template
get_tag_template(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.GetTagTemplateRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplate
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_v1beta1
async def sample_get_tag_template():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.GetTagTemplateRequest(
name="name_value",
)
# Make the request
response = await client.get_tag_template(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.GetTagTemplateRequest, dict]]
The request object. Request message for GetTagTemplate. |
name |
Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplate | A tag template defines a tag, which can have one or more typed fields. The template is used to create and attach the tag 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. See, for example, the [TagTemplate User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) role, which includes permission to use the tag template to tag resources. |
get_transport_class
get_transport_class() -> (
typing.Type[
google.cloud.datacatalog_v1beta1.services.data_catalog.transports.base.DataCatalogTransport
]
)
Returns an appropriate transport class.
list_entries
list_entries(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.ListEntriesRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntriesAsyncPager
)
Lists 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_v1beta1
async def sample_list_entries():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.ListEntriesRequest, dict]]
The request object. Request message for ListEntries. |
parent |
Required. The name of the entry group that contains the entries, which can be provided in URL format. Example: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntriesAsyncPager | Response message for ListEntries. Iterating over this object will yield results and resolve additional pages automatically. |
list_entry_groups
list_entry_groups(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.ListEntryGroupsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntryGroupsAsyncPager
)
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_v1beta1
async def sample_list_entry_groups():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.ListEntryGroupsRequest, dict]]
The request object. Request message for ListEntryGroups. |
parent |
Required. The name of the location that contains the entry groups, which can be provided in URL format. Example: - projects/{project_id}/locations/{location} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListEntryGroupsAsyncPager | Response message for ListEntryGroups. Iterating over this object will yield results and resolve additional pages automatically. |
list_tags
list_tags(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.ListTagsRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListTagsAsyncPager
Lists tags assigned to an xref_Entry. The xref_columns 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_v1beta1
async def sample_list_tags():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.ListTagsRequest, dict]]
The request object. Request message for ListTags. |
parent |
Required. The name of the Data Catalog resource to list the tags of. The resource could be an Entry or an EntryGroup. Examples: - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.ListTagsAsyncPager | Response message for ListTags. Iterating over this object will yield results and resolve additional pages automatically. |
lookup_entry
lookup_entry(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.LookupEntryRequest, dict
]
] = None,
*,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.Entry
Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog 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_v1beta1
async def sample_lookup_entry():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.LookupEntryRequest(
linked_resource="linked_resource_value",
)
# Make the request
response = await client.lookup_entry(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.LookupEntryRequest, dict]]
The request object. Request message for LookupEntry. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.Entry | Entry Metadata. A Data Catalog Entry resource represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or outside of Google Cloud Platform. Clients 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, such as its schema. An Entry can also be used to attach flexible metadata, such as a Tag. |
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]
Parse a project path into its component segments.
parse_entry_group_path
parse_entry_group_path(path: str) -> typing.Dict[str, str]
Parses a entry_group path into its component segments.
parse_entry_path
parse_entry_path(path: str) -> typing.Dict[str, str]
Parses a entry path into its component segments.
parse_tag_path
parse_tag_path(path: str) -> typing.Dict[str, str]
Parses a tag path into its component segments.
parse_tag_template_field_enum_value_path
parse_tag_template_field_enum_value_path(path: str) -> typing.Dict[str, str]
Parses a tag_template_field_enum_value path into its component segments.
parse_tag_template_field_path
parse_tag_template_field_path(path: str) -> typing.Dict[str, str]
Parses a tag_template_field path into its component segments.
parse_tag_template_path
parse_tag_template_path(path: str) -> typing.Dict[str, str]
Parses a tag_template path into its component segments.
rename_tag_template_field
rename_tag_template_field(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.RenameTagTemplateFieldRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
new_tag_template_field_id: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplateField
Renames a field in a tag template. The user should enable the
Data Catalog API in the project identified by the name
parameter (see Data Catalog Resource
Project <https://cloud.google.com/data-catalog/docs/concepts/resource-project>
__
for more information).
# 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_v1beta1
async def sample_rename_tag_template_field():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.RenameTagTemplateFieldRequest, dict]]
The request object. Request message for RenameTagTemplateField. |
name |
Required. The name of the tag template. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} This corresponds to the |
new_tag_template_field_id |
Required. The new ID of this tag template field. For example, |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplateField | The template for an individual field within a tag template. |
rename_tag_template_field_enum_value
rename_tag_template_field_enum_value(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.RenameTagTemplateFieldEnumValueRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
new_enum_value_display_name: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplateField
Renames an enum value in a tag template. The enum values have to be unique within one enum field. Thus, an enum value cannot be renamed with a name used in any other enum value within the same enum field.
# 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_v1beta1
async def sample_rename_tag_template_field_enum_value():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.RenameTagTemplateFieldEnumValueRequest, dict]]
The request object. Request message for RenameTagTemplateFieldEnumValue. |
name |
Required. The name of the enum field value. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} This corresponds to the |
new_enum_value_display_name |
Required. The new display name of the enum value. For example, |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplateField | The template for an individual field within a tag template. |
search_catalog
search_catalog(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.SearchCatalogRequest,
dict,
]
] = None,
*,
scope: typing.Optional[
google.cloud.datacatalog_v1beta1.types.datacatalog.SearchCatalogRequest.Scope
] = None,
query: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> (
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.SearchCatalogAsyncPager
)
Searches Data Catalog for multiple resources like entries, tags that match a query.
This is a custom method
(https://cloud.google.com/apis/design/custom_methods) and does
not return the complete resource, only the resource identifier
and high level fields. Clients can subsequently call Get
methods.
Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.
See Data Catalog Search
Syntax <https://cloud.google.com/data-catalog/docs/how-to/search-reference>
__
for more information.
# 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_v1beta1
async def sample_search_catalog():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.SearchCatalogRequest(
)
# Make the request
page_result = client.search_catalog(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest, dict]]
The request object. Request message for SearchCatalog. |
scope |
Scope
Required. The scope of this search request. A |
query |
Optional. The query string in search query syntax. An empty query string will result in all data assets (in the specified scope) that the user has access to. 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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.services.data_catalog.pagers.SearchCatalogAsyncPager | Response message for SearchCatalog. Iterating over this object will yield results and resolve additional pages automatically. |
set_iam_policy
set_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
] = None,
*,
resource: typing.Optional[str] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy
Sets the access control policy for a resource. Replaces any existing policy. Supported resources are:
- Tag templates.
- Entries.
- Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission
datacatalog.tagTemplates.setIamPolicy
to set policies on tag templates.datacatalog.entries.setIamPolicy
to set policies on entries.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_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
async def sample_set_iam_policy():
# Create a client
client = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]
The request object. Request message for |
resource |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.iam.v1.policy_pb2.Policy | 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:** :literal:\ { "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:** :literal:\ 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:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/). |
tag_path
tag_path(
project: str, location: str, entry_group: str, entry: str, tag: str
) -> str
Returns a fully-qualified tag string.
tag_template_field_enum_value_path
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.
tag_template_field_path
tag_template_field_path(
project: str, location: str, tag_template: str, field: str
) -> str
Returns a fully-qualified tag_template_field string.
tag_template_path
tag_template_path(project: str, location: str, tag_template: str) -> str
Returns a fully-qualified tag_template string.
test_iam_permissions
test_iam_permissions(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
] = None,
*,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse
Returns the caller's permissions on a resource. If the resource
does not exist, an empty set of permissions is returned (We
don't return a NOT_FOUND
error).
Supported resources are:
- Tag templates.
- Entries.
- Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
A caller is not required to have Google IAM permission to make this request.
# 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_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
async def sample_test_iam_permissions():
# Create a client
client = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse | Response message for TestIamPermissions method. |
update_entry
update_entry(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.UpdateEntryRequest, dict
]
] = None,
*,
entry: typing.Optional[
google.cloud.datacatalog_v1beta1.types.datacatalog.Entry
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.Entry
Updates an existing entry. Users should enable the Data Catalog
API in the project identified by the entry.name
parameter
(see Data Catalog Resource Project
for more information).
# 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_v1beta1
async def sample_update_entry():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
entry = datacatalog_v1beta1.Entry()
entry.type_ = "FILESET"
entry.integrated_system = "CLOUD_PUBSUB"
entry.gcs_fileset_spec.file_patterns = ['file_patterns_value1', 'file_patterns_value2']
request = datacatalog_v1beta1.UpdateEntryRequest(
entry=entry,
)
# Make the request
response = await client.update_entry(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.UpdateEntryRequest, dict]]
The request object. Request message for UpdateEntry. |
entry |
Entry
Required. The updated entry. The "name" field must be set. This corresponds to the |
update_mask |
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. The following fields are modifiable: - For entries with type |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.Entry | Entry Metadata. A Data Catalog Entry resource represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or outside of Google Cloud Platform. Clients 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, such as its schema. An Entry can also be used to attach flexible metadata, such as a Tag. |
update_entry_group
update_entry_group(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.UpdateEntryGroupRequest,
dict,
]
] = None,
*,
entry_group: typing.Optional[
google.cloud.datacatalog_v1beta1.types.datacatalog.EntryGroup
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.datacatalog.EntryGroup
Updates an EntryGroup. The user should enable the Data Catalog
API in the project identified by the entry_group.name
parameter (see Data Catalog Resource Project
for more information).
# 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_v1beta1
async def sample_update_entry_group():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.UpdateEntryGroupRequest(
)
# Make the request
response = await client.update_entry_group(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.UpdateEntryGroupRequest, dict]]
The request object. Request message for UpdateEntryGroup. |
entry_group |
EntryGroup
Required. The updated entry group. "name" field must be set. This corresponds to the |
update_mask |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.EntryGroup | EntryGroup Metadata. An EntryGroup resource represents a logical grouping of zero or more Data Catalog Entry resources. |
update_tag
update_tag(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.UpdateTagRequest, dict
]
] = None,
*,
tag: typing.Optional[google.cloud.datacatalog_v1beta1.types.tags.Tag] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.Tag
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_v1beta1
async def sample_update_tag():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
tag = datacatalog_v1beta1.Tag()
tag.column = "column_value"
tag.template = "template_value"
request = datacatalog_v1beta1.UpdateTagRequest(
tag=tag,
)
# Make the request
response = await client.update_tag(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.UpdateTagRequest, dict]]
The request object. Request message for UpdateTag. |
tag |
Tag
Required. The updated tag. The "name" field must be set. This corresponds to the |
update_mask |
Note: Currently, this parameter can only take |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.Tag | Tags are used to attach custom metadata to Data Catalog resources. Tags conform to the specifications within 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. |
update_tag_template
update_tag_template(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.UpdateTagTemplateRequest,
dict,
]
] = None,
*,
tag_template: typing.Optional[
google.cloud.datacatalog_v1beta1.types.tags.TagTemplate
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplate
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. Users should enable the Data
Catalog API in the project identified by the
tag_template.name
parameter (see Data Catalog Resource
Project
for more information).
# 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_v1beta1
async def sample_update_tag_template():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
request = datacatalog_v1beta1.UpdateTagTemplateRequest(
)
# Make the request
response = await client.update_tag_template(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.UpdateTagTemplateRequest, dict]]
The request object. Request message for UpdateTagTemplate. |
tag_template |
TagTemplate
Required. The template to update. The "name" field must be set. This corresponds to the |
update_mask |
Names of fields whose values to overwrite on a tag template. Currently, only |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplate | A tag template defines a tag, which can have one or more typed fields. The template is used to create and attach the tag 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. See, for example, the [TagTemplate User](\ https://cloud.google.com/data-catalog/docs/how-to/template-user) role, which includes permission to use the tag template to tag resources. |
update_tag_template_field
update_tag_template_field(
request: typing.Optional[
typing.Union[
google.cloud.datacatalog_v1beta1.types.datacatalog.UpdateTagTemplateFieldRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
tag_template_field: typing.Optional[
google.cloud.datacatalog_v1beta1.types.tags.TagTemplateField
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Union[
google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.datacatalog_v1beta1.types.tags.TagTemplateField
Updates a field in a tag template. This method cannot be used to
update the field type. Users should enable the Data Catalog API
in the project identified by the name
parameter (see Data
Catalog Resource Project
for more information).
# 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_v1beta1
async def sample_update_tag_template_field():
# Create a client
client = datacatalog_v1beta1.DataCatalogAsyncClient()
# Initialize request argument(s)
tag_template_field = datacatalog_v1beta1.TagTemplateField()
tag_template_field.type_.primitive_type = "TIMESTAMP"
request = datacatalog_v1beta1.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 | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.datacatalog_v1beta1.types.UpdateTagTemplateFieldRequest, dict]]
The request object. Request message for UpdateTagTemplateField. |
name |
Required. The name of the tag template field. Example: - projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} This corresponds to the |
tag_template_field |
TagTemplateField
Required. The template to update. This corresponds to the |
update_mask |
Optional. Names of fields whose values to overwrite on an individual field of a tag template. The following fields are modifiable: - |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.datacatalog_v1beta1.types.TagTemplateField | The template for an individual field within a tag template. |