public static final class KeyManagementServiceGrpc.KeyManagementServiceBlockingV2Stub extends AbstractBlockingStub<KeyManagementServiceGrpc.KeyManagementServiceBlockingV2Stub>
A stub to allow clients to do synchronous rpc calls to service KeyManagementService.
Google Cloud Key Management Service
Manages cryptographic keys and operations using those keys. Implements a REST
model with the following objects:
Inheritance
java.lang.Object >
io.grpc.stub.AbstractStub >
io.grpc.stub.AbstractBlockingStub >
KeyManagementServiceGrpc.KeyManagementServiceBlockingV2Stub
Inherited Members
io.grpc.stub.AbstractBlockingStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel)
io.grpc.stub.AbstractBlockingStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.<T>withOption(io.grpc.CallOptions.Key<T>,T)
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.getCallOptions()
io.grpc.stub.AbstractStub.getChannel()
io.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials)
io.grpc.stub.AbstractStub.withChannel(io.grpc.Channel)
io.grpc.stub.AbstractStub.withCompression(java.lang.String)
io.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline)
io.grpc.stub.AbstractStub.withDeadlineAfter(java.time.Duration)
io.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit)
io.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor)
io.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...)
io.grpc.stub.AbstractStub.withMaxInboundMessageSize(int)
io.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int)
io.grpc.stub.AbstractStub.withOnReadyThreshold(int)
io.grpc.stub.AbstractStub.withWaitForReady()
Methods
asymmetricDecrypt(AsymmetricDecryptRequest request)
public AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptRequest request)
Decrypts data that was encrypted with a public key retrieved from
GetPublicKey
corresponding to a CryptoKeyVersion
with CryptoKey.purpose
ASYMMETRIC_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
asymmetricSign(AsymmetricSignRequest request)
public AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request)
Signs data using a CryptoKeyVersion
with CryptoKey.purpose
ASYMMETRIC_SIGN, producing a signature that can be verified with the public
key retrieved from
GetPublicKey.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
build(Channel channel, CallOptions callOptions)
protected KeyManagementServiceGrpc.KeyManagementServiceBlockingV2Stub build(Channel channel, CallOptions callOptions)
| Parameters |
| Name |
Description |
channel |
io.grpc.Channel
|
callOptions |
io.grpc.CallOptions
|
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
createCryptoKey(CreateCryptoKeyRequest request)
public CryptoKey createCryptoKey(CreateCryptoKeyRequest request)
Create a new CryptoKey within a
KeyRing.
CryptoKey.purpose and
CryptoKey.version_template.algorithm
are required.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
createCryptoKeyVersion(CreateCryptoKeyVersionRequest request)
public CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionRequest request)
Create a new CryptoKeyVersion in a
CryptoKey.
The server will assign the next sequential id. If unset,
state will be set to
ENABLED.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
createImportJob(CreateImportJobRequest request)
public ImportJob createImportJob(CreateImportJobRequest request)
Create a new ImportJob within a
KeyRing.
ImportJob.import_method is
required.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
createKeyRing(CreateKeyRingRequest request)
public KeyRing createKeyRing(CreateKeyRingRequest request)
Create a new KeyRing in a given Project and
Location.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
decapsulate(DecapsulateRequest request)
public DecapsulateResponse decapsulate(DecapsulateRequest request)
Decapsulates data that was encapsulated with a public key retrieved from
GetPublicKey
corresponding to a CryptoKeyVersion
with CryptoKey.purpose
KEY_ENCAPSULATION.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
decrypt(DecryptRequest request)
public DecryptResponse decrypt(DecryptRequest request)
Decrypts data that was protected by
Encrypt. The
CryptoKey.purpose must be
ENCRYPT_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request)
public CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request)
Schedule a CryptoKeyVersion for
destruction.
Upon calling this method,
CryptoKeyVersion.state will
be set to
DESTROY_SCHEDULED,
and destroy_time will
be set to the time
destroy_scheduled_duration
in the future. At that time, the
state will automatically
change to
DESTROYED,
and the key material will be irrevocably destroyed.
Before the
destroy_time is
reached,
RestoreCryptoKeyVersion
may be called to reverse the process.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
encrypt(EncryptRequest request)
public EncryptResponse encrypt(EncryptRequest request)
Encrypts data, so that it can only be recovered by a call to
Decrypt. The
CryptoKey.purpose must be
ENCRYPT_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
generateRandomBytes(GenerateRandomBytesRequest request)
public GenerateRandomBytesResponse generateRandomBytes(GenerateRandomBytesRequest request)
Generate random bytes using the Cloud KMS randomness source in the provided
location.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
getCryptoKey(GetCryptoKeyRequest request)
public CryptoKey getCryptoKey(GetCryptoKeyRequest request)
Returns metadata for a given CryptoKey, as
well as its primary
CryptoKeyVersion.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
getCryptoKeyVersion(GetCryptoKeyVersionRequest request)
public CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest request)
Returns metadata for a given
CryptoKeyVersion.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
getImportJob(GetImportJobRequest request)
public ImportJob getImportJob(GetImportJobRequest request)
Returns metadata for a given ImportJob.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
getKeyRing(GetKeyRingRequest request)
public KeyRing getKeyRing(GetKeyRingRequest request)
Returns metadata for a given KeyRing.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
getPublicKey(GetPublicKeyRequest request)
public PublicKey getPublicKey(GetPublicKeyRequest request)
Returns the public key for the given
CryptoKeyVersion. The
CryptoKey.purpose must be
ASYMMETRIC_SIGN
or
ASYMMETRIC_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
importCryptoKeyVersion(ImportCryptoKeyVersionRequest request)
public CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionRequest request)
Import wrapped key material into a
CryptoKeyVersion.
All requests must specify a CryptoKey. If
a CryptoKeyVersion is additionally
specified in the request, key material will be reimported into that
version. Otherwise, a new version will be created, and will be assigned the
next sequential id within the CryptoKey.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
listCryptoKeyVersions(ListCryptoKeyVersionsRequest request)
public ListCryptoKeyVersionsResponse listCryptoKeyVersions(ListCryptoKeyVersionsRequest request)
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
listCryptoKeys(ListCryptoKeysRequest request)
public ListCryptoKeysResponse listCryptoKeys(ListCryptoKeysRequest request)
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
listImportJobs(ListImportJobsRequest request)
public ListImportJobsResponse listImportJobs(ListImportJobsRequest request)
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
listKeyRings(ListKeyRingsRequest request)
public ListKeyRingsResponse listKeyRings(ListKeyRingsRequest request)
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
macSign(MacSignRequest request)
public MacSignResponse macSign(MacSignRequest request)
Signs data using a CryptoKeyVersion
with CryptoKey.purpose MAC,
producing a tag that can be verified by another source with the same key.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
macVerify(MacVerifyRequest request)
public MacVerifyResponse macVerify(MacVerifyRequest request)
Verifies MAC tag using a
CryptoKeyVersion with
CryptoKey.purpose MAC, and returns
a response that indicates whether or not the verification was successful.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
rawDecrypt(RawDecryptRequest request)
public RawDecryptResponse rawDecrypt(RawDecryptRequest request)
Decrypts data that was originally encrypted using a raw cryptographic
mechanism. The CryptoKey.purpose
must be
RAW_ENCRYPT_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
rawEncrypt(RawEncryptRequest request)
public RawEncryptResponse rawEncrypt(RawEncryptRequest request)
Encrypts data using portable cryptographic primitives. Most users should
choose Encrypt and
Decrypt rather than
their raw counterparts. The
CryptoKey.purpose must be
RAW_ENCRYPT_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request)
public CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request)
Restore a CryptoKeyVersion in the
DESTROY_SCHEDULED
state.
Upon restoration of the CryptoKeyVersion,
state will be set to
DISABLED,
and destroy_time will
be cleared.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
updateCryptoKey(UpdateCryptoKeyRequest request)
public CryptoKey updateCryptoKey(UpdateCryptoKeyRequest request)
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request)
public CryptoKey updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request)
Update the version of a CryptoKey that
will be used in
Encrypt.
Returns an error if called on a key whose purpose is not
ENCRYPT_DECRYPT.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|
updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request)
public CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request)
Update a CryptoKeyVersion's
metadata.
state may be changed between
ENABLED
and
DISABLED
using this method. See
DestroyCryptoKeyVersion
and
RestoreCryptoKeyVersion
to move between other states.
| Exceptions |
| Type |
Description |
io.grpc.StatusException |
|