- 1.59.0 (latest)
- 1.58.0
- 1.57.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.5
- 1.8.4
- 1.7.2
- 1.6.2
- 1.5.4
public class DataCatalogClient implements BackgroundResource
Service Description: Data Catalog API service allows clients to discover, understand, and manage their 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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:
- 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.
- 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.
- 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DataCatalogSettings dataCatalogSettings =
DataCatalogSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DataCatalogSettings dataCatalogSettings =
DataCatalogSettings.newBuilder().setEndpoint(myEndpoint).build();
DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DataCatalogSettings dataCatalogSettings = DataCatalogSettings.newHttpJsonBuilder().build();
DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final DataCatalogClient create()
Constructs an instance of DataCatalogClient with default settings.
Returns | |
---|---|
Type | Description |
DataCatalogClient |
Exceptions | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
settings | DataCatalogSettings |
Returns | |
---|---|
Type | Description |
DataCatalogClient |
Exceptions | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
stub | DataCatalogStub |
Returns | |
---|---|
Type | Description |
DataCatalogClient |
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 | |
---|---|
Name | Description |
settings | DataCatalogSettings |
DataCatalogClient(DataCatalogStub stub)
protected DataCatalogClient(DataCatalogStub stub)
Parameter | |
---|---|
Name | Description |
stub | DataCatalogStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration | long |
unit | TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
close()
public final void close()
createEntry(CreateEntryRequest request)
public final Entry createEntry(CreateEntryRequest request)
Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
A maximum of 100,000 entries may be created per entry group.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | CreateEntryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Entry |
createEntry(EntryGroupName parent, String entryId, Entry entry)
public final Entry createEntry(EntryGroupName parent, String entryId, Entry entry)
Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
A maximum of 100,000 entries may be created per entry group.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
parent | EntryGroupName Required. The name of the entry group this entry is in. Example:
Note that this Entry and its child resources may not actually be stored in the location in this name. |
entryId | String Required. The id of the entry to create. |
entry | Entry Required. The entry to create. |
Returns | |
---|---|
Type | Description |
Entry |
createEntry(String parent, String entryId, Entry entry)
public final Entry createEntry(String parent, String entryId, Entry entry)
Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
A maximum of 100,000 entries may be created per entry group.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
parent | String Required. The name of the entry group this entry is in. Example:
Note that this Entry and its child resources may not actually be stored in the location in this name. |
entryId | String Required. The id of the entry to create. |
entry | Entry Required. The entry to create. |
Returns | |
---|---|
Type | Description |
Entry |
createEntryCallable()
public final UnaryCallable<CreateEntryRequest,Entry> createEntryCallable()
Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
A maximum of 100,000 entries may be created per entry group.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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<Entry> future = dataCatalogClient.createEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateEntryRequest,Entry> |
createEntryGroup(CreateEntryGroupRequest request)
public final EntryGroup createEntryGroup(CreateEntryGroupRequest request)
A maximum of 10,000 entry groups may be created per organization across all locations.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
CreateEntryGroupRequest request =
CreateEntryGroupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEntryGroupId("entryGroupId1228924712")
.setEntryGroup(EntryGroup.newBuilder().build())
.build();
EntryGroup response = dataCatalogClient.createEntryGroup(request);
}
Parameter | |
---|---|
Name | Description |
request | CreateEntryGroupRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
EntryGroup |
createEntryGroup(LocationName parent, String entryGroupId, EntryGroup entryGroup)
public final EntryGroup createEntryGroup(LocationName parent, String entryGroupId, EntryGroup entryGroup)
A maximum of 10,000 entry groups may be created per organization across all locations.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
parent | LocationName Required. The name of the project this entry group is in. Example:
Note that this EntryGroup and its child resources may not actually be stored in the location in this name. |
entryGroupId | String Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters. |
entryGroup | EntryGroup The entry group to create. Defaults to an empty entry group. |
Returns | |
---|---|
Type | Description |
EntryGroup |
createEntryGroup(String parent, String entryGroupId, EntryGroup entryGroup)
public final EntryGroup createEntryGroup(String parent, String entryGroupId, EntryGroup entryGroup)
A maximum of 10,000 entry groups may be created per organization across all locations.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String entryGroupId = "entryGroupId1228924712";
EntryGroup entryGroup = EntryGroup.newBuilder().build();
EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project this entry group is in. Example:
Note that this EntryGroup and its child resources may not actually be stored in the location in this name. |
entryGroupId | String Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters. |
entryGroup | EntryGroup The entry group to create. Defaults to an empty entry group. |
Returns | |
---|---|
Type | Description |
EntryGroup |
createEntryGroupCallable()
public final UnaryCallable<CreateEntryGroupRequest,EntryGroup> createEntryGroupCallable()
A maximum of 10,000 entry groups may be created per organization across all locations.
Users should enable the Data Catalog API in the project identified by the parent
parameter
(see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
CreateEntryGroupRequest request =
CreateEntryGroupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEntryGroupId("entryGroupId1228924712")
.setEntryGroup(EntryGroup.newBuilder().build())
.build();
ApiFuture<EntryGroup> future =
dataCatalogClient.createEntryGroupCallable().futureCall(request);
// Do something.
EntryGroup response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateEntryGroupRequest,EntryGroup> |
createTag(CreateTagRequest request)
public final Tag createTag(CreateTagRequest request)
Creates a tag on an Entry. Note: The project
identified by the parent
parameter for the
tag
and the tag
template
used to create the tag must be from the same organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
CreateTagRequest request =
CreateTagRequest.newBuilder()
.setParent(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setTag(Tag.newBuilder().build())
.build();
Tag response = dataCatalogClient.createTag(request);
}
Parameter | |
---|---|
Name | Description |
request | CreateTagRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Tag |
createTag(EntryName parent, Tag tag)
public final Tag createTag(EntryName parent, Tag tag)
Creates a tag on an Entry. Note: The project
identified by the parent
parameter for the
tag
and the tag
template
used to create the tag must be from the same organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
Tag tag = Tag.newBuilder().build();
Tag response = dataCatalogClient.createTag(parent, tag);
}
Parameters | |
---|---|
Name | Description |
parent | EntryName Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example:
Note that this Tag and its child resources may not actually be stored in the location in this name. |
tag | Tag Required. The tag to create. |
Returns | |
---|---|
Type | Description |
Tag |
createTag(String parent, Tag tag)
public final Tag createTag(String parent, Tag tag)
Creates a tag on an Entry. Note: The project
identified by the parent
parameter for the
tag
and the tag
template
used to create the tag must be from the same organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String parent =
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
Tag tag = Tag.newBuilder().build();
Tag response = dataCatalogClient.createTag(parent, tag);
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example:
Note that this Tag and its child resources may not actually be stored in the location in this name. |
tag | Tag Required. The tag to create. |
Returns | |
---|---|
Type | Description |
Tag |
createTagCallable()
public final UnaryCallable<CreateTagRequest,Tag> createTagCallable()
Creates a tag on an Entry. Note: The project
identified by the parent
parameter for the
tag
and the tag
template
used to create the tag must be from the same organization.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
CreateTagRequest request =
CreateTagRequest.newBuilder()
.setParent(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setTag(Tag.newBuilder().build())
.build();
ApiFuture<Tag> future = dataCatalogClient.createTagCallable().futureCall(request);
// Do something.
Tag response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateTagRequest,Tag> |
createTagTemplate(CreateTagTemplateRequest request)
public final TagTemplate createTagTemplate(CreateTagTemplateRequest request)
Creates a tag template. The user should enable the Data Catalog API in the project identified
by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
CreateTagTemplateRequest request =
CreateTagTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTagTemplateId("tagTemplateId-1438776721")
.setTagTemplate(TagTemplate.newBuilder().build())
.build();
TagTemplate response = dataCatalogClient.createTagTemplate(request);
}
Parameter | |
---|---|
Name | Description |
request | CreateTagTemplateRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TagTemplate |
createTagTemplate(LocationName parent, String tagTemplateId, TagTemplate tagTemplate)
public final TagTemplate createTagTemplate(LocationName parent, String tagTemplateId, TagTemplate tagTemplate)
Creates a tag template. The user should enable the Data Catalog API in the project identified
by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
parent | LocationName Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions. Example:
|
tagTemplateId | String Required. The id of the tag template to create. |
tagTemplate | TagTemplate Required. The tag template to create. |
Returns | |
---|---|
Type | Description |
TagTemplate |
createTagTemplate(String parent, String tagTemplateId, TagTemplate tagTemplate)
public final TagTemplate createTagTemplate(String parent, String tagTemplateId, TagTemplate tagTemplate)
Creates a tag template. The user should enable the Data Catalog API in the project identified
by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String tagTemplateId = "tagTemplateId-1438776721";
TagTemplate tagTemplate = TagTemplate.newBuilder().build();
TagTemplate response =
dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions. Example:
|
tagTemplateId | String Required. The id of the tag template to create. |
tagTemplate | TagTemplate Required. The tag template to create. |
Returns | |
---|---|
Type | Description |
TagTemplate |
createTagTemplateCallable()
public final UnaryCallable<CreateTagTemplateRequest,TagTemplate> createTagTemplateCallable()
Creates a tag template. The user should enable the Data Catalog API in the project identified
by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
CreateTagTemplateRequest request =
CreateTagTemplateRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTagTemplateId("tagTemplateId-1438776721")
.setTagTemplate(TagTemplate.newBuilder().build())
.build();
ApiFuture<TagTemplate> future =
dataCatalogClient.createTagTemplateCallable().futureCall(request);
// Do something.
TagTemplate response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateTagTemplateRequest,TagTemplate> |
createTagTemplateField(CreateTagTemplateFieldRequest request)
public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldRequest request)
Creates a field in a tag template. The user should enable the Data Catalog API in the project
identified by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | CreateTagTemplateFieldRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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. The user should enable the Data Catalog API in the project
identified by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
parent | TagTemplateName Required. The name of the project and the template location region. Example:
|
tagTemplateFieldId | String Required. The ID of the tag template field to create. Field ids can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. |
tagTemplateField | TagTemplateField Required. The tag template field to create. |
Returns | |
---|---|
Type | Description |
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. The user should enable the Data Catalog API in the project
identified by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
parent | String Required. The name of the project and the template location region. Example:
|
tagTemplateFieldId | String Required. The ID of the tag template field to create. Field ids can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template. |
tagTemplateField | TagTemplateField Required. The tag template field to create. |
Returns | |
---|---|
Type | Description |
TagTemplateField |
createTagTemplateFieldCallable()
public final UnaryCallable<CreateTagTemplateFieldRequest,TagTemplateField> createTagTemplateFieldCallable()
Creates a field in a tag template. The user should enable the Data Catalog API in the project
identified by the parent
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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<TagTemplateField> future =
dataCatalogClient.createTagTemplateFieldCallable().futureCall(request);
// Do something.
TagTemplateField response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateTagTemplateFieldRequest,TagTemplateField> |
deleteEntry(DeleteEntryRequest request)
public final void deleteEntry(DeleteEntryRequest request)
Deletes an existing entry. Only entries created through
CreateEntry method can be deleted.
Users should enable the Data Catalog API in the project identified by the name
parameter (see
Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteEntryRequest request =
DeleteEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
dataCatalogClient.deleteEntry(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteEntryRequest 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. Only entries created through
CreateEntry method can be deleted.
Users should enable the Data Catalog API in the project identified by the name
parameter (see
Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
dataCatalogClient.deleteEntry(name);
}
Parameter | |
---|---|
Name | Description |
name | EntryName Required. The name of the entry. Example:
|
deleteEntry(String name)
public final void deleteEntry(String name)
Deletes an existing entry. Only entries created through
CreateEntry method can be deleted.
Users should enable the Data Catalog API in the project identified by the name
parameter (see
Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
dataCatalogClient.deleteEntry(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the entry. Example:
|
deleteEntryCallable()
public final UnaryCallable<DeleteEntryRequest,Empty> deleteEntryCallable()
Deletes an existing entry. Only entries created through
CreateEntry method can be deleted.
Users should enable the Data Catalog API in the project identified by the name
parameter (see
Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteEntryRequest request =
DeleteEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
ApiFuture<Empty> future = dataCatalogClient.deleteEntryCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteEntryRequest,Empty> |
deleteEntryGroup(DeleteEntryGroupRequest request)
public final void deleteEntryGroup(DeleteEntryGroupRequest request)
Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteEntryGroupRequest request =
DeleteEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setForce(true)
.build();
dataCatalogClient.deleteEntryGroup(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteEntryGroupRequest The request object containing all of the parameters for the API call. |
deleteEntryGroup(EntryGroupName name)
public final void deleteEntryGroup(EntryGroupName name)
Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
dataCatalogClient.deleteEntryGroup(name);
}
Parameter | |
---|---|
Name | Description |
name | EntryGroupName Required. The name of the entry group. For example,
|
deleteEntryGroup(String name)
public final void deleteEntryGroup(String name)
Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
dataCatalogClient.deleteEntryGroup(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the entry group. For example,
|
deleteEntryGroupCallable()
public final UnaryCallable<DeleteEntryGroupRequest,Empty> deleteEntryGroupCallable()
Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteEntryGroupRequest request =
DeleteEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setForce(true)
.build();
ApiFuture<Empty> future = dataCatalogClient.deleteEntryGroupCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteEntryGroupRequest,Empty> |
deleteTag(DeleteTagRequest request)
public final void deleteTag(DeleteTagRequest request)
Deletes a tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteTagRequest request =
DeleteTagRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
dataCatalogClient.deleteTag(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteTagRequest 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
dataCatalogClient.deleteTag(name);
}
Parameter | |
---|---|
Name | Description |
name | EntryName Required. The name of the tag to delete. Example:
|
deleteTag(String name)
public final void deleteTag(String name)
Deletes a tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
dataCatalogClient.deleteTag(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the tag to delete. Example:
|
deleteTagCallable()
public final UnaryCallable<DeleteTagRequest,Empty> deleteTagCallable()
Deletes a tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteTagRequest request =
DeleteTagRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
ApiFuture<Empty> future = dataCatalogClient.deleteTagCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteTagRequest,Empty> |
deleteTagTemplate(DeleteTagTemplateRequest request)
public final void deleteTagTemplate(DeleteTagTemplateRequest request)
Deletes a tag template and all tags using the template. Users should enable the Data Catalog
API in the project identified by the name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteTagTemplateRequest request =
DeleteTagTemplateRequest.newBuilder()
.setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
.setForce(true)
.build();
dataCatalogClient.deleteTagTemplate(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteTagTemplateRequest 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 using the template. Users should enable the Data Catalog
API in the project identified by the name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
boolean force = true;
dataCatalogClient.deleteTagTemplate(name, force);
}
Parameters | |
---|---|
Name | Description |
name | TagTemplateName Required. The name of the tag template to delete. Example:
|
force | boolean Required. Currently, this field must always be set to |
deleteTagTemplate(String name, boolean force)
public final void deleteTagTemplate(String name, boolean force)
Deletes a tag template and all tags using the template. Users should enable the Data Catalog
API in the project identified by the name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
boolean force = true;
dataCatalogClient.deleteTagTemplate(name, force);
}
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the tag template to delete. Example:
|
force | boolean Required. Currently, this field must always be set to |
deleteTagTemplateCallable()
public final UnaryCallable<DeleteTagTemplateRequest,Empty> deleteTagTemplateCallable()
Deletes a tag template and all tags using the template. Users should enable the Data Catalog
API in the project identified by the name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteTagTemplateRequest request =
DeleteTagTemplateRequest.newBuilder()
.setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
.setForce(true)
.build();
ApiFuture<Empty> future = dataCatalogClient.deleteTagTemplateCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteTagTemplateRequest,Empty> |
deleteTagTemplateField(DeleteTagTemplateFieldRequest request)
public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request)
Deletes a field in a tag template and all uses of that field. Users should enable the Data
Catalog API in the project identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | DeleteTagTemplateFieldRequest 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 that field. Users should enable the Data
Catalog API in the project identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TagTemplateFieldName name =
TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
boolean force = true;
dataCatalogClient.deleteTagTemplateField(name, force);
}
Parameters | |
---|---|
Name | Description |
name | TagTemplateFieldName Required. The name of the tag template field to delete. Example:
|
force | boolean Required. Currently, this field must always be set to |
deleteTagTemplateField(String name, boolean force)
public final void deleteTagTemplateField(String name, boolean force)
Deletes a field in a tag template and all uses of that field. Users should enable the Data
Catalog API in the project identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name =
TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
.toString();
boolean force = true;
dataCatalogClient.deleteTagTemplateField(name, force);
}
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the tag template field to delete. Example:
|
force | boolean Required. Currently, this field must always be set to |
deleteTagTemplateFieldCallable()
public final UnaryCallable<DeleteTagTemplateFieldRequest,Empty> deleteTagTemplateFieldCallable()
Deletes a field in a tag template and all uses of that field. Users should enable the Data
Catalog API in the project identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
DeleteTagTemplateFieldRequest request =
DeleteTagTemplateFieldRequest.newBuilder()
.setName(
TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
.toString())
.setForce(true)
.build();
ApiFuture<Empty> future =
dataCatalogClient.deleteTagTemplateFieldCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteTagTemplateFieldRequest,Empty> |
getEntry(EntryName name)
public final Entry getEntry(EntryName name)
Gets an entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
Entry response = dataCatalogClient.getEntry(name);
}
Parameter | |
---|---|
Name | Description |
name | EntryName Required. The name of the entry. Example:
|
Returns | |
---|---|
Type | Description |
Entry |
getEntry(GetEntryRequest request)
public final Entry getEntry(GetEntryRequest request)
Gets an entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | GetEntryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Entry |
getEntry(String name)
public final Entry getEntry(String name)
Gets an entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
Entry response = dataCatalogClient.getEntry(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the entry. Example:
|
Returns | |
---|---|
Type | Description |
Entry |
getEntryCallable()
public final UnaryCallable<GetEntryRequest,Entry> getEntryCallable()
Gets an entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
GetEntryRequest request =
GetEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
ApiFuture<Entry> future = dataCatalogClient.getEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetEntryRequest,Entry> |
getEntryGroup(EntryGroupName name)
public final EntryGroup getEntryGroup(EntryGroupName name)
Gets an EntryGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
EntryGroup response = dataCatalogClient.getEntryGroup(name);
}
Parameter | |
---|---|
Name | Description |
name | EntryGroupName Required. The name of the entry group. For example,
|
Returns | |
---|---|
Type | Description |
EntryGroup |
getEntryGroup(EntryGroupName name, FieldMask readMask)
public final EntryGroup getEntryGroup(EntryGroupName name, FieldMask readMask)
Gets an EntryGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | EntryGroupName Required. The name of the entry group. For example,
|
readMask | FieldMask The fields to return. If not set or empty, all fields are returned. |
Returns | |
---|---|
Type | Description |
EntryGroup |
getEntryGroup(GetEntryGroupRequest request)
public final EntryGroup getEntryGroup(GetEntryGroupRequest request)
Gets an EntryGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | GetEntryGroupRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
EntryGroup |
getEntryGroup(String name)
public final EntryGroup getEntryGroup(String name)
Gets an EntryGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
EntryGroup response = dataCatalogClient.getEntryGroup(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the entry group. For example,
|
Returns | |
---|---|
Type | Description |
EntryGroup |
getEntryGroup(String name, FieldMask readMask)
public final EntryGroup getEntryGroup(String name, FieldMask readMask)
Gets an EntryGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | String Required. The name of the entry group. For example,
|
readMask | FieldMask The fields to return. If not set or empty, all fields are returned. |
Returns | |
---|---|
Type | Description |
EntryGroup |
getEntryGroupCallable()
public final UnaryCallable<GetEntryGroupRequest,EntryGroup> getEntryGroupCallable()
Gets an EntryGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
GetEntryGroupRequest request =
GetEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<EntryGroup> future = dataCatalogClient.getEntryGroupCallable().futureCall(request);
// Do something.
EntryGroup response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetEntryGroupRequest,EntryGroup> |
getIamPolicy(ResourceName resource)
public final Policy getIamPolicy(ResourceName resource)
Gets the access control policy for a resource. A NOT_FOUND
error is returned if the resource
does not exist. An empty policy is returned if the resource exists but does not have a policy
set on it.
Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.getIamPolicy
to get policies on tag templates. - datacatalog.entries.getIamPolicy
to get policies on
entries. - datacatalog.entryGroups.getIamPolicy
to get policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
Policy response = dataCatalogClient.getIamPolicy(resource);
}
Parameter | |
---|---|
Name | Description |
resource | com.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 | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)
Gets the access control policy for a resource. A NOT_FOUND
error is returned if the resource
does not exist. An empty policy is returned if the resource exists but does not have a policy
set on it.
Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.getIamPolicy
to get policies on tag templates. - datacatalog.entries.getIamPolicy
to get policies on
entries. - datacatalog.entryGroups.getIamPolicy
to get policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | com.google.iam.v1.GetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicy(String resource)
public final Policy getIamPolicy(String resource)
Gets the access control policy for a resource. A NOT_FOUND
error is returned if the resource
does not exist. An empty policy is returned if the resource exists but does not have a policy
set on it.
Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.getIamPolicy
to get policies on tag templates. - datacatalog.entries.getIamPolicy
to get policies on
entries. - datacatalog.entryGroups.getIamPolicy
to get policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String resource =
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
Policy response = dataCatalogClient.getIamPolicy(resource);
}
Parameter | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
Gets the access control policy for a resource. A NOT_FOUND
error is returned if the resource
does not exist. An empty policy is returned if the resource exists but does not have a policy
set on it.
Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.getIamPolicy
to get policies on tag templates. - datacatalog.entries.getIamPolicy
to get policies on
entries. - datacatalog.entryGroups.getIamPolicy
to get policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = dataCatalogClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getSettings()
public final DataCatalogSettings getSettings()
Returns | |
---|---|
Type | Description |
DataCatalogSettings |
getStub()
public DataCatalogStub getStub()
Returns | |
---|---|
Type | Description |
DataCatalogStub |
getTagTemplate(GetTagTemplateRequest request)
public final TagTemplate getTagTemplate(GetTagTemplateRequest request)
Gets a tag template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
GetTagTemplateRequest request =
GetTagTemplateRequest.newBuilder()
.setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
.build();
TagTemplate response = dataCatalogClient.getTagTemplate(request);
}
Parameter | |
---|---|
Name | Description |
request | GetTagTemplateRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TagTemplate |
getTagTemplate(TagTemplateName name)
public final TagTemplate getTagTemplate(TagTemplateName name)
Gets a tag template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
TagTemplate response = dataCatalogClient.getTagTemplate(name);
}
Parameter | |
---|---|
Name | Description |
name | TagTemplateName Required. The name of the tag template. Example:
|
Returns | |
---|---|
Type | Description |
TagTemplate |
getTagTemplate(String name)
public final TagTemplate getTagTemplate(String name)
Gets a tag template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
TagTemplate response = dataCatalogClient.getTagTemplate(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the tag template. Example:
|
Returns | |
---|---|
Type | Description |
TagTemplate |
getTagTemplateCallable()
public final UnaryCallable<GetTagTemplateRequest,TagTemplate> getTagTemplateCallable()
Gets a tag template.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
GetTagTemplateRequest request =
GetTagTemplateRequest.newBuilder()
.setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
.build();
ApiFuture<TagTemplate> future =
dataCatalogClient.getTagTemplateCallable().futureCall(request);
// Do something.
TagTemplate response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetTagTemplateRequest,TagTemplate> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listEntries(EntryGroupName parent)
public final DataCatalogClient.ListEntriesPagedResponse listEntries(EntryGroupName parent)
Lists entries.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | EntryGroupName Required. The name of the entry group that contains the entries, which can be provided in URL format. Example:
|
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListEntriesPagedResponse |
listEntries(ListEntriesRequest request)
public final DataCatalogClient.ListEntriesPagedResponse listEntries(ListEntriesRequest request)
Lists entries.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | ListEntriesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListEntriesPagedResponse |
listEntries(String parent)
public final DataCatalogClient.ListEntriesPagedResponse listEntries(String parent)
Lists entries.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | String Required. The name of the entry group that contains the entries, which can be provided in URL format. Example:
|
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListEntriesPagedResponse |
listEntriesCallable()
public final UnaryCallable<ListEntriesRequest,ListEntriesResponse> listEntriesCallable()
Lists entries.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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.getEntriesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListEntriesRequest,ListEntriesResponse> |
listEntriesPagedCallable()
public final UnaryCallable<ListEntriesRequest,DataCatalogClient.ListEntriesPagedResponse> listEntriesPagedCallable()
Lists entries.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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<Entry> future = dataCatalogClient.listEntriesPagedCallable().futureCall(request);
// Do something.
for (Entry element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListEntriesRequest,ListEntriesPagedResponse> |
listEntryGroups(ListEntryGroupsRequest request)
public final DataCatalogClient.ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest request)
Lists entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ListEntryGroupsRequest request =
ListEntryGroupsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (EntryGroup element : dataCatalogClient.listEntryGroups(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListEntryGroupsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListEntryGroupsPagedResponse |
listEntryGroups(LocationName parent)
public final DataCatalogClient.ListEntryGroupsPagedResponse listEntryGroups(LocationName parent)
Lists entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | LocationName Required. The name of the location that contains the entry groups, which can be provided in URL format. Example:
|
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListEntryGroupsPagedResponse |
listEntryGroups(String parent)
public final DataCatalogClient.ListEntryGroupsPagedResponse listEntryGroups(String parent)
Lists entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | String Required. The name of the location that contains the entry groups, which can be provided in URL format. Example:
|
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListEntryGroupsPagedResponse |
listEntryGroupsCallable()
public final UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsResponse> listEntryGroupsCallable()
Lists entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ListEntryGroupsRequest request =
ListEntryGroupsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListEntryGroupsResponse response =
dataCatalogClient.listEntryGroupsCallable().call(request);
for (EntryGroup element : response.getEntryGroupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsResponse> |
listEntryGroupsPagedCallable()
public final UnaryCallable<ListEntryGroupsRequest,DataCatalogClient.ListEntryGroupsPagedResponse> listEntryGroupsPagedCallable()
Lists entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ListEntryGroupsRequest request =
ListEntryGroupsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<EntryGroup> future =
dataCatalogClient.listEntryGroupsPagedCallable().futureCall(request);
// Do something.
for (EntryGroup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsPagedResponse> |
listTags(EntryName parent)
public final DataCatalogClient.ListTagsPagedResponse listTags(EntryName parent)
Lists the tags on an Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | EntryName Required. The name of the Data Catalog resource to list the tags of. The resource could be an Entry or an EntryGroup. Examples:
|
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListTagsPagedResponse |
listTags(ListTagsRequest request)
public final DataCatalogClient.ListTagsPagedResponse listTags(ListTagsRequest request)
Lists the tags on an Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ListTagsRequest request =
ListTagsRequest.newBuilder()
.setParent(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Tag element : dataCatalogClient.listTags(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListTagsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListTagsPagedResponse |
listTags(String parent)
public final DataCatalogClient.ListTagsPagedResponse listTags(String parent)
Lists the tags on an Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
String parent =
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | String Required. The name of the Data Catalog resource to list the tags of. The resource could be an Entry or an EntryGroup. Examples:
|
Returns | |
---|---|
Type | Description |
DataCatalogClient.ListTagsPagedResponse |
listTagsCallable()
public final UnaryCallable<ListTagsRequest,ListTagsResponse> listTagsCallable()
Lists the tags on an Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ListTagsRequest request =
ListTagsRequest.newBuilder()
.setParent(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListTagsResponse response = dataCatalogClient.listTagsCallable().call(request);
for (Tag element : response.getTagsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListTagsRequest,ListTagsResponse> |
listTagsPagedCallable()
public final UnaryCallable<ListTagsRequest,DataCatalogClient.ListTagsPagedResponse> listTagsPagedCallable()
Lists the tags on an Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ListTagsRequest request =
ListTagsRequest.newBuilder()
.setParent(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Tag> future = dataCatalogClient.listTagsPagedCallable().futureCall(request);
// Do something.
for (Tag element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListTagsRequest,ListTagsPagedResponse> |
lookupEntry(LookupEntryRequest request)
public final Entry lookupEntry(LookupEntryRequest request)
Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
Entry response = dataCatalogClient.lookupEntry(request);
}
Parameter | |
---|---|
Name | Description |
request | LookupEntryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Entry |
lookupEntryCallable()
public final UnaryCallable<LookupEntryRequest,Entry> lookupEntryCallable()
Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog Entry.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
ApiFuture<Entry> future = dataCatalogClient.lookupEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<LookupEntryRequest,Entry> |
renameTagTemplateField(RenameTagTemplateFieldRequest request)
public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldRequest request)
Renames a field in a tag template. The user should enable the Data Catalog API in the project
identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | RenameTagTemplateFieldRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TagTemplateField |
renameTagTemplateField(TagTemplateFieldName name, String newTagTemplateFieldId)
public final TagTemplateField renameTagTemplateField(TagTemplateFieldName name, String newTagTemplateFieldId)
Renames a field in a tag template. The user should enable the Data Catalog API in the project
identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TagTemplateFieldName name =
TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
TagTemplateField response =
dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
}
Parameters | |
---|---|
Name | Description |
name | TagTemplateFieldName Required. The name of the tag template. Example:
|
newTagTemplateFieldId | String Required. The new ID of this tag template field. For example,
|
Returns | |
---|---|
Type | Description |
TagTemplateField |
renameTagTemplateField(String name, String newTagTemplateFieldId)
public final TagTemplateField renameTagTemplateField(String name, String newTagTemplateFieldId)
Renames a field in a tag template. The user should enable the Data Catalog API in the project
identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | String Required. The name of the tag template. Example:
|
newTagTemplateFieldId | String Required. The new ID of this tag template field. For example,
|
Returns | |
---|---|
Type | Description |
TagTemplateField |
renameTagTemplateFieldCallable()
public final UnaryCallable<RenameTagTemplateFieldRequest,TagTemplateField> renameTagTemplateFieldCallable()
Renames a field in a tag template. The user should enable the Data Catalog API in the project
identified by the name
parameter (see Data Catalog Resource
Project for more
information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
RenameTagTemplateFieldRequest request =
RenameTagTemplateFieldRequest.newBuilder()
.setName(
TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
.toString())
.setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
.build();
ApiFuture<TagTemplateField> future =
dataCatalogClient.renameTagTemplateFieldCallable().futureCall(request);
// Do something.
TagTemplateField response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<RenameTagTemplateFieldRequest,TagTemplateField> |
searchCatalog(SearchCatalogRequest request)
public final DataCatalogClient.SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest request)
Searches Data Catalog for multiple resources like entries, tags that match a query.
This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
return the complete resource, only the resource identifier and high level fields. Clients can
subsequentally call Get
methods.
Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.
See Data Catalog Search Syntax for more information.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | SearchCatalogRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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, tags that match a query.
This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
return the complete resource, only the resource identifier and high level fields. Clients can
subsequentally call Get
methods.
Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.
See Data Catalog Search Syntax for more information.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
scope | SearchCatalogRequest.Scope Required. The scope of this search request. A |
query | String Required. The query string in search query syntax. The query must be non-empty. Query strings can be simple as "x" or more qualified as:
Note: Query tokens need to have a minimum of 3 characters for substring matching to work correctly. See Data Catalog Search Syntax for more information. |
Returns | |
---|---|
Type | Description |
DataCatalogClient.SearchCatalogPagedResponse |
searchCatalogCallable()
public final UnaryCallable<SearchCatalogRequest,SearchCatalogResponse> searchCatalogCallable()
Searches Data Catalog for multiple resources like entries, tags that match a query.
This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
return the complete resource, only the resource identifier and high level fields. Clients can
subsequentally call Get
methods.
Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.
See Data Catalog Search Syntax for more information.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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.getResultsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<SearchCatalogRequest,SearchCatalogResponse> |
searchCatalogPagedCallable()
public final UnaryCallable<SearchCatalogRequest,DataCatalogClient.SearchCatalogPagedResponse> searchCatalogPagedCallable()
Searches Data Catalog for multiple resources like entries, tags that match a query.
This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
return the complete resource, only the resource identifier and high level fields. Clients can
subsequentally call Get
methods.
Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.
See Data Catalog Search Syntax for more information.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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<SearchCatalogResult> future =
dataCatalogClient.searchCatalogPagedCallable().futureCall(request);
// Do something.
for (SearchCatalogResult element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<SearchCatalogRequest,SearchCatalogPagedResponse> |
setIamPolicy(ResourceName resource, Policy policy)
public final Policy setIamPolicy(ResourceName resource, Policy policy)
Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.setIamPolicy
to set policies on tag templates. - datacatalog.entries.setIamPolicy
to set policies on
entries. - datacatalog.entryGroups.setIamPolicy
to set policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
ResourceName resource = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
Policy policy = Policy.newBuilder().build();
Policy response = dataCatalogClient.setIamPolicy(resource, policy);
}
Parameters | |
---|---|
Name | Description |
resource | com.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. |
policy | com.google.iam.v1.Policy REQUIRED: The complete policy to be applied to the |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)
Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.setIamPolicy
to set policies on tag templates. - datacatalog.entries.setIamPolicy
to set policies on
entries. - datacatalog.entryGroups.setIamPolicy
to set policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = dataCatalogClient.setIamPolicy(request);
}
Parameter | |
---|---|
Name | Description |
request | com.google.iam.v1.SetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicy(String resource, Policy policy)
public final Policy setIamPolicy(String resource, Policy policy)
Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.setIamPolicy
to set policies on tag templates. - datacatalog.entries.setIamPolicy
to set policies on
entries. - datacatalog.entryGroups.setIamPolicy
to set policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | com.google.iam.v1.Policy REQUIRED: The complete policy to be applied to the |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
Callers must have following Google IAM permission - datacatalog.tagTemplates.setIamPolicy
to set policies on tag templates. - datacatalog.entries.setIamPolicy
to set policies on
entries. - datacatalog.entryGroups.setIamPolicy
to set policies on entry groups.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
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)
Returns the caller's permissions on a resource. If the resource does not exist, an empty set of
permissions is returned (We don't return a NOT_FOUND
error).
Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
A caller is not required to have Google IAM permission to make this request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(request);
}
Parameter | |
---|---|
Name | Description |
request | com.google.iam.v1.TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
Returns the caller's permissions on a resource. If the resource does not exist, an empty set of
permissions is returned (We don't return a NOT_FOUND
error).
Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.
A caller is not required to have Google IAM permission to make this request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
dataCatalogClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
updateEntry(Entry entry)
public final Entry updateEntry(Entry entry)
Updates an existing entry. Users should enable the Data Catalog API in the project identified
by the entry.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
Entry entry = Entry.newBuilder().build();
Entry response = dataCatalogClient.updateEntry(entry);
}
Parameter | |
---|---|
Name | Description |
entry | Entry Required. The updated entry. The "name" field must be set. |
Returns | |
---|---|
Type | Description |
Entry |
updateEntry(Entry entry, FieldMask updateMask)
public final Entry updateEntry(Entry entry, FieldMask updateMask)
Updates an existing entry. Users should enable the Data Catalog API in the project identified
by the entry.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
Entry entry = Entry.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Entry response = dataCatalogClient.updateEntry(entry, updateMask);
}
Parameters | |
---|---|
Name | Description |
entry | Entry Required. The updated entry. The "name" field must be set. |
updateMask | FieldMask The fields to update on the entry. If absent or empty, all modifiable fields are updated. The following fields are modifiable:
|
Returns | |
---|---|
Type | Description |
Entry |
updateEntry(UpdateEntryRequest request)
public final Entry updateEntry(UpdateEntryRequest request)
Updates an existing entry. Users should enable the Data Catalog API in the project identified
by the entry.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateEntryRequest request =
UpdateEntryRequest.newBuilder()
.setEntry(Entry.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Entry response = dataCatalogClient.updateEntry(request);
}
Parameter | |
---|---|
Name | Description |
request | UpdateEntryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Entry |
updateEntryCallable()
public final UnaryCallable<UpdateEntryRequest,Entry> updateEntryCallable()
Updates an existing entry. Users should enable the Data Catalog API in the project identified
by the entry.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateEntryRequest request =
UpdateEntryRequest.newBuilder()
.setEntry(Entry.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Entry> future = dataCatalogClient.updateEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateEntryRequest,Entry> |
updateEntryGroup(EntryGroup entryGroup)
public final EntryGroup updateEntryGroup(EntryGroup entryGroup)
Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
the entry_group.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryGroup entryGroup = EntryGroup.newBuilder().build();
EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
}
Parameter | |
---|---|
Name | Description |
entryGroup | EntryGroup Required. The updated entry group. "name" field must be set. |
Returns | |
---|---|
Type | Description |
EntryGroup |
updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask)
public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask)
Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
the entry_group.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
EntryGroup entryGroup = EntryGroup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
}
Parameters | |
---|---|
Name | Description |
entryGroup | EntryGroup Required. The updated entry group. "name" field must be set. |
updateMask | FieldMask The fields to update on the entry group. If absent or empty, all modifiable fields are updated. |
Returns | |
---|---|
Type | Description |
EntryGroup |
updateEntryGroup(UpdateEntryGroupRequest request)
public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request)
Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
the entry_group.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateEntryGroupRequest request =
UpdateEntryGroupRequest.newBuilder()
.setEntryGroup(EntryGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
EntryGroup response = dataCatalogClient.updateEntryGroup(request);
}
Parameter | |
---|---|
Name | Description |
request | UpdateEntryGroupRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
EntryGroup |
updateEntryGroupCallable()
public final UnaryCallable<UpdateEntryGroupRequest,EntryGroup> updateEntryGroupCallable()
Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
the entry_group.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateEntryGroupRequest request =
UpdateEntryGroupRequest.newBuilder()
.setEntryGroup(EntryGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<EntryGroup> future =
dataCatalogClient.updateEntryGroupCallable().futureCall(request);
// Do something.
EntryGroup response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateEntryGroupRequest,EntryGroup> |
updateTag(Tag tag)
public final Tag updateTag(Tag tag)
Updates an existing tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
Tag tag = Tag.newBuilder().build();
Tag response = dataCatalogClient.updateTag(tag);
}
Parameter | |
---|---|
Name | Description |
tag | Tag Required. The updated tag. The "name" field must be set. |
Returns | |
---|---|
Type | Description |
Tag |
updateTag(Tag tag, FieldMask updateMask)
public final Tag updateTag(Tag tag, FieldMask updateMask)
Updates an existing tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
Tag tag = Tag.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Tag response = dataCatalogClient.updateTag(tag, updateMask);
}
Parameters | |
---|---|
Name | Description |
tag | Tag Required. The updated tag. The "name" field must be set. |
updateMask | FieldMask The fields to update on the Tag. If absent or empty, all modifiable fields
are updated. Currently the only modifiable field is the field |
Returns | |
---|---|
Type | Description |
Tag |
updateTag(UpdateTagRequest request)
public final Tag updateTag(UpdateTagRequest request)
Updates an existing tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateTagRequest request =
UpdateTagRequest.newBuilder()
.setTag(Tag.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Tag response = dataCatalogClient.updateTag(request);
}
Parameter | |
---|---|
Name | Description |
request | UpdateTagRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Tag |
updateTagCallable()
public final UnaryCallable<UpdateTagRequest,Tag> updateTagCallable()
Updates an existing tag.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateTagRequest request =
UpdateTagRequest.newBuilder()
.setTag(Tag.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Tag> future = dataCatalogClient.updateTagCallable().futureCall(request);
// Do something.
Tag response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateTagRequest,Tag> |
updateTagTemplate(TagTemplate tagTemplate)
public final TagTemplate updateTagTemplate(TagTemplate tagTemplate)
Updates a tag template. This method cannot be used to update the fields of a template. The tag
template fields are represented as separate resources and should be updated using their own
create/update/delete methods. Users should enable the Data Catalog API in the project
identified by the tag_template.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TagTemplate tagTemplate = TagTemplate.newBuilder().build();
TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate);
}
Parameter | |
---|---|
Name | Description |
tagTemplate | TagTemplate Required. The template to update. The "name" field must be set. |
Returns | |
---|---|
Type | Description |
TagTemplate |
updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask)
public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask)
Updates a tag template. This method cannot be used to update the fields of a template. The tag
template fields are represented as separate resources and should be updated using their own
create/update/delete methods. Users should enable the Data Catalog API in the project
identified by the tag_template.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
TagTemplate tagTemplate = TagTemplate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate, updateMask);
}
Parameters | |
---|---|
Name | Description |
tagTemplate | TagTemplate Required. The template to update. The "name" field must be set. |
updateMask | FieldMask The field mask specifies the parts of the template to overwrite. Allowed fields: * If absent or empty, all of the allowed fields above will be updated. |
Returns | |
---|---|
Type | Description |
TagTemplate |
updateTagTemplate(UpdateTagTemplateRequest request)
public final TagTemplate updateTagTemplate(UpdateTagTemplateRequest request)
Updates a tag template. This method cannot be used to update the fields of a template. The tag
template fields are represented as separate resources and should be updated using their own
create/update/delete methods. Users should enable the Data Catalog API in the project
identified by the tag_template.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateTagTemplateRequest request =
UpdateTagTemplateRequest.newBuilder()
.setTagTemplate(TagTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
TagTemplate response = dataCatalogClient.updateTagTemplate(request);
}
Parameter | |
---|---|
Name | Description |
request | UpdateTagTemplateRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TagTemplate |
updateTagTemplateCallable()
public final UnaryCallable<UpdateTagTemplateRequest,TagTemplate> updateTagTemplateCallable()
Updates a tag template. This method cannot be used to update the fields of a template. The tag
template fields are represented as separate resources and should be updated using their own
create/update/delete methods. Users should enable the Data Catalog API in the project
identified by the tag_template.name
parameter (see Data Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
UpdateTagTemplateRequest request =
UpdateTagTemplateRequest.newBuilder()
.setTagTemplate(TagTemplate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<TagTemplate> future =
dataCatalogClient.updateTagTemplateCallable().futureCall(request);
// Do something.
TagTemplate response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateTagTemplateRequest,TagTemplate> |
updateTagTemplateField(TagTemplateFieldName name, TagTemplateField tagTemplateField)
public final TagTemplateField updateTagTemplateField(TagTemplateFieldName name, TagTemplateField tagTemplateField)
Updates a field in a tag template. This method cannot be used to update the field type. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | TagTemplateFieldName Required. The name of the tag template field. Example:
|
tagTemplateField | TagTemplateField Required. The template to update. |
Returns | |
---|---|
Type | Description |
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. This method cannot be used to update the field type. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | TagTemplateFieldName Required. The name of the tag template field. Example:
|
tagTemplateField | TagTemplateField Required. The template to update. |
updateMask | FieldMask Optional. The field mask specifies the parts of the template to be updated. Allowed fields: * If When updating an enum type, the provided values will be merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed. |
Returns | |
---|---|
Type | Description |
TagTemplateField |
updateTagTemplateField(UpdateTagTemplateFieldRequest request)
public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldRequest request)
Updates a field in a tag template. This method cannot be used to update the field type. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request | UpdateTagTemplateFieldRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TagTemplateField |
updateTagTemplateField(String name, TagTemplateField tagTemplateField)
public final TagTemplateField updateTagTemplateField(String name, TagTemplateField tagTemplateField)
Updates a field in a tag template. This method cannot be used to update the field type. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | String Required. The name of the tag template field. Example:
|
tagTemplateField | TagTemplateField Required. The template to update. |
Returns | |
---|---|
Type | Description |
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. This method cannot be used to update the field type. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
name | String Required. The name of the tag template field. Example:
|
tagTemplateField | TagTemplateField Required. The template to update. |
updateMask | FieldMask Optional. The field mask specifies the parts of the template to be updated. Allowed fields: * If When updating an enum type, the provided values will be merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted nor renamed. Updating a template field from optional to required is NOT allowed. |
Returns | |
---|---|
Type | Description |
TagTemplateField |
updateTagTemplateFieldCallable()
public final UnaryCallable<UpdateTagTemplateFieldRequest,TagTemplateField> updateTagTemplateFieldCallable()
Updates a field in a tag template. This method cannot be used to update the field type. Users
should enable the Data Catalog API in the project identified by the name
parameter (see Data
Catalog Resource Project for more information).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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<TagTemplateField> future =
dataCatalogClient.updateTagTemplateFieldCallable().futureCall(request);
// Do something.
TagTemplateField response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateTagTemplateFieldRequest,TagTemplateField> |