use of com.google.cloud.kms.v1.GetImportJobRequest in project gapic-generator-java by googleapis.
the class AsyncGetImportJob method asyncGetImportJob.
public static void asyncGetImportJob() throws Exception {
// It may require modifications to work in your environment.
try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[IMPORT_JOB]").toString()).build();
ApiFuture<ImportJob> future = keyManagementServiceClient.getImportJobCallable().futureCall(request);
// Do something.
ImportJob response = future.get();
}
}
use of com.google.cloud.kms.v1.GetImportJobRequest in project gapic-generator-java by googleapis.
the class SyncGetImportJob method syncGetImportJob.
public static void syncGetImportJob() throws Exception {
// It may require modifications to work in your environment.
try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[IMPORT_JOB]").toString()).build();
ImportJob response = keyManagementServiceClient.getImportJob(request);
}
}
Aggregations