Class DataCatalogClient

public class DataCatalogClient implements BackgroundResource

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

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   String entryGroupId = "entryGroupId1228924712";
   EntryGroup entryGroup = EntryGroup.newBuilder().build();
   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
 }

Note: close() needs to be called on the DataCatalogClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DataCatalogSettings to create(). For example:

To customize credentials:

DataCatalogSettings dataCatalogSettings =
     DataCatalogSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);

To customize the endpoint:

DataCatalogSettings dataCatalogSettings =
     DataCatalogSettings.newBuilder().setEndpoint(myEndpoint).build();
 DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > DataCatalogClient

Implements

BackgroundResource

Constructors

DataCatalogClient(DataCatalogSettings settings)

protected DataCatalogClient(DataCatalogSettings settings)

Constructs an instance of DataCatalogClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsDataCatalogSettings

DataCatalogClient(DataCatalogStub stub)

protected DataCatalogClient(DataCatalogStub stub)
Parameter
NameDescription
stubDataCatalogStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

create()

public static final DataCatalogClient create()

Constructs an instance of DataCatalogClient with default settings.

Returns
TypeDescription
DataCatalogClient
Exceptions
TypeDescription
IOException

create(DataCatalogSettings settings)

public static final DataCatalogClient create(DataCatalogSettings settings)

Constructs an instance of DataCatalogClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsDataCatalogSettings
Returns
TypeDescription
DataCatalogClient
Exceptions
TypeDescription
IOException

create(DataCatalogStub stub)

public static final DataCatalogClient create(DataCatalogStub stub)

Constructs an instance of DataCatalogClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataCatalogSettings).

Parameter
NameDescription
stubDataCatalogStub
Returns
TypeDescription
DataCatalogClient

createEntry(CreateEntryRequest request)

public final Entry createEntry(CreateEntryRequest request)

Creates an entry.

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateEntryRequest request =
       CreateEntryRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setEntryId("entryId-1591558867")
           .setEntry(Entry.newBuilder().build())
           .build();
   Entry response = dataCatalogClient.createEntry(request);
 }
Parameter
NameDescription
requestCreateEntryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Entry

createEntry(EntryGroupName parent, String entryId, Entry entry)

public final Entry createEntry(EntryGroupName parent, String entryId, Entry entry)

Creates an entry.

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
   String entryId = "entryId-1591558867";
   Entry entry = Entry.newBuilder().build();
   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
 }
Parameters
NameDescription
parentEntryGroupName

Required. The name of the entry group this entry belongs to.

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

entryIdString

Required. The ID of the entry to create.

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

entryEntry

Required. The entry to create.

Returns
TypeDescription
Entry

createEntry(String parent, String entryId, Entry entry)

public final Entry createEntry(String parent, String entryId, Entry entry)

Creates an entry.

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   String entryId = "entryId-1591558867";
   Entry entry = Entry.newBuilder().build();
   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
 }
Parameters
NameDescription
parentString

Required. The name of the entry group this entry belongs to.

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

entryIdString

Required. The ID of the entry to create.

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

entryEntry

Required. The entry to create.

Returns
TypeDescription
Entry

createEntryCallable()

public final UnaryCallable<CreateEntryRequest,Entry> createEntryCallable()

Creates an entry.

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateEntryRequest request =
       CreateEntryRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setEntryId("entryId-1591558867")
           .setEntry(Entry.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.createEntryCallable().futureCall(request);
   // Do something.
   Entry response = future.get();
 }
Returns
TypeDescription
UnaryCallable<CreateEntryRequest,Entry>

createEntryGroup(CreateEntryGroupRequest request)

public final EntryGroup createEntryGroup(CreateEntryGroupRequest request)

Creates an entry group.

An entry group contains logically related entries together with [Cloud Identity and Access Management](/data-catalog/docs/concepts/iam) policies. These policies specify users who can create, edit, and view entries within entry groups.

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

  • BigQuery entries (`@bigquery\`)
  • Pub/Sub topics (`@pubsub\`)
  • Dataproc Metastore services (`@dataproc\_metastore\_\{SERVICE\_NAME\_HASH\}\`)

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

Entry groups, like entries, can be searched.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateEntryGroupRequest request =
       CreateEntryGroupRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setEntryGroupId("entryGroupId1228924712")
           .setEntryGroup(EntryGroup.newBuilder().build())
           .build();
   EntryGroup response = dataCatalogClient.createEntryGroup(request);
 }
Parameter
NameDescription
requestCreateEntryGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EntryGroup

createEntryGroup(LocationName parent, String entryGroupId, EntryGroup entryGroup)

public final EntryGroup createEntryGroup(LocationName parent, String entryGroupId, EntryGroup entryGroup)

Creates an entry group.

An entry group contains logically related entries together with [Cloud Identity and Access Management](/data-catalog/docs/concepts/iam) policies. These policies specify users who can create, edit, and view entries within entry groups.

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

  • BigQuery entries (`@bigquery\`)
  • Pub/Sub topics (`@pubsub\`)
  • Dataproc Metastore services (`@dataproc\_metastore\_\{SERVICE\_NAME\_HASH\}\`)

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

Entry groups, like entries, can be searched.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   String entryGroupId = "entryGroupId1228924712";
   EntryGroup entryGroup = EntryGroup.newBuilder().build();
   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
 }
Parameters
NameDescription
parentLocationName

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

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

entryGroupIdString

Required. The ID of the entry group to create.

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

entryGroupEntryGroup

The entry group to create. Defaults to empty.

Returns
TypeDescription
EntryGroup

createEntryGroup(String parent, String entryGroupId, EntryGroup entryGroup)

public final EntryGroup createEntryGroup(String parent, String entryGroupId, EntryGroup entryGroup)

Creates an entry group.

An entry group contains logically related entries together with [Cloud Identity and Access Management](/data-catalog/docs/concepts/iam) policies. These policies specify users who can create, edit, and view entries within entry groups.

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

  • BigQuery entries (`@bigquery\`)
  • Pub/Sub topics (`@pubsub\`)
  • Dataproc Metastore services (`@dataproc\_metastore\_\{SERVICE\_NAME\_HASH\}\`)

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

Entry groups, like entries, can be searched.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   String entryGroupId = "entryGroupId1228924712";
   EntryGroup entryGroup = EntryGroup.newBuilder().build();
   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
 }
Parameters
NameDescription
parentString

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

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

entryGroupIdString

Required. The ID of the entry group to create.

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

entryGroupEntryGroup

The entry group to create. Defaults to empty.

Returns
TypeDescription
EntryGroup

createEntryGroupCallable()

public final UnaryCallable<CreateEntryGroupRequest,EntryGroup> createEntryGroupCallable()

Creates an entry group.

An entry group contains logically related entries together with [Cloud Identity and Access Management](/data-catalog/docs/concepts/iam) policies. These policies specify users who can create, edit, and view entries within entry groups.

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

  • BigQuery entries (`@bigquery\`)
  • Pub/Sub topics (`@pubsub\`)
  • Dataproc Metastore services (`@dataproc\_metastore\_\{SERVICE\_NAME\_HASH\}\`)

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

Entry groups, like entries, can be searched.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateEntryGroupRequest request =
       CreateEntryGroupRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setEntryGroupId("entryGroupId1228924712")
           .setEntryGroup(EntryGroup.newBuilder().build())
           .build();
   ApiFuture future =
       dataCatalogClient.createEntryGroupCallable().futureCall(request);
   // Do something.
   EntryGroup response = future.get();
 }
Returns
TypeDescription
UnaryCallable<CreateEntryGroupRequest,EntryGroup>

createTag(CreateTagRequest request)

public final Tag createTag(CreateTagRequest request)

Creates a tag and assigns it to:

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateTagRequest request =
       CreateTagRequest.newBuilder()
           .setParent(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .setTag(Tag.newBuilder().build())
           .build();
   Tag response = dataCatalogClient.createTag(request);
 }
Parameter
NameDescription
requestCreateTagRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Tag

createTag(TagName parent, Tag tag)

public final Tag createTag(TagName parent, Tag tag)

Creates a tag and assigns it to:

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
   Tag tag = Tag.newBuilder().build();
   Tag response = dataCatalogClient.createTag(parent, tag);
 }
Parameters
NameDescription
parentTagName

Required. The name of the resource to attach this tag to.

Tags can be attached to entries or entry groups. An entry can have up to 1000 attached tags.

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

tagTag

Required. The tag to create.

Returns
TypeDescription
Tag

createTag(String parent, Tag tag)

public final Tag createTag(String parent, Tag tag)

Creates a tag and assigns it to:

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent =
       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
   Tag tag = Tag.newBuilder().build();
   Tag response = dataCatalogClient.createTag(parent, tag);
 }
Parameters
NameDescription
parentString

Required. The name of the resource to attach this tag to.

Tags can be attached to entries or entry groups. An entry can have up to 1000 attached tags.

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

tagTag

Required. The tag to create.

Returns
TypeDescription
Tag

createTagCallable()

public final UnaryCallable<CreateTagRequest,Tag> createTagCallable()

Creates a tag and assigns it to:

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateTagRequest request =
       CreateTagRequest.newBuilder()
           .setParent(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .setTag(Tag.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.createTagCallable().futureCall(request);
   // Do something.
   Tag response = future.get();
 }
Returns
TypeDescription
UnaryCallable<CreateTagRequest,Tag>

createTagTemplate(CreateTagTemplateRequest request)

public final TagTemplate createTagTemplate(CreateTagTemplateRequest request)

Creates a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateTagTemplateRequest request =
       CreateTagTemplateRequest.newBuilder()
           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .setTagTemplateId("tagTemplateId-1438776721")
           .setTagTemplate(TagTemplate.newBuilder().build())
           .build();
   TagTemplate response = dataCatalogClient.createTagTemplate(request);
 }
Parameter
NameDescription
requestCreateTagTemplateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplate

createTagTemplate(LocationName parent, String tagTemplateId, TagTemplate tagTemplate)

public final TagTemplate createTagTemplate(LocationName parent, String tagTemplateId, TagTemplate tagTemplate)

Creates a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   String tagTemplateId = "tagTemplateId-1438776721";
   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
   TagTemplate response =
       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
 }
Parameters
NameDescription
parentLocationName

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

tagTemplateIdString

Required. The ID of the tag template to create.

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

tagTemplateTagTemplate

Required. The tag template to create.

Returns
TypeDescription
TagTemplate

createTagTemplate(String parent, String tagTemplateId, TagTemplate tagTemplate)

public final TagTemplate createTagTemplate(String parent, String tagTemplateId, TagTemplate tagTemplate)

Creates a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
   String tagTemplateId = "tagTemplateId-1438776721";
   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
   TagTemplate response =
       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
 }
Parameters
NameDescription
parentString

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

tagTemplateIdString

Required. The ID of the tag template to create.

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

tagTemplateTagTemplate

Required. The tag template to create.

Returns
TypeDescription
TagTemplate

createTagTemplateCallable()

public final UnaryCallable<CreateTagTemplateRequest,TagTemplate> createTagTemplateCallable()

Creates a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateTagTemplateRequest request =
       CreateTagTemplateRequest.newBuilder()
           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .setTagTemplateId("tagTemplateId-1438776721")
           .setTagTemplate(TagTemplate.newBuilder().build())
           .build();
   ApiFuture future =
       dataCatalogClient.createTagTemplateCallable().futureCall(request);
   // Do something.
   TagTemplate response = future.get();
 }
Returns
TypeDescription
UnaryCallable<CreateTagTemplateRequest,TagTemplate>

createTagTemplateField(CreateTagTemplateFieldRequest request)

public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldRequest request)

Creates a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateTagTemplateFieldRequest request =
       CreateTagTemplateFieldRequest.newBuilder()
           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
           .setTagTemplateField(TagTemplateField.newBuilder().build())
           .build();
   TagTemplateField response = dataCatalogClient.createTagTemplateField(request);
 }
Parameter
NameDescription
requestCreateTagTemplateFieldRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplateField

createTagTemplateField(TagTemplateName parent, String tagTemplateFieldId, TagTemplateField tagTemplateField)

public final TagTemplateField createTagTemplateField(TagTemplateName parent, String tagTemplateFieldId, TagTemplateField tagTemplateField)

Creates a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
   TagTemplateField response =
       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
 }
Parameters
NameDescription
parentTagTemplateName

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

tagTemplateFieldIdString

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

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

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

tagTemplateFieldTagTemplateField

Required. The tag template field to create.

Returns
TypeDescription
TagTemplateField

createTagTemplateField(String parent, String tagTemplateFieldId, TagTemplateField tagTemplateField)

public final TagTemplateField createTagTemplateField(String parent, String tagTemplateFieldId, TagTemplateField tagTemplateField)

Creates a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
   TagTemplateField response =
       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
 }
Parameters
NameDescription
parentString

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

tagTemplateFieldIdString

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

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

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

tagTemplateFieldTagTemplateField

Required. The tag template field to create.

Returns
TypeDescription
TagTemplateField

createTagTemplateFieldCallable()

public final UnaryCallable<CreateTagTemplateFieldRequest,TagTemplateField> createTagTemplateFieldCallable()

Creates a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   CreateTagTemplateFieldRequest request =
       CreateTagTemplateFieldRequest.newBuilder()
           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
           .setTagTemplateField(TagTemplateField.newBuilder().build())
           .build();
   ApiFuture future =
       dataCatalogClient.createTagTemplateFieldCallable().futureCall(request);
   // Do something.
   TagTemplateField response = future.get();
 }
Returns
TypeDescription
UnaryCallable<CreateTagTemplateFieldRequest,TagTemplateField>

deleteEntry(DeleteEntryRequest request)

public final void deleteEntry(DeleteEntryRequest request)

Deletes an existing entry.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteEntryRequest request =
       DeleteEntryRequest.newBuilder()
           .setName(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .build();
   dataCatalogClient.deleteEntry(request);
 }
Parameter
NameDescription
requestDeleteEntryRequest

The request object containing all of the parameters for the API call.

deleteEntry(EntryName name)

public final void deleteEntry(EntryName name)

Deletes an existing entry.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
   dataCatalogClient.deleteEntry(name);
 }
Parameter
NameDescription
nameEntryName

Required. The name of the entry to delete.

deleteEntry(String name)

public final void deleteEntry(String name)

Deletes an existing entry.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
   dataCatalogClient.deleteEntry(name);
 }
Parameter
NameDescription
nameString

Required. The name of the entry to delete.

deleteEntryCallable()

public final UnaryCallable<DeleteEntryRequest,Empty> deleteEntryCallable()

Deletes an existing entry.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteEntryRequest request =
       DeleteEntryRequest.newBuilder()
           .setName(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .build();
   ApiFuture future = dataCatalogClient.deleteEntryCallable().futureCall(request);
   // Do something.
   future.get();
 }
Returns
TypeDescription
UnaryCallable<DeleteEntryRequest,Empty>

deleteEntryGroup(DeleteEntryGroupRequest request)

public final void deleteEntryGroup(DeleteEntryGroupRequest request)

Deletes an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteEntryGroupRequest request =
       DeleteEntryGroupRequest.newBuilder()
           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setForce(true)
           .build();
   dataCatalogClient.deleteEntryGroup(request);
 }
Parameter
NameDescription
requestDeleteEntryGroupRequest

The request object containing all of the parameters for the API call.

deleteEntryGroup(EntryGroupName name)

public final void deleteEntryGroup(EntryGroupName name)

Deletes an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
   dataCatalogClient.deleteEntryGroup(name);
 }
Parameter
NameDescription
nameEntryGroupName

Required. The name of the entry group to delete.

deleteEntryGroup(String name)

public final void deleteEntryGroup(String name)

Deletes an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   dataCatalogClient.deleteEntryGroup(name);
 }
Parameter
NameDescription
nameString

Required. The name of the entry group to delete.

deleteEntryGroupCallable()

public final UnaryCallable<DeleteEntryGroupRequest,Empty> deleteEntryGroupCallable()

Deletes an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteEntryGroupRequest request =
       DeleteEntryGroupRequest.newBuilder()
           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setForce(true)
           .build();
   ApiFuture future = dataCatalogClient.deleteEntryGroupCallable().futureCall(request);
   // Do something.
   future.get();
 }
Returns
TypeDescription
UnaryCallable<DeleteEntryGroupRequest,Empty>

deleteTag(DeleteTagRequest request)

public final void deleteTag(DeleteTagRequest request)

Deletes a tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteTagRequest request =
       DeleteTagRequest.newBuilder()
           .setName(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .build();
   dataCatalogClient.deleteTag(request);
 }
Parameter
NameDescription
requestDeleteTagRequest

The request object containing all of the parameters for the API call.

deleteTag(EntryName name)

public final void deleteTag(EntryName name)

Deletes a tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
   dataCatalogClient.deleteTag(name);
 }
Parameter
NameDescription
nameEntryName

Required. The name of the tag to delete.

deleteTag(String name)

public final void deleteTag(String name)

Deletes a tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name =
       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
   dataCatalogClient.deleteTag(name);
 }
Parameter
NameDescription
nameString

Required. The name of the tag to delete.

deleteTagCallable()

public final UnaryCallable<DeleteTagRequest,Empty> deleteTagCallable()

Deletes a tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteTagRequest request =
       DeleteTagRequest.newBuilder()
           .setName(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .build();
   ApiFuture future = dataCatalogClient.deleteTagCallable().futureCall(request);
   // Do something.
   future.get();
 }
Returns
TypeDescription
UnaryCallable<DeleteTagRequest,Empty>

deleteTagTemplate(DeleteTagTemplateRequest request)

public final void deleteTagTemplate(DeleteTagTemplateRequest request)

Deletes a tag template and all tags that use it.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteTagTemplateRequest request =
       DeleteTagTemplateRequest.newBuilder()
           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .setForce(true)
           .build();
   dataCatalogClient.deleteTagTemplate(request);
 }
Parameter
NameDescription
requestDeleteTagTemplateRequest

The request object containing all of the parameters for the API call.

deleteTagTemplate(TagTemplateName name, boolean force)

public final void deleteTagTemplate(TagTemplateName name, boolean force)

Deletes a tag template and all tags that use it.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
   boolean force = true;
   dataCatalogClient.deleteTagTemplate(name, force);
 }
Parameters
NameDescription
nameTagTemplateName

Required. The name of the tag template to delete.

forceboolean

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

Currently, true is the only supported value.

deleteTagTemplate(String name, boolean force)

public final void deleteTagTemplate(String name, boolean force)

Deletes a tag template and all tags that use it.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
   boolean force = true;
   dataCatalogClient.deleteTagTemplate(name, force);
 }
Parameters
NameDescription
nameString

Required. The name of the tag template to delete.

forceboolean

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

Currently, true is the only supported value.

deleteTagTemplateCallable()

public final UnaryCallable<DeleteTagTemplateRequest,Empty> deleteTagTemplateCallable()

Deletes a tag template and all tags that use it.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteTagTemplateRequest request =
       DeleteTagTemplateRequest.newBuilder()
           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .setForce(true)
           .build();
   ApiFuture future = dataCatalogClient.deleteTagTemplateCallable().futureCall(request);
   // Do something.
   future.get();
 }
Returns
TypeDescription
UnaryCallable<DeleteTagTemplateRequest,Empty>

deleteTagTemplateField(DeleteTagTemplateFieldRequest request)

public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request)

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteTagTemplateFieldRequest request =
       DeleteTagTemplateFieldRequest.newBuilder()
           .setName(
               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                   .toString())
           .setForce(true)
           .build();
   dataCatalogClient.deleteTagTemplateField(request);
 }
Parameter
NameDescription
requestDeleteTagTemplateFieldRequest

The request object containing all of the parameters for the API call.

deleteTagTemplateField(TagTemplateFieldName name, boolean force)

public final void deleteTagTemplateField(TagTemplateFieldName name, boolean force)

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateFieldName name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
   boolean force = true;
   dataCatalogClient.deleteTagTemplateField(name, force);
 }
Parameters
NameDescription
nameTagTemplateFieldName

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

forceboolean

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

Currently, true is the only supported value.

deleteTagTemplateField(String name, boolean force)

public final void deleteTagTemplateField(String name, boolean force)

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
           .toString();
   boolean force = true;
   dataCatalogClient.deleteTagTemplateField(name, force);
 }
Parameters
NameDescription
nameString

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

forceboolean

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

Currently, true is the only supported value.

deleteTagTemplateFieldCallable()

public final UnaryCallable<DeleteTagTemplateFieldRequest,Empty> deleteTagTemplateFieldCallable()

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   DeleteTagTemplateFieldRequest request =
       DeleteTagTemplateFieldRequest.newBuilder()
           .setName(
               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                   .toString())
           .setForce(true)
           .build();
   ApiFuture future =
       dataCatalogClient.deleteTagTemplateFieldCallable().futureCall(request);
   // Do something.
   future.get();
 }
Returns
TypeDescription
UnaryCallable<DeleteTagTemplateFieldRequest,Empty>

getEntry(EntryName name)

public final Entry getEntry(EntryName name)

Gets an entry.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
   Entry response = dataCatalogClient.getEntry(name);
 }
Parameter
NameDescription
nameEntryName

Required. The name of the entry to get.

Returns
TypeDescription
Entry

getEntry(GetEntryRequest request)

public final Entry getEntry(GetEntryRequest request)

Gets an entry.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetEntryRequest request =
       GetEntryRequest.newBuilder()
           .setName(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .build();
   Entry response = dataCatalogClient.getEntry(request);
 }
Parameter
NameDescription
requestGetEntryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Entry

getEntry(String name)

public final Entry getEntry(String name)

Gets an entry.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
   Entry response = dataCatalogClient.getEntry(name);
 }
Parameter
NameDescription
nameString

Required. The name of the entry to get.

Returns
TypeDescription
Entry

getEntryCallable()

public final UnaryCallable<GetEntryRequest,Entry> getEntryCallable()

Gets an entry.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetEntryRequest request =
       GetEntryRequest.newBuilder()
           .setName(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .build();
   ApiFuture future = dataCatalogClient.getEntryCallable().futureCall(request);
   // Do something.
   Entry response = future.get();
 }
Returns
TypeDescription
UnaryCallable<GetEntryRequest,Entry>

getEntryGroup(EntryGroupName name)

public final EntryGroup getEntryGroup(EntryGroupName name)

Gets an entry group.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
   EntryGroup response = dataCatalogClient.getEntryGroup(name);
 }
Parameter
NameDescription
nameEntryGroupName

Required. The name of the entry group to get.

Returns
TypeDescription
EntryGroup

getEntryGroup(EntryGroupName name, FieldMask readMask)

public final EntryGroup getEntryGroup(EntryGroupName name, FieldMask readMask)

Gets an entry group.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
   FieldMask readMask = FieldMask.newBuilder().build();
   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
 }
Parameters
NameDescription
nameEntryGroupName

Required. The name of the entry group to get.

readMaskFieldMask

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

Returns
TypeDescription
EntryGroup

getEntryGroup(GetEntryGroupRequest request)

public final EntryGroup getEntryGroup(GetEntryGroupRequest request)

Gets an entry group.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetEntryGroupRequest request =
       GetEntryGroupRequest.newBuilder()
           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setReadMask(FieldMask.newBuilder().build())
           .build();
   EntryGroup response = dataCatalogClient.getEntryGroup(request);
 }
Parameter
NameDescription
requestGetEntryGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EntryGroup

getEntryGroup(String name)

public final EntryGroup getEntryGroup(String name)

Gets an entry group.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   EntryGroup response = dataCatalogClient.getEntryGroup(name);
 }
Parameter
NameDescription
nameString

Required. The name of the entry group to get.

Returns
TypeDescription
EntryGroup

getEntryGroup(String name, FieldMask readMask)

public final EntryGroup getEntryGroup(String name, FieldMask readMask)

Gets an entry group.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   FieldMask readMask = FieldMask.newBuilder().build();
   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
 }
Parameters
NameDescription
nameString

Required. The name of the entry group to get.

readMaskFieldMask

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

Returns
TypeDescription
EntryGroup

getEntryGroupCallable()

public final UnaryCallable<GetEntryGroupRequest,EntryGroup> getEntryGroupCallable()

Gets an entry group.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetEntryGroupRequest request =
       GetEntryGroupRequest.newBuilder()
           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setReadMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.getEntryGroupCallable().futureCall(request);
   // Do something.
   EntryGroup response = future.get();
 }
Returns
TypeDescription
UnaryCallable<GetEntryGroupRequest,EntryGroup>

getIamPolicy(ResourceName resource)

public final Policy getIamPolicy(ResourceName resource)

Gets the access control policy for a resource.

May return:

  • A`NOT_FOUND` error if the resource doesn't exist or you don't have the permission to view it.
  • An empty policy if the resource exists but doesn't have a set policy.

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
   Policy response = dataCatalogClient.getIamPolicy(resource);
 }
Parameter
NameDescription
resourcecom.google.api.resourcenames.ResourceName

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

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy for a resource.

May return:

  • A`NOT_FOUND` error if the resource doesn't exist or you don't have the permission to view it.
  • An empty policy if the resource exists but doesn't have a set policy.

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = dataCatalogClient.getIamPolicy(request);
 }
Parameter
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicy(String resource)

public final Policy getIamPolicy(String resource)

Gets the access control policy for a resource.

May return:

  • A`NOT_FOUND` error if the resource doesn't exist or you don't have the permission to view it.
  • An empty policy if the resource exists but doesn't have a set policy.

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String resource =
       EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
   Policy response = dataCatalogClient.getIamPolicy(resource);
 }
Parameter
NameDescription
resourceString

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

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource.

May return:

  • A`NOT_FOUND` error if the resource doesn't exist or you don't have the permission to view it.
  • An empty policy if the resource exists but doesn't have a set policy.

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getSettings()

public final DataCatalogSettings getSettings()
Returns
TypeDescription
DataCatalogSettings

getStub()

public DataCatalogStub getStub()
Returns
TypeDescription
DataCatalogStub

getTagTemplate(GetTagTemplateRequest request)

public final TagTemplate getTagTemplate(GetTagTemplateRequest request)

Gets a tag template.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetTagTemplateRequest request =
       GetTagTemplateRequest.newBuilder()
           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .build();
   TagTemplate response = dataCatalogClient.getTagTemplate(request);
 }
Parameter
NameDescription
requestGetTagTemplateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplate

getTagTemplate(TagTemplateName name)

public final TagTemplate getTagTemplate(TagTemplateName name)

Gets a tag template.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
   TagTemplate response = dataCatalogClient.getTagTemplate(name);
 }
Parameter
NameDescription
nameTagTemplateName

Required. The name of the tag template to get.

Returns
TypeDescription
TagTemplate

getTagTemplate(String name)

public final TagTemplate getTagTemplate(String name)

Gets a tag template.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
   TagTemplate response = dataCatalogClient.getTagTemplate(name);
 }
Parameter
NameDescription
nameString

Required. The name of the tag template to get.

Returns
TypeDescription
TagTemplate

getTagTemplateCallable()

public final UnaryCallable<GetTagTemplateRequest,TagTemplate> getTagTemplateCallable()

Gets a tag template.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   GetTagTemplateRequest request =
       GetTagTemplateRequest.newBuilder()
           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
           .build();
   ApiFuture future =
       dataCatalogClient.getTagTemplateCallable().futureCall(request);
   // Do something.
   TagTemplate response = future.get();
 }
Returns
TypeDescription
UnaryCallable<GetTagTemplateRequest,TagTemplate>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listEntries(EntryGroupName parent)

public final DataCatalogClient.ListEntriesPagedResponse listEntries(EntryGroupName parent)

Lists entries.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
parentEntryGroupName

Required. The name of the entry group that contains the entries to list.

Can be provided in URL format.

Returns
TypeDescription
DataCatalogClient.ListEntriesPagedResponse

listEntries(ListEntriesRequest request)

public final DataCatalogClient.ListEntriesPagedResponse listEntries(ListEntriesRequest request)

Lists entries.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListEntriesRequest request =
       ListEntriesRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setReadMask(FieldMask.newBuilder().build())
           .build();
   for (Entry element : dataCatalogClient.listEntries(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
requestListEntriesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataCatalogClient.ListEntriesPagedResponse

listEntries(String parent)

public final DataCatalogClient.ListEntriesPagedResponse listEntries(String parent)

Lists entries.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
parentString

Required. The name of the entry group that contains the entries to list.

Can be provided in URL format.

Returns
TypeDescription
DataCatalogClient.ListEntriesPagedResponse

listEntriesCallable()

public final UnaryCallable<ListEntriesRequest,ListEntriesResponse> listEntriesCallable()

Lists entries.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListEntriesRequest request =
       ListEntriesRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setReadMask(FieldMask.newBuilder().build())
           .build();
   while (true) {
     ListEntriesResponse response = dataCatalogClient.listEntriesCallable().call(request);
     for (Entry element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
Returns
TypeDescription
UnaryCallable<ListEntriesRequest,ListEntriesResponse>

listEntriesPagedCallable()

public final UnaryCallable<ListEntriesRequest,DataCatalogClient.ListEntriesPagedResponse> listEntriesPagedCallable()

Lists entries.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListEntriesRequest request =
       ListEntriesRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setReadMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.listEntriesPagedCallable().futureCall(request);
   // Do something.
   for (Entry element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
Returns
TypeDescription
UnaryCallable<ListEntriesRequest,ListEntriesPagedResponse>

listEntryGroups(EntryGroupName parent)

public final DataCatalogClient.ListEntryGroupsPagedResponse listEntryGroups(EntryGroupName parent)

Lists entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
parentEntryGroupName

Required. The name of the location that contains the entry groups to list.

Can be provided as a URL.

Returns
TypeDescription
DataCatalogClient.ListEntryGroupsPagedResponse

listEntryGroups(ListEntryGroupsRequest request)

public final DataCatalogClient.ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest request)

Lists entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListEntryGroupsRequest request =
       ListEntryGroupsRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (EntryGroup element : dataCatalogClient.listEntryGroups(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
requestListEntryGroupsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataCatalogClient.ListEntryGroupsPagedResponse

listEntryGroups(String parent)

public final DataCatalogClient.ListEntryGroupsPagedResponse listEntryGroups(String parent)

Lists entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
parentString

Required. The name of the location that contains the entry groups to list.

Can be provided as a URL.

Returns
TypeDescription
DataCatalogClient.ListEntryGroupsPagedResponse

listEntryGroupsCallable()

public final UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsResponse> listEntryGroupsCallable()

Lists entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListEntryGroupsRequest request =
       ListEntryGroupsRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListEntryGroupsResponse response =
         dataCatalogClient.listEntryGroupsCallable().call(request);
     for (EntryGroup element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
Returns
TypeDescription
UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsResponse>

listEntryGroupsPagedCallable()

public final UnaryCallable<ListEntryGroupsRequest,DataCatalogClient.ListEntryGroupsPagedResponse> listEntryGroupsPagedCallable()

Lists entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListEntryGroupsRequest request =
       ListEntryGroupsRequest.newBuilder()
           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture future =
       dataCatalogClient.listEntryGroupsPagedCallable().futureCall(request);
   // Do something.
   for (EntryGroup element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
Returns
TypeDescription
UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsPagedResponse>

listTags(EntryName parent)

public final DataCatalogClient.ListTagsPagedResponse listTags(EntryName parent)

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
parentEntryName

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

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

Returns
TypeDescription
DataCatalogClient.ListTagsPagedResponse

listTags(ListTagsRequest request)

public final DataCatalogClient.ListTagsPagedResponse listTags(ListTagsRequest request)

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListTagsRequest request =
       ListTagsRequest.newBuilder()
           .setParent(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Tag element : dataCatalogClient.listTags(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
requestListTagsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataCatalogClient.ListTagsPagedResponse

listTags(String parent)

public final DataCatalogClient.ListTagsPagedResponse listTags(String parent)

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String parent =
       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
parentString

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

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

Returns
TypeDescription
DataCatalogClient.ListTagsPagedResponse

listTagsCallable()

public final UnaryCallable<ListTagsRequest,ListTagsResponse> listTagsCallable()

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListTagsRequest request =
       ListTagsRequest.newBuilder()
           .setParent(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListTagsResponse response = dataCatalogClient.listTagsCallable().call(request);
     for (Tag element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
Returns
TypeDescription
UnaryCallable<ListTagsRequest,ListTagsResponse>

listTagsPagedCallable()

public final UnaryCallable<ListTagsRequest,DataCatalogClient.ListTagsPagedResponse> listTagsPagedCallable()

Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ListTagsRequest request =
       ListTagsRequest.newBuilder()
           .setParent(
               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture future = dataCatalogClient.listTagsPagedCallable().futureCall(request);
   // Do something.
   for (Tag element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
Returns
TypeDescription
UnaryCallable<ListTagsRequest,ListTagsPagedResponse>

lookupEntry(LookupEntryRequest request)

public final Entry lookupEntry(LookupEntryRequest request)

Gets an entry by its target resource name.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
   Entry response = dataCatalogClient.lookupEntry(request);
 }
Parameter
NameDescription
requestLookupEntryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Entry

lookupEntryCallable()

public final UnaryCallable<LookupEntryRequest,Entry> lookupEntryCallable()

Gets an entry by its target resource name.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
   ApiFuture future = dataCatalogClient.lookupEntryCallable().futureCall(request);
   // Do something.
   Entry response = future.get();
 }
Returns
TypeDescription
UnaryCallable<LookupEntryRequest,Entry>

renameTagTemplateField(RenameTagTemplateFieldRequest request)

public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldRequest request)

Renames a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   RenameTagTemplateFieldRequest request =
       RenameTagTemplateFieldRequest.newBuilder()
           .setName(
               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                   .toString())
           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
           .build();
   TagTemplateField response = dataCatalogClient.renameTagTemplateField(request);
 }
Parameter
NameDescription
requestRenameTagTemplateFieldRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplateField

renameTagTemplateField(TagTemplateFieldName name, String newTagTemplateFieldId)

public final TagTemplateField renameTagTemplateField(TagTemplateFieldName name, String newTagTemplateFieldId)

Renames a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateFieldName name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
   TagTemplateField response =
       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
 }
Parameters
NameDescription
nameTagTemplateFieldName

Required. The name of the tag template.

newTagTemplateFieldIdString

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

Returns
TypeDescription
TagTemplateField

renameTagTemplateField(String name, String newTagTemplateFieldId)

public final TagTemplateField renameTagTemplateField(String name, String newTagTemplateFieldId)

Renames a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
           .toString();
   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
   TagTemplateField response =
       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
 }
Parameters
NameDescription
nameString

Required. The name of the tag template.

newTagTemplateFieldIdString

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

Returns
TypeDescription
TagTemplateField

renameTagTemplateFieldCallable()

public final UnaryCallable<RenameTagTemplateFieldRequest,TagTemplateField> renameTagTemplateFieldCallable()

Renames a field in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   RenameTagTemplateFieldRequest request =
       RenameTagTemplateFieldRequest.newBuilder()
           .setName(
               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                   .toString())
           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
           .build();
   ApiFuture future =
       dataCatalogClient.renameTagTemplateFieldCallable().futureCall(request);
   // Do something.
   TagTemplateField response = future.get();
 }
Returns
TypeDescription
UnaryCallable<RenameTagTemplateFieldRequest,TagTemplateField>

renameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest request)

public final TagTemplateField renameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest request)

Renames an enum value in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   RenameTagTemplateFieldEnumValueRequest request =
       RenameTagTemplateFieldEnumValueRequest.newBuilder()
           .setName(
               TagTemplateFieldEnumValueName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[TAG_TEMPLATE]",
                       "[TAG_TEMPLATE_FIELD_ID]",
                       "[ENUM_VALUE_DISPLAY_NAME]")
                   .toString())
           .setNewEnumValueDisplayName("newEnumValueDisplayName-1119629027")
           .build();
   TagTemplateField response = dataCatalogClient.renameTagTemplateFieldEnumValue(request);
 }
Parameter
NameDescription
requestRenameTagTemplateFieldEnumValueRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplateField

renameTagTemplateFieldEnumValue(TagTemplateFieldEnumValueName name, String newEnumValueDisplayName)

public final TagTemplateField renameTagTemplateFieldEnumValue(TagTemplateFieldEnumValueName name, String newEnumValueDisplayName)

Renames an enum value in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateFieldEnumValueName name =
       TagTemplateFieldEnumValueName.of(
           "[PROJECT]",
           "[LOCATION]",
           "[TAG_TEMPLATE]",
           "[TAG_TEMPLATE_FIELD_ID]",
           "[ENUM_VALUE_DISPLAY_NAME]");
   String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027";
   TagTemplateField response =
       dataCatalogClient.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName);
 }
Parameters
NameDescription
nameTagTemplateFieldEnumValueName

Required. The name of the enum field value.

newEnumValueDisplayNameString

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

Returns
TypeDescription
TagTemplateField

renameTagTemplateFieldEnumValue(String name, String newEnumValueDisplayName)

public final TagTemplateField renameTagTemplateFieldEnumValue(String name, String newEnumValueDisplayName)

Renames an enum value in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name =
       TagTemplateFieldEnumValueName.of(
               "[PROJECT]",
               "[LOCATION]",
               "[TAG_TEMPLATE]",
               "[TAG_TEMPLATE_FIELD_ID]",
               "[ENUM_VALUE_DISPLAY_NAME]")
           .toString();
   String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027";
   TagTemplateField response =
       dataCatalogClient.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName);
 }
Parameters
NameDescription
nameString

Required. The name of the enum field value.

newEnumValueDisplayNameString

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

Returns
TypeDescription
TagTemplateField

renameTagTemplateFieldEnumValueCallable()

public final UnaryCallable<RenameTagTemplateFieldEnumValueRequest,TagTemplateField> renameTagTemplateFieldEnumValueCallable()

Renames an enum value in a tag template.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   RenameTagTemplateFieldEnumValueRequest request =
       RenameTagTemplateFieldEnumValueRequest.newBuilder()
           .setName(
               TagTemplateFieldEnumValueName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[TAG_TEMPLATE]",
                       "[TAG_TEMPLATE_FIELD_ID]",
                       "[ENUM_VALUE_DISPLAY_NAME]")
                   .toString())
           .setNewEnumValueDisplayName("newEnumValueDisplayName-1119629027")
           .build();
   ApiFuture future =
       dataCatalogClient.renameTagTemplateFieldEnumValueCallable().futureCall(request);
   // Do something.
   TagTemplateField response = future.get();
 }
Returns
TypeDescription
UnaryCallable<RenameTagTemplateFieldEnumValueRequest,TagTemplateField>

searchCatalog(SearchCatalogRequest request)

public final DataCatalogClient.SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest request)

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

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   SearchCatalogRequest request =
       SearchCatalogRequest.newBuilder()
           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
           .setQuery("query107944136")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (SearchCatalogResult element : dataCatalogClient.searchCatalog(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameter
NameDescription
requestSearchCatalogRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DataCatalogClient.SearchCatalogPagedResponse

searchCatalog(SearchCatalogRequest.Scope scope, String query)

public final DataCatalogClient.SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest.Scope scope, String query)

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

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
   String query = "query107944136";
   for (SearchCatalogResult element :
       dataCatalogClient.searchCatalog(scope, query).iterateAll()) {
     // doThingsWith(element);
   }
 }
Parameters
NameDescription
scopeSearchCatalogRequest.Scope

Required. The scope of this search request.

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

queryString

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

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

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

  • name:x
  • column:y
  • description:z

Returns
TypeDescription
DataCatalogClient.SearchCatalogPagedResponse

searchCatalogCallable()

public final UnaryCallable<SearchCatalogRequest,SearchCatalogResponse> searchCatalogCallable()

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

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   SearchCatalogRequest request =
       SearchCatalogRequest.newBuilder()
           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
           .setQuery("query107944136")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     SearchCatalogResponse response = dataCatalogClient.searchCatalogCallable().call(request);
     for (SearchCatalogResult element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
Returns
TypeDescription
UnaryCallable<SearchCatalogRequest,SearchCatalogResponse>

searchCatalogPagedCallable()

public final UnaryCallable<SearchCatalogRequest,DataCatalogClient.SearchCatalogPagedResponse> searchCatalogPagedCallable()

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

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

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   SearchCatalogRequest request =
       SearchCatalogRequest.newBuilder()
           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
           .setQuery("query107944136")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture future =
       dataCatalogClient.searchCatalogPagedCallable().futureCall(request);
   // Do something.
   for (SearchCatalogResult element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
Returns
TypeDescription
UnaryCallable<SearchCatalogRequest,SearchCatalogPagedResponse>

setIamPolicy(ResourceName resource, Policy policy)

public final Policy setIamPolicy(ResourceName resource, Policy policy)

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

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
   Policy policy = Policy.newBuilder().build();
   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
 }
Parameters
NameDescription
resourcecom.google.api.resourcenames.ResourceName

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

policycom.google.iam.v1.Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

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

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .setPolicy(Policy.newBuilder().build())
           .build();
   Policy response = dataCatalogClient.setIamPolicy(request);
 }
Parameter
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicy(String resource, Policy policy)

public final Policy setIamPolicy(String resource, Policy policy)

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

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String resource =
       EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
   Policy policy = Policy.newBuilder().build();
   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
 }
Parameters
NameDescription
resourceString

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

policycom.google.iam.v1.Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

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

Supported resources are:

- Tag templates - Entry groups

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

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

- `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .setPolicy(Policy.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

Gets your permissions on a resource.

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

Supported resources are:

- Tag templates - Entry groups

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

No Google IAM permissions are required to call this method.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .addAllPermissions(new ArrayList())
           .build();
   TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(request);
 }
Parameter
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

Gets your permissions on a resource.

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

Supported resources are:

- Tag templates - Entry groups

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

No Google IAM permissions are required to call this method.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(
               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
           .addAllPermissions(new ArrayList())
           .build();
   ApiFuture future =
       dataCatalogClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

updateEntry(Entry entry)

public final Entry updateEntry(Entry entry)

Updates an existing entry.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   Entry entry = Entry.newBuilder().build();
   Entry response = dataCatalogClient.updateEntry(entry);
 }
Parameter
NameDescription
entryEntry

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

Returns
TypeDescription
Entry

updateEntry(Entry entry, FieldMask updateMask)

public final Entry updateEntry(Entry entry, FieldMask updateMask)

Updates an existing entry.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   Entry entry = Entry.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Entry response = dataCatalogClient.updateEntry(entry, updateMask);
 }
Parameters
NameDescription
entryEntry

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

updateMaskFieldMask

Names of fields whose values to overwrite on an entry.

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

You can modify only the fields listed below.

For entries with type DATA_STREAM:

  • schema

For entries with type FILESET:

  • schema
  • display_name
  • description
  • gcs_fileset_spec
  • gcs_fileset_spec.file_patterns

For entries with user_specified_type:

  • schema
  • display_name
  • description
  • user_specified_type
  • user_specified_system
  • linked_resource
  • source_system_timestamps

Returns
TypeDescription
Entry

updateEntry(UpdateEntryRequest request)

public final Entry updateEntry(UpdateEntryRequest request)

Updates an existing entry.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateEntryRequest request =
       UpdateEntryRequest.newBuilder()
           .setEntry(Entry.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Entry response = dataCatalogClient.updateEntry(request);
 }
Parameter
NameDescription
requestUpdateEntryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Entry

updateEntryCallable()

public final UnaryCallable<UpdateEntryRequest,Entry> updateEntryCallable()

Updates an existing entry.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateEntryRequest request =
       UpdateEntryRequest.newBuilder()
           .setEntry(Entry.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.updateEntryCallable().futureCall(request);
   // Do something.
   Entry response = future.get();
 }
Returns
TypeDescription
UnaryCallable<UpdateEntryRequest,Entry>

updateEntryGroup(EntryGroup entryGroup)

public final EntryGroup updateEntryGroup(EntryGroup entryGroup)

Updates an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroup entryGroup = EntryGroup.newBuilder().build();
   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
 }
Parameter
NameDescription
entryGroupEntryGroup

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

Returns
TypeDescription
EntryGroup

updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask)

public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask)

Updates an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   EntryGroup entryGroup = EntryGroup.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
 }
Parameters
NameDescription
entryGroupEntryGroup

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

updateMaskFieldMask

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.

Returns
TypeDescription
EntryGroup

updateEntryGroup(UpdateEntryGroupRequest request)

public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request)

Updates an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateEntryGroupRequest request =
       UpdateEntryGroupRequest.newBuilder()
           .setEntryGroup(EntryGroup.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   EntryGroup response = dataCatalogClient.updateEntryGroup(request);
 }
Parameter
NameDescription
requestUpdateEntryGroupRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EntryGroup

updateEntryGroupCallable()

public final UnaryCallable<UpdateEntryGroupRequest,EntryGroup> updateEntryGroupCallable()

Updates an entry group.

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateEntryGroupRequest request =
       UpdateEntryGroupRequest.newBuilder()
           .setEntryGroup(EntryGroup.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future =
       dataCatalogClient.updateEntryGroupCallable().futureCall(request);
   // Do something.
   EntryGroup response = future.get();
 }
Returns
TypeDescription
UnaryCallable<UpdateEntryGroupRequest,EntryGroup>

updateTag(Tag tag)

public final Tag updateTag(Tag tag)

Updates an existing tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   Tag tag = Tag.newBuilder().build();
   Tag response = dataCatalogClient.updateTag(tag);
 }
Parameter
NameDescription
tagTag

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

Returns
TypeDescription
Tag

updateTag(Tag tag, FieldMask updateMask)

public final Tag updateTag(Tag tag, FieldMask updateMask)

Updates an existing tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   Tag tag = Tag.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Tag response = dataCatalogClient.updateTag(tag, updateMask);
 }
Parameters
NameDescription
tagTag

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

updateMaskFieldMask

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

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

Returns
TypeDescription
Tag

updateTag(UpdateTagRequest request)

public final Tag updateTag(UpdateTagRequest request)

Updates an existing tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateTagRequest request =
       UpdateTagRequest.newBuilder()
           .setTag(Tag.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Tag response = dataCatalogClient.updateTag(request);
 }
Parameter
NameDescription
requestUpdateTagRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Tag

updateTagCallable()

public final UnaryCallable<UpdateTagRequest,Tag> updateTagCallable()

Updates an existing tag.

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateTagRequest request =
       UpdateTagRequest.newBuilder()
           .setTag(Tag.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future = dataCatalogClient.updateTagCallable().futureCall(request);
   // Do something.
   Tag response = future.get();
 }
Returns
TypeDescription
UnaryCallable<UpdateTagRequest,Tag>

updateTagTemplate(TagTemplate tagTemplate)

public final TagTemplate updateTagTemplate(TagTemplate tagTemplate)

Updates a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate);
 }
Parameter
NameDescription
tagTemplateTagTemplate

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

Returns
TypeDescription
TagTemplate

updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask)

public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask)

Updates a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate, updateMask);
 }
Parameters
NameDescription
tagTemplateTagTemplate

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

updateMaskFieldMask

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

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

Returns
TypeDescription
TagTemplate

updateTagTemplate(UpdateTagTemplateRequest request)

public final TagTemplate updateTagTemplate(UpdateTagTemplateRequest request)

Updates a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateTagTemplateRequest request =
       UpdateTagTemplateRequest.newBuilder()
           .setTagTemplate(TagTemplate.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   TagTemplate response = dataCatalogClient.updateTagTemplate(request);
 }
Parameter
NameDescription
requestUpdateTagTemplateRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplate

updateTagTemplateCallable()

public final UnaryCallable<UpdateTagTemplateRequest,TagTemplate> updateTagTemplateCallable()

Updates a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateTagTemplateRequest request =
       UpdateTagTemplateRequest.newBuilder()
           .setTagTemplate(TagTemplate.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future =
       dataCatalogClient.updateTagTemplateCallable().futureCall(request);
   // Do something.
   TagTemplate response = future.get();
 }
Returns
TypeDescription
UnaryCallable<UpdateTagTemplateRequest,TagTemplate>

updateTagTemplateField(TagTemplateFieldName name, TagTemplateField tagTemplateField)

public final TagTemplateField updateTagTemplateField(TagTemplateFieldName name, TagTemplateField tagTemplateField)

Updates a field in a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateFieldName name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
 }
Parameters
NameDescription
nameTagTemplateFieldName

Required. The name of the tag template field.

tagTemplateFieldTagTemplateField

Required. The template to update.

Returns
TypeDescription
TagTemplateField

updateTagTemplateField(TagTemplateFieldName name, TagTemplateField tagTemplateField, FieldMask updateMask)

public final TagTemplateField updateTagTemplateField(TagTemplateFieldName name, TagTemplateField tagTemplateField, FieldMask updateMask)

Updates a field in a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   TagTemplateFieldName name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   TagTemplateField response =
       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
 }
Parameters
NameDescription
nameTagTemplateFieldName

Required. The name of the tag template field.

tagTemplateFieldTagTemplateField

Required. The template to update.

updateMaskFieldMask

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

  • display_name
  • type.enum_type
  • is_required

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

Additionally, updating a template field from optional to required is

  • not* allowed.

Returns
TypeDescription
TagTemplateField

updateTagTemplateField(UpdateTagTemplateFieldRequest request)

public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldRequest request)

Updates a field in a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateTagTemplateFieldRequest request =
       UpdateTagTemplateFieldRequest.newBuilder()
           .setName(
               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                   .toString())
           .setTagTemplateField(TagTemplateField.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   TagTemplateField response = dataCatalogClient.updateTagTemplateField(request);
 }
Parameter
NameDescription
requestUpdateTagTemplateFieldRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
TagTemplateField

updateTagTemplateField(String name, TagTemplateField tagTemplateField)

public final TagTemplateField updateTagTemplateField(String name, TagTemplateField tagTemplateField)

Updates a field in a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
           .toString();
   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
 }
Parameters
NameDescription
nameString

Required. The name of the tag template field.

tagTemplateFieldTagTemplateField

Required. The template to update.

Returns
TypeDescription
TagTemplateField

updateTagTemplateField(String name, TagTemplateField tagTemplateField, FieldMask updateMask)

public final TagTemplateField updateTagTemplateField(String name, TagTemplateField tagTemplateField, FieldMask updateMask)

Updates a field in a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   String name =
       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
           .toString();
   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   TagTemplateField response =
       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
 }
Parameters
NameDescription
nameString

Required. The name of the tag template field.

tagTemplateFieldTagTemplateField

Required. The template to update.

updateMaskFieldMask

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

  • display_name
  • type.enum_type
  • is_required

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

Additionally, updating a template field from optional to required is

  • not* allowed.

Returns
TypeDescription
TagTemplateField

updateTagTemplateFieldCallable()

public final UnaryCallable<UpdateTagTemplateFieldRequest,TagTemplateField> updateTagTemplateFieldCallable()

Updates a field in a tag template.

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

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

Sample code:

try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
   UpdateTagTemplateFieldRequest request =
       UpdateTagTemplateFieldRequest.newBuilder()
           .setName(
               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                   .toString())
           .setTagTemplateField(TagTemplateField.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture future =
       dataCatalogClient.updateTagTemplateFieldCallable().futureCall(request);
   // Do something.
   TagTemplateField response = future.get();
 }
Returns
TypeDescription
UnaryCallable<UpdateTagTemplateFieldRequest,TagTemplateField>