use of com.google.storage.v2.GetHmacKeyRequest in project gapic-generator-java by googleapis.
the class AsyncGetHmacKey method asyncGetHmacKey.
public static void asyncGetHmacKey() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
GetHmacKeyRequest request = GetHmacKeyRequest.newBuilder().setAccessId("accessId-2146437729").setProject(ProjectName.of("[PROJECT]").toString()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
ApiFuture<HmacKeyMetadata> future = storageClient.getHmacKeyCallable().futureCall(request);
// Do something.
HmacKeyMetadata response = future.get();
}
}
use of com.google.storage.v2.GetHmacKeyRequest in project gapic-generator-java by googleapis.
the class SyncGetHmacKey method syncGetHmacKey.
public static void syncGetHmacKey() throws Exception {
// It may require modifications to work in your environment.
try (StorageClient storageClient = StorageClient.create()) {
GetHmacKeyRequest request = GetHmacKeyRequest.newBuilder().setAccessId("accessId-2146437729").setProject(ProjectName.of("[PROJECT]").toString()).setCommonRequestParams(CommonRequestParams.newBuilder().build()).build();
HmacKeyMetadata response = storageClient.getHmacKey(request);
}
}
Aggregations