Google Cloud Key Management Service v1 API - Class KeyManagementService.KeyManagementServiceClient (3.8.0)

public class KeyManagementService.KeyManagementServiceClient : ClientBase<KeyManagementService.KeyManagementServiceClient>

Reference documentation and code samples for the Google Cloud Key Management Service v1 API class KeyManagementService.KeyManagementServiceClient.

Client for KeyManagementService

Inheritance

object > ClientBase > ClientBaseKeyManagementServiceKeyManagementServiceClient > KeyManagementService.KeyManagementServiceClient

Namespace

Google.Cloud.Kms.V1

Assembly

Google.Cloud.Kms.V1.dll

Constructors

KeyManagementServiceClient()

protected KeyManagementServiceClient()

Protected parameterless constructor to allow creation of test doubles.

KeyManagementServiceClient(CallInvoker)

public KeyManagementServiceClient(CallInvoker callInvoker)

Creates a new client for KeyManagementService that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

KeyManagementServiceClient(ChannelBase)

public KeyManagementServiceClient(ChannelBase channel)

Creates a new client for KeyManagementService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

KeyManagementServiceClient(ClientBaseConfiguration)

protected KeyManagementServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

AsymmetricDecrypt(AsymmetricDecryptRequest, CallOptions)

public virtual AsymmetricDecryptResponse AsymmetricDecrypt(AsymmetricDecryptRequest request, CallOptions options)

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.

Parameters
NameDescription
requestAsymmetricDecryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsymmetricDecryptResponse

The response received from the server.

AsymmetricDecrypt(AsymmetricDecryptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsymmetricDecryptResponse AsymmetricDecrypt(AsymmetricDecryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestAsymmetricDecryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsymmetricDecryptResponse

The response received from the server.

AsymmetricDecryptAsync(AsymmetricDecryptRequest, CallOptions)

public virtual AsyncUnaryCall<AsymmetricDecryptResponse> AsymmetricDecryptAsync(AsymmetricDecryptRequest request, CallOptions options)

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.

Parameters
NameDescription
requestAsymmetricDecryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAsymmetricDecryptResponse

The call object.

AsymmetricDecryptAsync(AsymmetricDecryptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AsymmetricDecryptResponse> AsymmetricDecryptAsync(AsymmetricDecryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestAsymmetricDecryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAsymmetricDecryptResponse

The call object.

AsymmetricSign(AsymmetricSignRequest, CallOptions)

public virtual AsymmetricSignResponse AsymmetricSign(AsymmetricSignRequest request, CallOptions options)

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].

Parameters
NameDescription
requestAsymmetricSignRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsymmetricSignResponse

The response received from the server.

AsymmetricSign(AsymmetricSignRequest, Metadata, DateTime?, CancellationToken)

public virtual AsymmetricSignResponse AsymmetricSign(AsymmetricSignRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestAsymmetricSignRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsymmetricSignResponse

The response received from the server.

AsymmetricSignAsync(AsymmetricSignRequest, CallOptions)

public virtual AsyncUnaryCall<AsymmetricSignResponse> AsymmetricSignAsync(AsymmetricSignRequest request, CallOptions options)

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].

Parameters
NameDescription
requestAsymmetricSignRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAsymmetricSignResponse

The call object.

AsymmetricSignAsync(AsymmetricSignRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AsymmetricSignResponse> AsymmetricSignAsync(AsymmetricSignRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestAsymmetricSignRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAsymmetricSignResponse

The call object.

CreateCryptoKey(CreateCryptoKeyRequest, CallOptions)

public virtual CryptoKey CreateCryptoKey(CreateCryptoKeyRequest request, CallOptions options)

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.

Parameters
NameDescription
requestCreateCryptoKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

CreateCryptoKey(CreateCryptoKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKey CreateCryptoKey(CreateCryptoKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestCreateCryptoKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

CreateCryptoKeyAsync(CreateCryptoKeyRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKey> CreateCryptoKeyAsync(CreateCryptoKeyRequest request, CallOptions options)

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.

Parameters
NameDescription
requestCreateCryptoKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

CreateCryptoKeyAsync(CreateCryptoKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKey> CreateCryptoKeyAsync(CreateCryptoKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestCreateCryptoKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest, CallOptions)

public virtual CryptoKeyVersion CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest request, CallOptions options)

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].

Parameters
NameDescription
requestCreateCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKeyVersion CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestCreateCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

CreateCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKeyVersion> CreateCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest request, CallOptions options)

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].

Parameters
NameDescription
requestCreateCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

CreateCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKeyVersion> CreateCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestCreateCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

CreateIAMPolicyClient()

public virtual IAMPolicy.IAMPolicyClient CreateIAMPolicyClient()

Creates a new instance of IAMPolicy.IAMPolicyClient using the same call invoker as this client.

Returns
TypeDescription
IAMPolicyIAMPolicyClient

A new IAMPolicy.IAMPolicyClient for the same target as this client.

CreateImportJob(CreateImportJobRequest, CallOptions)

public virtual ImportJob CreateImportJob(CreateImportJobRequest request, CallOptions options)

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.

Parameters
NameDescription
requestCreateImportJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ImportJob

The response received from the server.

CreateImportJob(CreateImportJobRequest, Metadata, DateTime?, CancellationToken)

public virtual ImportJob CreateImportJob(CreateImportJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestCreateImportJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ImportJob

The response received from the server.

CreateImportJobAsync(CreateImportJobRequest, CallOptions)

public virtual AsyncUnaryCall<ImportJob> CreateImportJobAsync(CreateImportJobRequest request, CallOptions options)

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.

Parameters
NameDescription
requestCreateImportJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallImportJob

The call object.

CreateImportJobAsync(CreateImportJobRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ImportJob> CreateImportJobAsync(CreateImportJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestCreateImportJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallImportJob

The call object.

CreateKeyRing(CreateKeyRingRequest, CallOptions)

public virtual KeyRing CreateKeyRing(CreateKeyRingRequest request, CallOptions options)

Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.

Parameters
NameDescription
requestCreateKeyRingRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
KeyRing

The response received from the server.

CreateKeyRing(CreateKeyRingRequest, Metadata, DateTime?, CancellationToken)

public virtual KeyRing CreateKeyRing(CreateKeyRingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.

Parameters
NameDescription
requestCreateKeyRingRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
KeyRing

The response received from the server.

CreateKeyRingAsync(CreateKeyRingRequest, CallOptions)

public virtual AsyncUnaryCall<KeyRing> CreateKeyRingAsync(CreateKeyRingRequest request, CallOptions options)

Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.

Parameters
NameDescription
requestCreateKeyRingRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallKeyRing

The call object.

CreateKeyRingAsync(CreateKeyRingRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<KeyRing> CreateKeyRingAsync(CreateKeyRingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.

Parameters
NameDescription
requestCreateKeyRingRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallKeyRing

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

Decrypt(DecryptRequest, CallOptions)

public virtual DecryptResponse Decrypt(DecryptRequest request, CallOptions options)

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].

Parameters
NameDescription
requestDecryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
DecryptResponse

The response received from the server.

Decrypt(DecryptRequest, Metadata, DateTime?, CancellationToken)

public virtual DecryptResponse Decrypt(DecryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestDecryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
DecryptResponse

The response received from the server.

DecryptAsync(DecryptRequest, CallOptions)

public virtual AsyncUnaryCall<DecryptResponse> DecryptAsync(DecryptRequest request, CallOptions options)

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].

Parameters
NameDescription
requestDecryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDecryptResponse

The call object.

DecryptAsync(DecryptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<DecryptResponse> DecryptAsync(DecryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestDecryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallDecryptResponse

The call object.

DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest, CallOptions)

public virtual CryptoKeyVersion DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request, CallOptions options)

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.

Parameters
NameDescription
requestDestroyCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKeyVersion DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestDestroyCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

DestroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKeyVersion> DestroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest request, CallOptions options)

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.

Parameters
NameDescription
requestDestroyCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

DestroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKeyVersion> DestroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestDestroyCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

Encrypt(EncryptRequest, CallOptions)

public virtual EncryptResponse Encrypt(EncryptRequest request, CallOptions options)

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].

Parameters
NameDescription
requestEncryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
EncryptResponse

The response received from the server.

Encrypt(EncryptRequest, Metadata, DateTime?, CancellationToken)

public virtual EncryptResponse Encrypt(EncryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestEncryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
EncryptResponse

The response received from the server.

EncryptAsync(EncryptRequest, CallOptions)

public virtual AsyncUnaryCall<EncryptResponse> EncryptAsync(EncryptRequest request, CallOptions options)

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].

Parameters
NameDescription
requestEncryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEncryptResponse

The call object.

EncryptAsync(EncryptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<EncryptResponse> EncryptAsync(EncryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestEncryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEncryptResponse

The call object.

GenerateRandomBytes(GenerateRandomBytesRequest, CallOptions)

public virtual GenerateRandomBytesResponse GenerateRandomBytes(GenerateRandomBytesRequest request, CallOptions options)

Generate random bytes using the Cloud KMS randomness source in the provided location.

Parameters
NameDescription
requestGenerateRandomBytesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
GenerateRandomBytesResponse

The response received from the server.

GenerateRandomBytes(GenerateRandomBytesRequest, Metadata, DateTime?, CancellationToken)

public virtual GenerateRandomBytesResponse GenerateRandomBytes(GenerateRandomBytesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Generate random bytes using the Cloud KMS randomness source in the provided location.

Parameters
NameDescription
requestGenerateRandomBytesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
GenerateRandomBytesResponse

The response received from the server.

GenerateRandomBytesAsync(GenerateRandomBytesRequest, CallOptions)

public virtual AsyncUnaryCall<GenerateRandomBytesResponse> GenerateRandomBytesAsync(GenerateRandomBytesRequest request, CallOptions options)

Generate random bytes using the Cloud KMS randomness source in the provided location.

Parameters
NameDescription
requestGenerateRandomBytesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallGenerateRandomBytesResponse

The call object.

GenerateRandomBytesAsync(GenerateRandomBytesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<GenerateRandomBytesResponse> GenerateRandomBytesAsync(GenerateRandomBytesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Generate random bytes using the Cloud KMS randomness source in the provided location.

Parameters
NameDescription
requestGenerateRandomBytesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallGenerateRandomBytesResponse

The call object.

GetCryptoKey(GetCryptoKeyRequest, CallOptions)

public virtual CryptoKey GetCryptoKey(GetCryptoKeyRequest request, CallOptions options)

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].

Parameters
NameDescription
requestGetCryptoKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

GetCryptoKey(GetCryptoKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKey GetCryptoKey(GetCryptoKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestGetCryptoKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

GetCryptoKeyAsync(GetCryptoKeyRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKey> GetCryptoKeyAsync(GetCryptoKeyRequest request, CallOptions options)

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].

Parameters
NameDescription
requestGetCryptoKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

GetCryptoKeyAsync(GetCryptoKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKey> GetCryptoKeyAsync(GetCryptoKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestGetCryptoKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

GetCryptoKeyVersion(GetCryptoKeyVersionRequest, CallOptions)

public virtual CryptoKeyVersion GetCryptoKeyVersion(GetCryptoKeyVersionRequest request, CallOptions options)

Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestGetCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

GetCryptoKeyVersion(GetCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKeyVersion GetCryptoKeyVersion(GetCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestGetCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

GetCryptoKeyVersionAsync(GetCryptoKeyVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKeyVersion> GetCryptoKeyVersionAsync(GetCryptoKeyVersionRequest request, CallOptions options)

Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestGetCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

GetCryptoKeyVersionAsync(GetCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKeyVersion> GetCryptoKeyVersionAsync(GetCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestGetCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

GetImportJob(GetImportJobRequest, CallOptions)

public virtual ImportJob GetImportJob(GetImportJobRequest request, CallOptions options)

Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestGetImportJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ImportJob

The response received from the server.

GetImportJob(GetImportJobRequest, Metadata, DateTime?, CancellationToken)

public virtual ImportJob GetImportJob(GetImportJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestGetImportJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ImportJob

The response received from the server.

GetImportJobAsync(GetImportJobRequest, CallOptions)

public virtual AsyncUnaryCall<ImportJob> GetImportJobAsync(GetImportJobRequest request, CallOptions options)

Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestGetImportJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallImportJob

The call object.

GetImportJobAsync(GetImportJobRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ImportJob> GetImportJobAsync(GetImportJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestGetImportJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallImportJob

The call object.

GetKeyRing(GetKeyRingRequest, CallOptions)

public virtual KeyRing GetKeyRing(GetKeyRingRequest request, CallOptions options)

Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestGetKeyRingRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
KeyRing

The response received from the server.

GetKeyRing(GetKeyRingRequest, Metadata, DateTime?, CancellationToken)

public virtual KeyRing GetKeyRing(GetKeyRingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestGetKeyRingRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
KeyRing

The response received from the server.

GetKeyRingAsync(GetKeyRingRequest, CallOptions)

public virtual AsyncUnaryCall<KeyRing> GetKeyRingAsync(GetKeyRingRequest request, CallOptions options)

Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestGetKeyRingRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallKeyRing

The call object.

GetKeyRingAsync(GetKeyRingRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<KeyRing> GetKeyRingAsync(GetKeyRingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestGetKeyRingRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallKeyRing

The call object.

GetPublicKey(GetPublicKeyRequest, CallOptions)

public virtual PublicKey GetPublicKey(GetPublicKeyRequest request, CallOptions options)

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].

Parameters
NameDescription
requestGetPublicKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
PublicKey

The response received from the server.

GetPublicKey(GetPublicKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual PublicKey GetPublicKey(GetPublicKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestGetPublicKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
PublicKey

The response received from the server.

GetPublicKeyAsync(GetPublicKeyRequest, CallOptions)

public virtual AsyncUnaryCall<PublicKey> GetPublicKeyAsync(GetPublicKeyRequest request, CallOptions options)

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].

Parameters
NameDescription
requestGetPublicKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPublicKey

The call object.

GetPublicKeyAsync(GetPublicKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<PublicKey> GetPublicKeyAsync(GetPublicKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestGetPublicKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPublicKey

The call object.

ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest, CallOptions)

public virtual CryptoKeyVersion ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest request, CallOptions options)

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].

Parameters
NameDescription
requestImportCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKeyVersion ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestImportCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

ImportCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKeyVersion> ImportCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest request, CallOptions options)

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].

Parameters
NameDescription
requestImportCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

ImportCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKeyVersion> ImportCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestImportCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

ListCryptoKeyVersions(ListCryptoKeyVersionsRequest, CallOptions)

public virtual ListCryptoKeyVersionsResponse ListCryptoKeyVersions(ListCryptoKeyVersionsRequest request, CallOptions options)

Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestListCryptoKeyVersionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListCryptoKeyVersionsResponse

The response received from the server.

ListCryptoKeyVersions(ListCryptoKeyVersionsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListCryptoKeyVersionsResponse ListCryptoKeyVersions(ListCryptoKeyVersionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestListCryptoKeyVersionsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListCryptoKeyVersionsResponse

The response received from the server.

ListCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest, CallOptions)

public virtual AsyncUnaryCall<ListCryptoKeyVersionsResponse> ListCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest request, CallOptions options)

Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestListCryptoKeyVersionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListCryptoKeyVersionsResponse

The call object.

ListCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListCryptoKeyVersionsResponse> ListCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].

Parameters
NameDescription
requestListCryptoKeyVersionsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListCryptoKeyVersionsResponse

The call object.

ListCryptoKeys(ListCryptoKeysRequest, CallOptions)

public virtual ListCryptoKeysResponse ListCryptoKeys(ListCryptoKeysRequest request, CallOptions options)

Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestListCryptoKeysRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListCryptoKeysResponse

The response received from the server.

ListCryptoKeys(ListCryptoKeysRequest, Metadata, DateTime?, CancellationToken)

public virtual ListCryptoKeysResponse ListCryptoKeys(ListCryptoKeysRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestListCryptoKeysRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListCryptoKeysResponse

The response received from the server.

ListCryptoKeysAsync(ListCryptoKeysRequest, CallOptions)

public virtual AsyncUnaryCall<ListCryptoKeysResponse> ListCryptoKeysAsync(ListCryptoKeysRequest request, CallOptions options)

Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestListCryptoKeysRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListCryptoKeysResponse

The call object.

ListCryptoKeysAsync(ListCryptoKeysRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListCryptoKeysResponse> ListCryptoKeysAsync(ListCryptoKeysRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestListCryptoKeysRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListCryptoKeysResponse

The call object.

ListImportJobs(ListImportJobsRequest, CallOptions)

public virtual ListImportJobsResponse ListImportJobs(ListImportJobsRequest request, CallOptions options)

Lists [ImportJobs][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestListImportJobsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListImportJobsResponse

The response received from the server.

ListImportJobs(ListImportJobsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListImportJobsResponse ListImportJobs(ListImportJobsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [ImportJobs][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestListImportJobsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListImportJobsResponse

The response received from the server.

ListImportJobsAsync(ListImportJobsRequest, CallOptions)

public virtual AsyncUnaryCall<ListImportJobsResponse> ListImportJobsAsync(ListImportJobsRequest request, CallOptions options)

Lists [ImportJobs][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestListImportJobsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListImportJobsResponse

The call object.

ListImportJobsAsync(ListImportJobsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListImportJobsResponse> ListImportJobsAsync(ListImportJobsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [ImportJobs][google.cloud.kms.v1.ImportJob].

Parameters
NameDescription
requestListImportJobsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListImportJobsResponse

The call object.

ListKeyRings(ListKeyRingsRequest, CallOptions)

public virtual ListKeyRingsResponse ListKeyRings(ListKeyRingsRequest request, CallOptions options)

Lists [KeyRings][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestListKeyRingsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListKeyRingsResponse

The response received from the server.

ListKeyRings(ListKeyRingsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListKeyRingsResponse ListKeyRings(ListKeyRingsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [KeyRings][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestListKeyRingsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListKeyRingsResponse

The response received from the server.

ListKeyRingsAsync(ListKeyRingsRequest, CallOptions)

public virtual AsyncUnaryCall<ListKeyRingsResponse> ListKeyRingsAsync(ListKeyRingsRequest request, CallOptions options)

Lists [KeyRings][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestListKeyRingsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListKeyRingsResponse

The call object.

ListKeyRingsAsync(ListKeyRingsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListKeyRingsResponse> ListKeyRingsAsync(ListKeyRingsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists [KeyRings][google.cloud.kms.v1.KeyRing].

Parameters
NameDescription
requestListKeyRingsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListKeyRingsResponse

The call object.

MacSign(MacSignRequest, CallOptions)

public virtual MacSignResponse MacSign(MacSignRequest request, CallOptions options)

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.

Parameters
NameDescription
requestMacSignRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
MacSignResponse

The response received from the server.

MacSign(MacSignRequest, Metadata, DateTime?, CancellationToken)

public virtual MacSignResponse MacSign(MacSignRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestMacSignRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
MacSignResponse

The response received from the server.

MacSignAsync(MacSignRequest, CallOptions)

public virtual AsyncUnaryCall<MacSignResponse> MacSignAsync(MacSignRequest request, CallOptions options)

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.

Parameters
NameDescription
requestMacSignRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallMacSignResponse

The call object.

MacSignAsync(MacSignRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<MacSignResponse> MacSignAsync(MacSignRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestMacSignRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallMacSignResponse

The call object.

MacVerify(MacVerifyRequest, CallOptions)

public virtual MacVerifyResponse MacVerify(MacVerifyRequest request, CallOptions options)

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.

Parameters
NameDescription
requestMacVerifyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
MacVerifyResponse

The response received from the server.

MacVerify(MacVerifyRequest, Metadata, DateTime?, CancellationToken)

public virtual MacVerifyResponse MacVerify(MacVerifyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestMacVerifyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
MacVerifyResponse

The response received from the server.

MacVerifyAsync(MacVerifyRequest, CallOptions)

public virtual AsyncUnaryCall<MacVerifyResponse> MacVerifyAsync(MacVerifyRequest request, CallOptions options)

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.

Parameters
NameDescription
requestMacVerifyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallMacVerifyResponse

The call object.

MacVerifyAsync(MacVerifyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<MacVerifyResponse> MacVerifyAsync(MacVerifyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestMacVerifyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallMacVerifyResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override KeyManagementService.KeyManagementServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
KeyManagementServiceKeyManagementServiceClient
Overrides

RawDecrypt(RawDecryptRequest, CallOptions)

public virtual RawDecryptResponse RawDecrypt(RawDecryptRequest request, CallOptions options)

Decrypts data that was originally encrypted using a raw cryptographic mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawDecryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
RawDecryptResponse

The response received from the server.

RawDecrypt(RawDecryptRequest, Metadata, DateTime?, CancellationToken)

public virtual RawDecryptResponse RawDecrypt(RawDecryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Decrypts data that was originally encrypted using a raw cryptographic mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawDecryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
RawDecryptResponse

The response received from the server.

RawDecryptAsync(RawDecryptRequest, CallOptions)

public virtual AsyncUnaryCall<RawDecryptResponse> RawDecryptAsync(RawDecryptRequest request, CallOptions options)

Decrypts data that was originally encrypted using a raw cryptographic mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawDecryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallRawDecryptResponse

The call object.

RawDecryptAsync(RawDecryptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<RawDecryptResponse> RawDecryptAsync(RawDecryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Decrypts data that was originally encrypted using a raw cryptographic mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawDecryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallRawDecryptResponse

The call object.

RawEncrypt(RawEncryptRequest, CallOptions)

public virtual RawEncryptResponse RawEncrypt(RawEncryptRequest request, CallOptions options)

Encrypts data using portable cryptographic primitives. Most users should choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than their raw counterparts. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawEncryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
RawEncryptResponse

The response received from the server.

RawEncrypt(RawEncryptRequest, Metadata, DateTime?, CancellationToken)

public virtual RawEncryptResponse RawEncrypt(RawEncryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Encrypts data using portable cryptographic primitives. Most users should choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than their raw counterparts. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawEncryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
RawEncryptResponse

The response received from the server.

RawEncryptAsync(RawEncryptRequest, CallOptions)

public virtual AsyncUnaryCall<RawEncryptResponse> RawEncryptAsync(RawEncryptRequest request, CallOptions options)

Encrypts data using portable cryptographic primitives. Most users should choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than their raw counterparts. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawEncryptRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallRawEncryptResponse

The call object.

RawEncryptAsync(RawEncryptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<RawEncryptResponse> RawEncryptAsync(RawEncryptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Encrypts data using portable cryptographic primitives. Most users should choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than their raw counterparts. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT].

Parameters
NameDescription
requestRawEncryptRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallRawEncryptResponse

The call object.

RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest, CallOptions)

public virtual CryptoKeyVersion RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request, CallOptions options)

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.

Parameters
NameDescription
requestRestoreCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKeyVersion RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestRestoreCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

RestoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKeyVersion> RestoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest request, CallOptions options)

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.

Parameters
NameDescription
requestRestoreCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

RestoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKeyVersion> RestoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestRestoreCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

UpdateCryptoKey(UpdateCryptoKeyRequest, CallOptions)

public virtual CryptoKey UpdateCryptoKey(UpdateCryptoKeyRequest request, CallOptions options)

Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestUpdateCryptoKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

UpdateCryptoKey(UpdateCryptoKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKey UpdateCryptoKey(UpdateCryptoKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestUpdateCryptoKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

UpdateCryptoKeyAsync(UpdateCryptoKeyRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKey> UpdateCryptoKeyAsync(UpdateCryptoKeyRequest request, CallOptions options)

Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestUpdateCryptoKeyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

UpdateCryptoKeyAsync(UpdateCryptoKeyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKey> UpdateCryptoKeyAsync(UpdateCryptoKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].

Parameters
NameDescription
requestUpdateCryptoKeyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest, CallOptions)

public virtual CryptoKey UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request, CallOptions options)

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].

Parameters
NameDescription
requestUpdateCryptoKeyPrimaryVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKey UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestUpdateCryptoKeyPrimaryVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKey

The response received from the server.

UpdateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKey> UpdateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest request, CallOptions options)

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].

Parameters
NameDescription
requestUpdateCryptoKeyPrimaryVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

UpdateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKey> UpdateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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].

Parameters
NameDescription
requestUpdateCryptoKeyPrimaryVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKey

The call object.

UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest, CallOptions)

public virtual CryptoKeyVersion UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request, CallOptions options)

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.

Parameters
NameDescription
requestUpdateCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual CryptoKeyVersion UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestUpdateCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CryptoKeyVersion

The response received from the server.

UpdateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest, CallOptions)

public virtual AsyncUnaryCall<CryptoKeyVersion> UpdateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest request, CallOptions options)

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.

Parameters
NameDescription
requestUpdateCryptoKeyVersionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.

UpdateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CryptoKeyVersion> UpdateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
NameDescription
requestUpdateCryptoKeyVersionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCryptoKeyVersion

The call object.