use of com.google.storage.v2.UpdateHmacKeyRequest in project gapic-generator-java by googleapis.
the class AsyncUpdateHmacKey method asyncUpdateHmacKey.
public static void asyncUpdateHmacKey() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
UpdateHmacKeyRequest request = UpdateHmacKeyRequest.newBuilder().setHmacKey(HmacKeyMetadata.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
ApiFuture<HmacKeyMetadata> future = storageClient.updateHmacKeyCallable().futureCall(request);
// Do something.
HmacKeyMetadata response = future.get();
}
}
use of com.google.storage.v2.UpdateHmacKeyRequest in project gapic-generator-java by googleapis.
the class SyncUpdateHmacKey method syncUpdateHmacKey.
public static void syncUpdateHmacKey() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
UpdateHmacKeyRequest request = UpdateHmacKeyRequest.newBuilder().setHmacKey(HmacKeyMetadata.newBuilder().build()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
HmacKeyMetadata response = storageClient.updateHmacKey(request);
}
}
Aggregations