@BetaApi @Generated(value="by gapic-generator-java") public class DataprocMetastoreFederationClient extends Object implements com.google.api.gax.core.BackgroundResource
The Dataproc Metastore Federation API defines the following resource model:
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
Federation response = dataprocMetastoreFederationClient.getFederation(name);
}
Note: close() needs to be called on the DataprocMetastoreFederationClient 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 |
|---|---|---|
ListFederations |
Lists federations in a project and location. |
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.
|
GetFederation |
Gets the details of a single federation. |
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.
|
CreateFederation |
Creates a metastore federation in a project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFederation |
Updates the fields of a federation. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFederation |
Deletes a single federation. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
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.
|
GetLocation |
Gets information about a location. |
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.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
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.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
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.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
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 DataprocMetastoreFederationSettings 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
DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
DataprocMetastoreFederationSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
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
DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
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
DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataprocMetastoreFederationClient.ListFederationsFixedSizeCollection |
static class |
DataprocMetastoreFederationClient.ListFederationsPage |
static class |
DataprocMetastoreFederationClient.ListFederationsPagedResponse |
static class |
DataprocMetastoreFederationClient.ListLocationsFixedSizeCollection |
static class |
DataprocMetastoreFederationClient.ListLocationsPage |
static class |
DataprocMetastoreFederationClient.ListLocationsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
DataprocMetastoreFederationClient(DataprocMetastoreFederationSettings settings)
Constructs an instance of DataprocMetastoreFederationClient, using the given settings.
|
protected |
DataprocMetastoreFederationClient(DataprocMetastoreFederationStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static DataprocMetastoreFederationClient |
create()
Constructs an instance of DataprocMetastoreFederationClient with default settings.
|
static DataprocMetastoreFederationClient |
create(DataprocMetastoreFederationSettings settings)
Constructs an instance of DataprocMetastoreFederationClient, using the given settings.
|
static DataprocMetastoreFederationClient |
create(DataprocMetastoreFederationStub stub)
Constructs an instance of DataprocMetastoreFederationClient, using the given stub for making
calls.
|
com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> |
createFederationAsync(CreateFederationRequest request)
Creates a metastore federation in a project and location.
|
com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> |
createFederationAsync(LocationName parent,
Federation federation,
String federationId)
Creates a metastore federation in a project and location.
|
com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> |
createFederationAsync(String parent,
Federation federation,
String federationId)
Creates a metastore federation in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateFederationRequest,com.google.longrunning.Operation> |
createFederationCallable()
Creates a metastore federation in a project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateFederationRequest,Federation,OperationMetadata> |
createFederationOperationCallable()
Creates a metastore federation in a project and location.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteFederationAsync(DeleteFederationRequest request)
Deletes a single federation.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteFederationAsync(FederationName name)
Deletes a single federation.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteFederationAsync(String name)
Deletes a single federation.
|
com.google.api.gax.rpc.UnaryCallable<DeleteFederationRequest,com.google.longrunning.Operation> |
deleteFederationCallable()
Deletes a single federation.
|
com.google.api.gax.rpc.OperationCallable<DeleteFederationRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteFederationOperationCallable()
Deletes a single federation.
|
Federation |
getFederation(FederationName name)
Gets the details of a single federation.
|
Federation |
getFederation(GetFederationRequest request)
Gets the details of a single federation.
|
Federation |
getFederation(String name)
Gets the details of a single federation.
|
com.google.api.gax.rpc.UnaryCallable<GetFederationRequest,Federation> |
getFederationCallable()
Gets the details of a single federation.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyCallable()
Gets the access control policy for a resource.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
DataprocMetastoreFederationSettings |
getSettings() |
DataprocMetastoreFederationStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
DataprocMetastoreFederationClient.ListFederationsPagedResponse |
listFederations(ListFederationsRequest request)
Lists federations in a project and location.
|
DataprocMetastoreFederationClient.ListFederationsPagedResponse |
listFederations(LocationName parent)
Lists federations in a project and location.
|
DataprocMetastoreFederationClient.ListFederationsPagedResponse |
listFederations(String parent)
Lists federations in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListFederationsRequest,ListFederationsResponse> |
listFederationsCallable()
Lists federations in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListFederationsRequest,DataprocMetastoreFederationClient.ListFederationsPagedResponse> |
listFederationsPagedCallable()
Lists federations in a project and location.
|
DataprocMetastoreFederationClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,DataprocMetastoreFederationClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyCallable()
Sets the access control policy on the specified resource.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> |
updateFederationAsync(Federation federation,
com.google.protobuf.FieldMask updateMask)
Updates the fields of a federation.
|
com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> |
updateFederationAsync(UpdateFederationRequest request)
Updates the fields of a federation.
|
com.google.api.gax.rpc.UnaryCallable<UpdateFederationRequest,com.google.longrunning.Operation> |
updateFederationCallable()
Updates the fields of a federation.
|
com.google.api.gax.rpc.OperationCallable<UpdateFederationRequest,Federation,OperationMetadata> |
updateFederationOperationCallable()
Updates the fields of a federation.
|
protected DataprocMetastoreFederationClient(DataprocMetastoreFederationSettings settings) throws IOException
IOExceptionprotected DataprocMetastoreFederationClient(DataprocMetastoreFederationStub stub)
public static final DataprocMetastoreFederationClient create() throws IOException
IOExceptionpublic static final DataprocMetastoreFederationClient create(DataprocMetastoreFederationSettings settings) throws IOException
IOExceptionpublic static final DataprocMetastoreFederationClient create(DataprocMetastoreFederationStub stub)
public final DataprocMetastoreFederationSettings getSettings()
public DataprocMetastoreFederationStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final DataprocMetastoreFederationClient.ListFederationsPagedResponse listFederations(LocationName parent)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Federation element :
dataprocMetastoreFederationClient.listFederations(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The relative resource name of the location of metastore federations to
list, in the following form: `projects/{project_number}/locations/{location_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataprocMetastoreFederationClient.ListFederationsPagedResponse listFederations(String parent)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Federation element :
dataprocMetastoreFederationClient.listFederations(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The relative resource name of the location of metastore federations to
list, in the following form: `projects/{project_number}/locations/{location_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataprocMetastoreFederationClient.ListFederationsPagedResponse listFederations(ListFederationsRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
ListFederationsRequest request =
ListFederationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Federation element :
dataprocMetastoreFederationClient.listFederations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListFederationsRequest,DataprocMetastoreFederationClient.ListFederationsPagedResponse> listFederationsPagedCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
ListFederationsRequest request =
ListFederationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Federation> future =
dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
// Do something.
for (Federation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListFederationsRequest,ListFederationsResponse> listFederationsCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
ListFederationsRequest request =
ListFederationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListFederationsResponse response =
dataprocMetastoreFederationClient.listFederationsCallable().call(request);
for (Federation element : response.getFederationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Federation getFederation(FederationName name)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
Federation response = dataprocMetastoreFederationClient.getFederation(name);
}
name - Required. The relative resource name of the metastore federation to retrieve, in
the following form:
`projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Federation getFederation(String name)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
String name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString();
Federation response = dataprocMetastoreFederationClient.getFederation(name);
}
name - Required. The relative resource name of the metastore federation to retrieve, in
the following form:
`projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Federation getFederation(GetFederationRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
GetFederationRequest request =
GetFederationRequest.newBuilder()
.setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
.build();
Federation response = dataprocMetastoreFederationClient.getFederation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetFederationRequest,Federation> getFederationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
GetFederationRequest request =
GetFederationRequest.newBuilder()
.setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
.build();
ApiFuture<Federation> future =
dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
// Do something.
Federation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> createFederationAsync(LocationName parent, Federation federation, String federationId)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Federation federation = Federation.newBuilder().build();
String federationId = "federationId-735921218";
Federation response =
dataprocMetastoreFederationClient
.createFederationAsync(parent, federation, federationId)
.get();
}
parent - Required. The relative resource name of the location in which to create a
federation service, in the following form:
`projects/{project_number}/locations/{location_id}`.
federation - Required. The Metastore Federation to create. The `name` field is ignored.
The ID of the created metastore federation must be provided in the request's
`federation_id` field.federationId - Required. The ID of the metastore federation, which is used as the final
component of the metastore federation's name.
This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> createFederationAsync(String parent, Federation federation, String federationId)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Federation federation = Federation.newBuilder().build();
String federationId = "federationId-735921218";
Federation response =
dataprocMetastoreFederationClient
.createFederationAsync(parent, federation, federationId)
.get();
}
parent - Required. The relative resource name of the location in which to create a
federation service, in the following form:
`projects/{project_number}/locations/{location_id}`.
federation - Required. The Metastore Federation to create. The `name` field is ignored.
The ID of the created metastore federation must be provided in the request's
`federation_id` field.federationId - Required. The ID of the metastore federation, which is used as the final
component of the metastore federation's name.
This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> createFederationAsync(CreateFederationRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
CreateFederationRequest request =
CreateFederationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFederationId("federationId-735921218")
.setFederation(Federation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Federation response = dataprocMetastoreFederationClient.createFederationAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateFederationRequest,Federation,OperationMetadata> createFederationOperationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
CreateFederationRequest request =
CreateFederationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFederationId("federationId-735921218")
.setFederation(Federation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Federation, OperationMetadata> future =
dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
// Do something.
Federation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateFederationRequest,com.google.longrunning.Operation> createFederationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
CreateFederationRequest request =
CreateFederationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFederationId("federationId-735921218")
.setFederation(Federation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> updateFederationAsync(Federation federation, com.google.protobuf.FieldMask updateMask)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
Federation federation = Federation.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Federation response =
dataprocMetastoreFederationClient.updateFederationAsync(federation, updateMask).get();
}
federation - Required. The metastore federation to update. The server only merges fields
in the service if they are specified in `update_mask`.
The metastore federation's `name` field is used to identify the metastore service to be updated.
updateMask - Required. A field mask used to specify the fields to be overwritten in the
metastore federation resource by the update. Fields specified in the `update_mask` are
relative to the resource (not to the full request). A field is overwritten if it is in the
mask.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Federation,OperationMetadata> updateFederationAsync(UpdateFederationRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
UpdateFederationRequest request =
UpdateFederationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setFederation(Federation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Federation response = dataprocMetastoreFederationClient.updateFederationAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateFederationRequest,Federation,OperationMetadata> updateFederationOperationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
UpdateFederationRequest request =
UpdateFederationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setFederation(Federation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Federation, OperationMetadata> future =
dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
// Do something.
Federation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateFederationRequest,com.google.longrunning.Operation> updateFederationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
UpdateFederationRequest request =
UpdateFederationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setFederation(Federation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFederationAsync(FederationName name)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
dataprocMetastoreFederationClient.deleteFederationAsync(name).get();
}
name - Required. The relative resource name of the metastore federation to delete, in the
following form:
`projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFederationAsync(String name)
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
String name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString();
dataprocMetastoreFederationClient.deleteFederationAsync(name).get();
}
name - Required. The relative resource name of the metastore federation to delete, in the
following form:
`projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFederationAsync(DeleteFederationRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
DeleteFederationRequest request =
DeleteFederationRequest.newBuilder()
.setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
.setRequestId("requestId693933066")
.build();
dataprocMetastoreFederationClient.deleteFederationAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteFederationRequest,com.google.protobuf.Empty,OperationMetadata> deleteFederationOperationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
DeleteFederationRequest request =
DeleteFederationRequest.newBuilder()
.setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteFederationRequest,com.google.longrunning.Operation> deleteFederationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
DeleteFederationRequest request =
DeleteFederationRequest.newBuilder()
.setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
// Do something.
future.get();
}
public final DataprocMetastoreFederationClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element :
dataprocMetastoreFederationClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,DataprocMetastoreFederationClient.ListLocationsPagedResponse> listLocationsPagedCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
dataprocMetastoreFederationClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = dataprocMetastoreFederationClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
dataprocMetastoreFederationClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = dataprocMetastoreFederationClient.setIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = dataprocMetastoreFederationClient.getIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response =
dataprocMetastoreFederationClient.testIamPermissions(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
DataprocMetastoreFederationClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.