use of com.google.cloud.iam.credentials.v1.SignBlobRequest in project gapic-generator-java by googleapis.
the class AsyncSignBlob method asyncSignBlob.
public static void asyncSignBlob() throws Exception {
// It may require modifications to work in your environment.
try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
SignBlobRequest request = SignBlobRequest.newBuilder().setName(ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]").toString()).addAllDelegates(new ArrayList<String>()).setPayload(ByteString.EMPTY).build();
ApiFuture<SignBlobResponse> future = iamCredentialsClient.signBlobCallable().futureCall(request);
// Do something.
SignBlobResponse response = future.get();
}
}
use of com.google.cloud.iam.credentials.v1.SignBlobRequest in project gapic-generator-java by googleapis.
the class SyncSignBlob method syncSignBlob.
public static void syncSignBlob() throws Exception {
// It may require modifications to work in your environment.
try (IamCredentialsClient iamCredentialsClient = IamCredentialsClient.create()) {
SignBlobRequest request = SignBlobRequest.newBuilder().setName(ServiceAccountName.of("[PROJECT]", "[SERVICE_ACCOUNT]").toString()).addAllDelegates(new ArrayList<String>()).setPayload(ByteString.EMPTY).build();
SignBlobResponse response = iamCredentialsClient.signBlob(request);
}
}
Aggregations