use of com.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest in project gapic-generator-java by googleapis.
the class SyncUpdateCryptoKeyVersion method syncUpdateCryptoKeyVersion.
public static void syncUpdateCryptoKeyVersion() throws Exception {
// It may require modifications to work in your environment.
try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
UpdateCryptoKeyVersionRequest request = UpdateCryptoKeyVersionRequest.newBuilder().setCryptoKeyVersion(CryptoKeyVersion.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
CryptoKeyVersion response = keyManagementServiceClient.updateCryptoKeyVersion(request);
}
}
use of com.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest in project gapic-generator-java by googleapis.
the class AsyncUpdateCryptoKeyVersion method asyncUpdateCryptoKeyVersion.
public static void asyncUpdateCryptoKeyVersion() throws Exception {
// It may require modifications to work in your environment.
try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
UpdateCryptoKeyVersionRequest request = UpdateCryptoKeyVersionRequest.newBuilder().setCryptoKeyVersion(CryptoKeyVersion.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
ApiFuture<CryptoKeyVersion> future = keyManagementServiceClient.updateCryptoKeyVersionCallable().futureCall(request);
// Do something.
CryptoKeyVersion response = future.get();
}
}
Aggregations