@Generated(value="by gapic-generator-java") public class CmekConfigServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
}
Note: close() needs to be called on the CmekConfigServiceClient 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 |
|---|---|---|
UpdateCmekConfig |
Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected 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.
|
GetCmekConfig |
Gets the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]. |
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.
|
ListCmekConfigs |
Lists all the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with the project. |
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.
|
DeleteCmekConfig |
De-provisions a CmekConfig. |
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.
|
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 CmekConfigServiceSettings 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
CmekConfigServiceSettings cmekConfigServiceSettings =
CmekConfigServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CmekConfigServiceClient cmekConfigServiceClient =
CmekConfigServiceClient.create(cmekConfigServiceSettings);
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
CmekConfigServiceSettings cmekConfigServiceSettings =
CmekConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CmekConfigServiceClient cmekConfigServiceClient =
CmekConfigServiceClient.create(cmekConfigServiceSettings);
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
CmekConfigServiceSettings cmekConfigServiceSettings =
CmekConfigServiceSettings.newHttpJsonBuilder().build();
CmekConfigServiceClient cmekConfigServiceClient =
CmekConfigServiceClient.create(cmekConfigServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier | Constructor and Description |
|---|---|
protected |
CmekConfigServiceClient(CmekConfigServiceSettings settings)
Constructs an instance of CmekConfigServiceClient, using the given settings.
|
protected |
CmekConfigServiceClient(CmekConfigServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static CmekConfigServiceClient |
create()
Constructs an instance of CmekConfigServiceClient with default settings.
|
static CmekConfigServiceClient |
create(CmekConfigServiceSettings settings)
Constructs an instance of CmekConfigServiceClient, using the given settings.
|
static CmekConfigServiceClient |
create(CmekConfigServiceStub stub)
Constructs an instance of CmekConfigServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCmekConfigMetadata> |
deleteCmekConfigAsync(CmekConfigName name)
De-provisions a CmekConfig.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCmekConfigMetadata> |
deleteCmekConfigAsync(DeleteCmekConfigRequest request)
De-provisions a CmekConfig.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCmekConfigMetadata> |
deleteCmekConfigAsync(String name)
De-provisions a CmekConfig.
|
com.google.api.gax.rpc.UnaryCallable<DeleteCmekConfigRequest,com.google.longrunning.Operation> |
deleteCmekConfigCallable()
De-provisions a CmekConfig.
|
com.google.api.gax.rpc.OperationCallable<DeleteCmekConfigRequest,com.google.protobuf.Empty,DeleteCmekConfigMetadata> |
deleteCmekConfigOperationCallable()
De-provisions a CmekConfig.
|
CmekConfig |
getCmekConfig(CmekConfigName name)
Gets the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig].
|
CmekConfig |
getCmekConfig(GetCmekConfigRequest request)
Gets the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig].
|
CmekConfig |
getCmekConfig(String name)
Gets the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig].
|
com.google.api.gax.rpc.UnaryCallable<GetCmekConfigRequest,CmekConfig> |
getCmekConfigCallable()
Gets the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig].
|
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.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.
|
CmekConfigServiceSettings |
getSettings() |
CmekConfigServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
ListCmekConfigsResponse |
listCmekConfigs(ListCmekConfigsRequest request)
Lists all the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with the project.
|
ListCmekConfigsResponse |
listCmekConfigs(LocationName parent)
Lists all the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with the project.
|
ListCmekConfigsResponse |
listCmekConfigs(String parent)
Lists all the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with the project.
|
com.google.api.gax.rpc.UnaryCallable<ListCmekConfigsRequest,ListCmekConfigsResponse> |
listCmekConfigsCallable()
Lists all the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with the project.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<CmekConfig,UpdateCmekConfigMetadata> |
updateCmekConfigAsync(CmekConfig config)
Provisions a CMEK key for use in a location of a customer's project.
|
com.google.api.gax.longrunning.OperationFuture<CmekConfig,UpdateCmekConfigMetadata> |
updateCmekConfigAsync(UpdateCmekConfigRequest request)
Provisions a CMEK key for use in a location of a customer's project.
|
com.google.api.gax.rpc.UnaryCallable<UpdateCmekConfigRequest,com.google.longrunning.Operation> |
updateCmekConfigCallable()
Provisions a CMEK key for use in a location of a customer's project.
|
com.google.api.gax.rpc.OperationCallable<UpdateCmekConfigRequest,CmekConfig,UpdateCmekConfigMetadata> |
updateCmekConfigOperationCallable()
Provisions a CMEK key for use in a location of a customer's project.
|
protected CmekConfigServiceClient(CmekConfigServiceSettings settings) throws IOException
IOExceptionprotected CmekConfigServiceClient(CmekConfigServiceStub stub)
public static final CmekConfigServiceClient create() throws IOException
IOExceptionpublic static final CmekConfigServiceClient create(CmekConfigServiceSettings settings) throws IOException
IOExceptionpublic static final CmekConfigServiceClient create(CmekConfigServiceStub stub)
public final CmekConfigServiceSettings getSettings()
public CmekConfigServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<CmekConfig,UpdateCmekConfigMetadata> updateCmekConfigAsync(CmekConfig config)
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
CmekConfig config = CmekConfig.newBuilder().build();
CmekConfig response = cmekConfigServiceClient.updateCmekConfigAsync(config).get();
}
config - Required. The CmekConfig resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<CmekConfig,UpdateCmekConfigMetadata> updateCmekConfigAsync(UpdateCmekConfigRequest 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
UpdateCmekConfigRequest request =
UpdateCmekConfigRequest.newBuilder()
.setConfig(CmekConfig.newBuilder().build())
.setSetDefault(true)
.build();
CmekConfig response = cmekConfigServiceClient.updateCmekConfigAsync(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<UpdateCmekConfigRequest,CmekConfig,UpdateCmekConfigMetadata> updateCmekConfigOperationCallable()
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
UpdateCmekConfigRequest request =
UpdateCmekConfigRequest.newBuilder()
.setConfig(CmekConfig.newBuilder().build())
.setSetDefault(true)
.build();
OperationFuture<CmekConfig, UpdateCmekConfigMetadata> future =
cmekConfigServiceClient.updateCmekConfigOperationCallable().futureCall(request);
// Do something.
CmekConfig response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateCmekConfigRequest,com.google.longrunning.Operation> updateCmekConfigCallable()
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
UpdateCmekConfigRequest request =
UpdateCmekConfigRequest.newBuilder()
.setConfig(CmekConfig.newBuilder().build())
.setSetDefault(true)
.build();
ApiFuture<Operation> future =
cmekConfigServiceClient.updateCmekConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final CmekConfig getCmekConfig(CmekConfigName 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
}
name - Required. Resource name of
[CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], such as
`projects/*/locations/*/cmekConfig` or
`projects/*/locations/*/cmekConfigs/*`.
If the caller does not have permission to access the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final CmekConfig getCmekConfig(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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
String name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString();
CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
}
name - Required. Resource name of
[CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], such as
`projects/*/locations/*/cmekConfig` or
`projects/*/locations/*/cmekConfigs/*`.
If the caller does not have permission to access the [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final CmekConfig getCmekConfig(GetCmekConfigRequest 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
GetCmekConfigRequest request =
GetCmekConfigRequest.newBuilder()
.setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString())
.build();
CmekConfig response = cmekConfigServiceClient.getCmekConfig(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<GetCmekConfigRequest,CmekConfig> getCmekConfigCallable()
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
GetCmekConfigRequest request =
GetCmekConfigRequest.newBuilder()
.setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<CmekConfig> future =
cmekConfigServiceClient.getCmekConfigCallable().futureCall(request);
// Do something.
CmekConfig response = future.get();
}
public final ListCmekConfigsResponse listCmekConfigs(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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(parent);
}
parent - Required. The parent location resource name, such as
`projects/{project}/locations/{location}`.
If the caller does not have permission to list [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final ListCmekConfigsResponse listCmekConfigs(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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(parent);
}
parent - Required. The parent location resource name, such as
`projects/{project}/locations/{location}`.
If the caller does not have permission to list [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final ListCmekConfigsResponse listCmekConfigs(ListCmekConfigsRequest 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
ListCmekConfigsRequest request =
ListCmekConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(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<ListCmekConfigsRequest,ListCmekConfigsResponse> listCmekConfigsCallable()
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
ListCmekConfigsRequest request =
ListCmekConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<ListCmekConfigsResponse> future =
cmekConfigServiceClient.listCmekConfigsCallable().futureCall(request);
// Do something.
ListCmekConfigsResponse response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCmekConfigMetadata> deleteCmekConfigAsync(CmekConfigName 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
CmekConfigName name =
CmekConfigName.ofProjectLocationCmekConfigName(
"[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]");
cmekConfigServiceClient.deleteCmekConfigAsync(name).get();
}
name - Required. The resource name of the
[CmekConfig][google.cloud.discoveryengine.v1.CmekConfig] to delete, such as
`projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCmekConfigMetadata> deleteCmekConfigAsync(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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
String name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString();
cmekConfigServiceClient.deleteCmekConfigAsync(name).get();
}
name - Required. The resource name of the
[CmekConfig][google.cloud.discoveryengine.v1.CmekConfig] to delete, such as
`projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCmekConfigMetadata> deleteCmekConfigAsync(DeleteCmekConfigRequest 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
DeleteCmekConfigRequest request =
DeleteCmekConfigRequest.newBuilder()
.setName(
CmekConfigName.ofProjectLocationCmekConfigName(
"[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]")
.toString())
.build();
cmekConfigServiceClient.deleteCmekConfigAsync(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<DeleteCmekConfigRequest,com.google.protobuf.Empty,DeleteCmekConfigMetadata> deleteCmekConfigOperationCallable()
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
DeleteCmekConfigRequest request =
DeleteCmekConfigRequest.newBuilder()
.setName(
CmekConfigName.ofProjectLocationCmekConfigName(
"[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]")
.toString())
.build();
OperationFuture<Empty, DeleteCmekConfigMetadata> future =
cmekConfigServiceClient.deleteCmekConfigOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteCmekConfigRequest,com.google.longrunning.Operation> deleteCmekConfigCallable()
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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
DeleteCmekConfigRequest request =
DeleteCmekConfigRequest.newBuilder()
.setName(
CmekConfigName.ofProjectLocationCmekConfigName(
"[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]")
.toString())
.build();
ApiFuture<Operation> future =
cmekConfigServiceClient.deleteCmekConfigCallable().futureCall(request);
// Do something.
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 © 2026 Google LLC. All rights reserved.