- 1.55.0 (latest)
- 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
GitHub Repository | Product Reference |
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().
Method | Description | Method Variants |
---|---|---|
SearchCatalog |
Searches Data Catalog for multiple resources like entries, tags that match a query. This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not return the complete resource, only the resource identifier and high level fields. Clients can subsequently call 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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateEntryGroup |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateEntryGroup |
Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEntryGroup |
Gets an EntryGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEntryGroup |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListEntryGroups |
Lists entry groups. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateEntry |
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 A maximum of 100,000 entries may be created per entry group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateEntry |
Updates an existing entry. Users should enable the Data Catalog API in the project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEntry |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEntry |
Gets an entry. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
LookupEntry |
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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListEntries |
Lists entries. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTagTemplate |
Creates a tag template. The user should enable the Data Catalog API in the project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTagTemplate |
Gets a tag template. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTagTemplate |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTagTemplate |
Deletes a tag template and all tags using the template. Users should enable the Data Catalog API in the project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTagTemplateField |
Creates a field in a tag template. The user should enable the Data Catalog API in the project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTagTemplateField |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RenameTagTemplateField |
Renames a field in a tag template. The user should enable the Data Catalog API in the project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RenameTagTemplateFieldEnumValue |
Renames an enum value in a tag template. The enum values have to be unique within one enum field. Thus, an enum value cannot be renamed with a name used in any other enum value within the same enum field. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTagTemplateField |
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 |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTag |
Creates a tag on an Entry. Note: The project identified by the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTag |
Updates an existing tag. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTag |
Deletes a tag. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTags |
Lists tags assigned to an Entry. The columns in the response are lowercased. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
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 - |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. A 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 - |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
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 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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return 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.
Static 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 |
|