public sealed class KeyManagementServiceClientImpl : KeyManagementServiceClient
KeyManagementService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Kms.V1Assembly
Google.Cloud.Kms.V1.dll
Remarks
Google Cloud Key Management Service
Manages cryptographic keys and operations using those keys. Implements a REST model with the following objects:
- [KeyRing][google.cloud.kms.v1.KeyRing]
- [CryptoKey][google.cloud.kms.v1.CryptoKey]
- [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
- [ImportJob][google.cloud.kms.v1.ImportJob]
If you are using manual gRPC libraries, see Using gRPC with Cloud KMS.
Constructors
KeyManagementServiceClientImpl(KeyManagementService.KeyManagementServiceClient, KeyManagementServiceSettings)
public KeyManagementServiceClientImpl(KeyManagementService.KeyManagementServiceClient grpcClient, KeyManagementServiceSettings settings)
Constructs a client wrapper for the KeyManagementService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | KeyManagementService.KeyManagementServiceClient The underlying gRPC client. |
settings | KeyManagementServiceSettings The base KeyManagementServiceSettings used within this client. |
Properties
GrpcClient
public override KeyManagementService.KeyManagementServiceClient GrpcClient { get; }
The underlying gRPC KeyManagementService client
Property Value | |
---|---|
Type | Description |
KeyManagementService.KeyManagementServiceClient |
Methods
AsymmetricDecrypt(AsymmetricDecryptRequest, CallSettings)
public override AsymmetricDecryptResponse AsymmetricDecrypt(AsymmetricDecryptRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | AsymmetricDecryptRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AsymmetricDecryptResponse | The RPC response. |
AsymmetricDecryptAsync(AsymmetricDecryptRequest, CallSettings)
public override Task<AsymmetricDecryptResponse> AsymmetricDecryptAsync(AsymmetricDecryptRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | AsymmetricDecryptRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AsymmetricDecryptResponse> | A Task containing the RPC response. |
AsymmetricSign(AsymmetricSignRequest, CallSettings)
public override AsymmetricSignResponse AsymmetricSign(AsymmetricSignRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | AsymmetricSignRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AsymmetricSignResponse | The RPC response. |
AsymmetricSignAsync(AsymmetricSignRequest, CallSettings)
public override Task<AsymmetricSignResponse> AsymmetricSignAsync(AsymmetricSignRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | AsymmetricSignRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AsymmetricSignResponse> | A Task containing the RPC response. |
CreateCryptoKey(CreateCryptoKeyRequest, CallSettings)
public override CryptoKey CreateCryptoKey(CreateCryptoKeyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateCryptoKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKey | The RPC response. |
CreateCryptoKeyAsync(CreateCryptoKeyRequest, CallSettings)
public override Task<CryptoKey> CreateCryptoKeyAsync(CreateCryptoKeyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateCryptoKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKey> | A Task containing the RPC response. |
CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest, CallSettings)
public override CryptoKeyVersion CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKeyVersion | The RPC response. |
CreateCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest, CallSettings)
public override Task<CryptoKeyVersion> CreateCryptoKeyVersionAsync(CreateCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKeyVersion> | A Task containing the RPC response. |
CreateImportJob(CreateImportJobRequest, CallSettings)
public override ImportJob CreateImportJob(CreateImportJobRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateImportJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ImportJob | The RPC response. |
CreateImportJobAsync(CreateImportJobRequest, CallSettings)
public override Task<ImportJob> CreateImportJobAsync(CreateImportJobRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateImportJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ImportJob> | A Task containing the RPC response. |
CreateKeyRing(CreateKeyRingRequest, CallSettings)
public override KeyRing CreateKeyRing(CreateKeyRingRequest request, CallSettings callSettings = null)
Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
request | CreateKeyRingRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KeyRing | The RPC response. |
CreateKeyRingAsync(CreateKeyRingRequest, CallSettings)
public override Task<KeyRing> CreateKeyRingAsync(CreateKeyRingRequest request, CallSettings callSettings = null)
Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
request | CreateKeyRingRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KeyRing> | A Task containing the RPC response. |
Decrypt(DecryptRequest, CallSettings)
public override DecryptResponse Decrypt(DecryptRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | DecryptRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DecryptResponse | The RPC response. |
DecryptAsync(DecryptRequest, CallSettings)
public override Task<DecryptResponse> DecryptAsync(DecryptRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | DecryptRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<DecryptResponse> | A Task containing the RPC response. |
DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest, CallSettings)
public override CryptoKeyVersion DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | DestroyCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKeyVersion | The RPC response. |
DestroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest, CallSettings)
public override Task<CryptoKeyVersion> DestroyCryptoKeyVersionAsync(DestroyCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | DestroyCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKeyVersion> | A Task containing the RPC response. |
Encrypt(EncryptRequest, CallSettings)
public override EncryptResponse Encrypt(EncryptRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | EncryptRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
EncryptResponse | The RPC response. |
EncryptAsync(EncryptRequest, CallSettings)
public override Task<EncryptResponse> EncryptAsync(EncryptRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | EncryptRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<EncryptResponse> | A Task containing the RPC response. |
GenerateRandomBytes(GenerateRandomBytesRequest, CallSettings)
public override GenerateRandomBytesResponse GenerateRandomBytes(GenerateRandomBytesRequest request, CallSettings callSettings = null)
Generate random bytes using the Cloud KMS randomness source in the provided location.
Parameters | |
---|---|
Name | Description |
request | GenerateRandomBytesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GenerateRandomBytesResponse | The RPC response. |
GenerateRandomBytesAsync(GenerateRandomBytesRequest, CallSettings)
public override Task<GenerateRandomBytesResponse> GenerateRandomBytesAsync(GenerateRandomBytesRequest request, CallSettings callSettings = null)
Generate random bytes using the Cloud KMS randomness source in the provided location.
Parameters | |
---|---|
Name | Description |
request | GenerateRandomBytesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<GenerateRandomBytesResponse> | A Task containing the RPC response. |
GetCryptoKey(GetCryptoKeyRequest, CallSettings)
public override CryptoKey GetCryptoKey(GetCryptoKeyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | GetCryptoKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKey | The RPC response. |
GetCryptoKeyAsync(GetCryptoKeyRequest, CallSettings)
public override Task<CryptoKey> GetCryptoKeyAsync(GetCryptoKeyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | GetCryptoKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKey> | A Task containing the RPC response. |
GetCryptoKeyVersion(GetCryptoKeyVersionRequest, CallSettings)
public override CryptoKeyVersion GetCryptoKeyVersion(GetCryptoKeyVersionRequest request, CallSettings callSettings = null)
Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
Parameters | |
---|---|
Name | Description |
request | GetCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKeyVersion | The RPC response. |
GetCryptoKeyVersionAsync(GetCryptoKeyVersionRequest, CallSettings)
public override Task<CryptoKeyVersion> GetCryptoKeyVersionAsync(GetCryptoKeyVersionRequest request, CallSettings callSettings = null)
Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
Parameters | |
---|---|
Name | Description |
request | GetCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKeyVersion> | A Task containing the RPC response. |
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public override Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public override Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
GetImportJob(GetImportJobRequest, CallSettings)
public override ImportJob GetImportJob(GetImportJobRequest request, CallSettings callSettings = null)
Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
Parameters | |
---|---|
Name | Description |
request | GetImportJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ImportJob | The RPC response. |
GetImportJobAsync(GetImportJobRequest, CallSettings)
public override Task<ImportJob> GetImportJobAsync(GetImportJobRequest request, CallSettings callSettings = null)
Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].
Parameters | |
---|---|
Name | Description |
request | GetImportJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ImportJob> | A Task containing the RPC response. |
GetKeyRing(GetKeyRingRequest, CallSettings)
public override KeyRing GetKeyRing(GetKeyRingRequest request, CallSettings callSettings = null)
Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
Parameters | |
---|---|
Name | Description |
request | GetKeyRingRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KeyRing | The RPC response. |
GetKeyRingAsync(GetKeyRingRequest, CallSettings)
public override Task<KeyRing> GetKeyRingAsync(GetKeyRingRequest request, CallSettings callSettings = null)
Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].
Parameters | |
---|---|
Name | Description |
request | GetKeyRingRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KeyRing> | A Task containing the RPC response. |
GetPublicKey(GetPublicKeyRequest, CallSettings)
public override PublicKey GetPublicKey(GetPublicKeyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | GetPublicKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PublicKey | The RPC response. |
GetPublicKeyAsync(GetPublicKeyRequest, CallSettings)
public override Task<PublicKey> GetPublicKeyAsync(GetPublicKeyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | GetPublicKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<PublicKey> | A Task containing the RPC response. |
ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest, CallSettings)
public override CryptoKeyVersion ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | ImportCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKeyVersion | The RPC response. |
ImportCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest, CallSettings)
public override Task<CryptoKeyVersion> ImportCryptoKeyVersionAsync(ImportCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | ImportCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKeyVersion> | A Task containing the RPC response. |
ListCryptoKeys(ListCryptoKeysRequest, CallSettings)
public override PagedEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeys(ListCryptoKeysRequest request, CallSettings callSettings = null)
Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
Parameters | |
---|---|
Name | Description |
request | ListCryptoKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListCryptoKeysResponse, CryptoKey> | A pageable sequence of CryptoKey resources. |
ListCryptoKeysAsync(ListCryptoKeysRequest, CallSettings)
public override PagedAsyncEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeysAsync(ListCryptoKeysRequest request, CallSettings callSettings = null)
Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].
Parameters | |
---|---|
Name | Description |
request | ListCryptoKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListCryptoKeysResponse, CryptoKey> | A pageable asynchronous sequence of CryptoKey resources. |
ListCryptoKeyVersions(ListCryptoKeyVersionsRequest, CallSettings)
public override PagedEnumerable<ListCryptoKeyVersionsResponse, CryptoKeyVersion> ListCryptoKeyVersions(ListCryptoKeyVersionsRequest request, CallSettings callSettings = null)
Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
Parameters | |
---|---|
Name | Description |
request | ListCryptoKeyVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListCryptoKeyVersionsResponse, CryptoKeyVersion> | A pageable sequence of CryptoKeyVersion resources. |
ListCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest, CallSettings)
public override PagedAsyncEnumerable<ListCryptoKeyVersionsResponse, CryptoKeyVersion> ListCryptoKeyVersionsAsync(ListCryptoKeyVersionsRequest request, CallSettings callSettings = null)
Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
Parameters | |
---|---|
Name | Description |
request | ListCryptoKeyVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListCryptoKeyVersionsResponse, CryptoKeyVersion> | A pageable asynchronous sequence of CryptoKeyVersion resources. |
ListImportJobs(ListImportJobsRequest, CallSettings)
public override PagedEnumerable<ListImportJobsResponse, ImportJob> ListImportJobs(ListImportJobsRequest request, CallSettings callSettings = null)
Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
Parameters | |
---|---|
Name | Description |
request | ListImportJobsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListImportJobsResponse, ImportJob> | A pageable sequence of ImportJob resources. |
ListImportJobsAsync(ListImportJobsRequest, CallSettings)
public override PagedAsyncEnumerable<ListImportJobsResponse, ImportJob> ListImportJobsAsync(ListImportJobsRequest request, CallSettings callSettings = null)
Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
Parameters | |
---|---|
Name | Description |
request | ListImportJobsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListImportJobsResponse, ImportJob> | A pageable asynchronous sequence of ImportJob resources. |
ListKeyRings(ListKeyRingsRequest, CallSettings)
public override PagedEnumerable<ListKeyRingsResponse, KeyRing> ListKeyRings(ListKeyRingsRequest request, CallSettings callSettings = null)
Lists [KeyRings][google.cloud.kms.v1.KeyRing].
Parameters | |
---|---|
Name | Description |
request | ListKeyRingsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListKeyRingsResponse, KeyRing> | A pageable sequence of KeyRing resources. |
ListKeyRingsAsync(ListKeyRingsRequest, CallSettings)
public override PagedAsyncEnumerable<ListKeyRingsResponse, KeyRing> ListKeyRingsAsync(ListKeyRingsRequest request, CallSettings callSettings = null)
Lists [KeyRings][google.cloud.kms.v1.KeyRing].
Parameters | |
---|---|
Name | Description |
request | ListKeyRingsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListKeyRingsResponse, KeyRing> | A pageable asynchronous sequence of KeyRing resources. |
MacSign(MacSignRequest, CallSettings)
public override MacSignResponse MacSign(MacSignRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | MacSignRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MacSignResponse | The RPC response. |
MacSignAsync(MacSignRequest, CallSettings)
public override Task<MacSignResponse> MacSignAsync(MacSignRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | MacSignRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MacSignResponse> | A Task containing the RPC response. |
MacVerify(MacVerifyRequest, CallSettings)
public override MacVerifyResponse MacVerify(MacVerifyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | MacVerifyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MacVerifyResponse | The RPC response. |
MacVerifyAsync(MacVerifyRequest, CallSettings)
public override Task<MacVerifyResponse> MacVerifyAsync(MacVerifyRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | MacVerifyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MacVerifyResponse> | A Task containing the RPC response. |
RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest, CallSettings)
public override CryptoKeyVersion RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | RestoreCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKeyVersion | The RPC response. |
RestoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest, CallSettings)
public override Task<CryptoKeyVersion> RestoreCryptoKeyVersionAsync(RestoreCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | RestoreCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKeyVersion> | A Task containing the RPC response. |
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public override Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public override Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public override TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)
public override Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
UpdateCryptoKey(UpdateCryptoKeyRequest, CallSettings)
public override CryptoKey UpdateCryptoKey(UpdateCryptoKeyRequest request, CallSettings callSettings = null)
Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
Parameters | |
---|---|
Name | Description |
request | UpdateCryptoKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKey | The RPC response. |
UpdateCryptoKeyAsync(UpdateCryptoKeyRequest, CallSettings)
public override Task<CryptoKey> UpdateCryptoKeyAsync(UpdateCryptoKeyRequest request, CallSettings callSettings = null)
Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].
Parameters | |
---|---|
Name | Description |
request | UpdateCryptoKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKey> | A Task containing the RPC response. |
UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest, CallSettings)
public override CryptoKey UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | UpdateCryptoKeyPrimaryVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKey | The RPC response. |
UpdateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest, CallSettings)
public override Task<CryptoKey> UpdateCryptoKeyPrimaryVersionAsync(UpdateCryptoKeyPrimaryVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | UpdateCryptoKeyPrimaryVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKey> | A Task containing the RPC response. |
UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest, CallSettings)
public override CryptoKeyVersion UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | UpdateCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CryptoKeyVersion | The RPC response. |
UpdateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest, CallSettings)
public override Task<CryptoKeyVersion> UpdateCryptoKeyVersionAsync(UpdateCryptoKeyVersionRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | UpdateCryptoKeyVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<CryptoKeyVersion> | A Task containing the RPC response. |