public static final class KeyManagementServiceGrpc.KeyManagementServiceBlockingStub extends AbstractBlockingStub<KeyManagementServiceGrpc.KeyManagementServiceBlockingStub>
Google Cloud Key Management Service Manages cryptographic keys and operations using those keys. Implements a REST model with the following objects: * [KeyRing][google.cloud.kms.v1.KeyRing] * [CryptoKey][google.cloud.kms.v1.CryptoKey] * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] * [ImportJob][google.cloud.kms.v1.ImportJob] If you are using manual gRPC libraries, see [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
AbstractStub.StubFactory<T extends AbstractStub<T>>
Modifier and Type | Method and Description |
---|---|
AsymmetricDecryptResponse |
asymmetricDecrypt(AsymmetricDecryptRequest request)
Decrypts data that was encrypted with a public key retrieved from
[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]
corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
ASYMMETRIC_DECRYPT.
|
AsymmetricSignResponse |
asymmetricSign(AsymmetricSignRequest request)
Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
ASYMMETRIC_SIGN, producing a signature that can be verified with the public
key retrieved from
[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
|
protected KeyManagementServiceGrpc.KeyManagementServiceBlockingStub |
build(Channel channel,
CallOptions callOptions) |
CryptoKey |
createCryptoKey(CreateCryptoKeyRequest request)
Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a
[KeyRing][google.cloud.kms.v1.KeyRing].
|
CryptoKeyVersion |
createCryptoKeyVersion(CreateCryptoKeyVersionRequest request)
Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a
[CryptoKey][google.cloud.kms.v1.CryptoKey].
|
ImportJob |
createImportJob(CreateImportJobRequest request)
Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a
[KeyRing][google.cloud.kms.v1.KeyRing].
|
KeyRing |
createKeyRing(CreateKeyRingRequest request)
Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and
Location.
|
DecryptResponse |
decrypt(DecryptRequest request)
Decrypts data that was protected by
[Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
|
CryptoKeyVersion |
destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request)
Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for
destruction.
|
EncryptResponse |
encrypt(EncryptRequest request)
Encrypts data, so that it can only be recovered by a call to
[Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
|
GenerateRandomBytesResponse |
generateRandomBytes(GenerateRandomBytesRequest request)
Generate random bytes using the Cloud KMS randomness source in the provided
location.
|
CryptoKey |
getCryptoKey(GetCryptoKeyRequest request)
Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as
well as its [primary][google.cloud.kms.v1.CryptoKey.primary]
[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
|
CryptoKeyVersion |
getCryptoKeyVersion(GetCryptoKeyVersionRequest request)
Returns metadata for a given
[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
|
ImportJob |
getImportJob(GetImportJobRequest request)
Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
|
KeyRing |
getKeyRing(GetKeyRingRequest request)
Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
|
PublicKey |
getPublicKey(GetPublicKeyRequest request)
Returns the public key for the given
[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
|
CryptoKeyVersion |
importCryptoKeyVersion(ImportCryptoKeyVersionRequest request)
Import wrapped key material into a
[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
|
ListCryptoKeysResponse |
listCryptoKeys(ListCryptoKeysRequest request)
Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
|
ListCryptoKeyVersionsResponse |
listCryptoKeyVersions(ListCryptoKeyVersionsRequest request)
Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
|
ListImportJobsResponse |
listImportJobs(ListImportJobsRequest request)
Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
|
ListKeyRingsResponse |
listKeyRings(ListKeyRingsRequest request)
Lists [KeyRings][google.cloud.kms.v1.KeyRing].
|
MacSignResponse |
macSign(MacSignRequest request)
Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC,
producing a tag that can be verified by another source with the same key.
|
MacVerifyResponse |
macVerify(MacVerifyRequest request)
Verifies MAC tag using a
[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with
[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns
a response that indicates whether or not the verification was successful.
|
CryptoKeyVersion |
restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request)
Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the
[DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
state.
|
CryptoKey |
updateCryptoKey(UpdateCryptoKeyRequest request)
Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
|
CryptoKey |
updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request)
Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that
will be used in
[Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
|
CryptoKeyVersion |
updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request)
Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s
metadata.
|
newStub, newStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady
protected KeyManagementServiceGrpc.KeyManagementServiceBlockingStub build(Channel channel, CallOptions callOptions)
build
in class AbstractStub<KeyManagementServiceGrpc.KeyManagementServiceBlockingStub>
public ListKeyRingsResponse listKeyRings(ListKeyRingsRequest request)
Lists [KeyRings][google.cloud.kms.v1.KeyRing].
public ListCryptoKeysResponse listCryptoKeys(ListCryptoKeysRequest request)
Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
public ListCryptoKeyVersionsResponse listCryptoKeyVersions(ListCryptoKeyVersionsRequest request)
Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
public ListImportJobsResponse listImportJobs(ListImportJobsRequest request)
Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
public KeyRing getKeyRing(GetKeyRingRequest request)
Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
public CryptoKey getCryptoKey(GetCryptoKeyRequest request)
Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as well as its [primary][google.cloud.kms.v1.CryptoKey.primary] [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
public CryptoKeyVersion getCryptoKeyVersion(GetCryptoKeyVersionRequest request)
Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
public PublicKey getPublicKey(GetPublicKeyRequest request)
Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] or [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
public ImportJob getImportJob(GetImportJobRequest request)
Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
public KeyRing createKeyRing(CreateKeyRingRequest request)
Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
public CryptoKey createCryptoKey(CreateCryptoKeyRequest request)
Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a [KeyRing][google.cloud.kms.v1.KeyRing]. [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] are required.
public CryptoKeyVersion createCryptoKeyVersion(CreateCryptoKeyVersionRequest request)
Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a [CryptoKey][google.cloud.kms.v1.CryptoKey]. The server will assign the next sequential id. If unset, [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED].
public CryptoKeyVersion importCryptoKeyVersion(ImportCryptoKeyVersionRequest request)
Import wrapped key material into a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If a [CryptoKeyVersion][google.cloud.kms.v1.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][google.cloud.kms.v1.CryptoKey].
public ImportJob createImportJob(CreateImportJobRequest request)
Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a [KeyRing][google.cloud.kms.v1.KeyRing]. [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is required.
public CryptoKey updateCryptoKey(UpdateCryptoKeyRequest request)
Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
public CryptoKeyVersion updateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request)
Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s metadata. [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] and [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] using this method. See [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] and [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] to move between other states.
public CryptoKey updateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request)
Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. Returns an error if called on a key whose purpose is not [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
public CryptoKeyVersion destroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request)
Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction. Upon calling this method, [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will be set to the time [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] in the future. At that time, the [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically change to [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], and the key material will be irrevocably destroyed. Before the [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is reached, [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] may be called to reverse the process.
public CryptoKeyVersion restoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request)
Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] state. Upon restoration of the CryptoKeyVersion, [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will be cleared.
public EncryptResponse encrypt(EncryptRequest request)
Encrypts data, so that it can only be recovered by a call to [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
public DecryptResponse decrypt(DecryptRequest request)
Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
public AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request)
Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
public AsymmetricDecryptResponse asymmetricDecrypt(AsymmetricDecryptRequest request)
Decrypts data that was encrypted with a public key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_DECRYPT.
public MacSignResponse macSign(MacSignRequest request)
Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, producing a tag that can be verified by another source with the same key.
public MacVerifyResponse macVerify(MacVerifyRequest request)
Verifies MAC tag using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns a response that indicates whether or not the verification was successful.
public GenerateRandomBytesResponse generateRandomBytes(GenerateRandomBytesRequest request)
Generate random bytes using the Cloud KMS randomness source in the provided location.
Copyright © 2022 Google LLC. All rights reserved.