public sealed class AutokeyClientImpl : AutokeyClient
Reference documentation and code samples for the Google Cloud Key Management Service v1 API class AutokeyClientImpl.
Autokey client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Kms.V1Assembly
Google.Cloud.Kms.V1.dll
Remarks
Provides interfaces for using Cloud KMS Autokey to provision new [CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer Managed Encryption Key (CMEK) use, on-demand. To support certain client tooling, this feature is modeled around a [KeyHandle][google.cloud.kms.v1.KeyHandle] resource: creating a [KeyHandle][google.cloud.kms.v1.KeyHandle] in a resource project and given location triggers Cloud KMS Autokey to provision a [CryptoKey][google.cloud.kms.v1.CryptoKey] in the configured key project and the same location.
Prior to use in a given resource project, [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.UpdateAutokeyConfig] should have been called on an ancestor folder, setting the key project where Cloud KMS Autokey should create new [CryptoKeys][google.cloud.kms.v1.CryptoKey]. See documentation for additional prerequisites. To check what key project, if any, is currently configured on a resource project's ancestor folder, see [ShowEffectiveAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.ShowEffectiveAutokeyConfig].
Constructors
AutokeyClientImpl(AutokeyClient, AutokeySettings, ILogger)
public AutokeyClientImpl(Autokey.AutokeyClient grpcClient, AutokeySettings settings, ILogger logger)
Constructs a client wrapper for the Autokey service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient |
AutokeyAutokeyClient The underlying gRPC client. |
settings |
AutokeySettings The base AutokeySettings used within this client. |
logger |
ILogger Optional ILogger to use within this client. |
Properties
CreateKeyHandleOperationsClient
public override OperationsClient CreateKeyHandleOperationsClient { get; }
The long-running operations client for CreateKeyHandle
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override Autokey.AutokeyClient GrpcClient { get; }
The underlying gRPC Autokey client
Property Value | |
---|---|
Type | Description |
AutokeyAutokeyClient |
IAMPolicyClient
public override IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public override LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
Methods
CreateKeyHandle(CreateKeyHandleRequest, CallSettings)
public override Operation<KeyHandle, CreateKeyHandleMetadata> CreateKeyHandle(CreateKeyHandleRequest request, CallSettings callSettings = null)
Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK use with the given resource type in the configured key project and the same location. [GetOperation][Operations.GetOperation] should be used to resolve the resulting long-running operation and get the resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and [CryptoKey][google.cloud.kms.v1.CryptoKey].
Parameters | |
---|---|
Name | Description |
request |
CreateKeyHandleRequest 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 |
OperationKeyHandleCreateKeyHandleMetadata |
The RPC response. |
CreateKeyHandleAsync(CreateKeyHandleRequest, CallSettings)
public override Task<Operation<KeyHandle, CreateKeyHandleMetadata>> CreateKeyHandleAsync(CreateKeyHandleRequest request, CallSettings callSettings = null)
Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK use with the given resource type in the configured key project and the same location. [GetOperation][Operations.GetOperation] should be used to resolve the resulting long-running operation and get the resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and [CryptoKey][google.cloud.kms.v1.CryptoKey].
Parameters | |
---|---|
Name | Description |
request |
CreateKeyHandleRequest 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 |
TaskOperationKeyHandleCreateKeyHandleMetadata |
A Task containing the RPC response. |
GetKeyHandle(GetKeyHandleRequest, CallSettings)
public override KeyHandle GetKeyHandle(GetKeyHandleRequest request, CallSettings callSettings = null)
Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle].
Parameters | |
---|---|
Name | Description |
request |
GetKeyHandleRequest 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 |
KeyHandle |
The RPC response. |
GetKeyHandleAsync(GetKeyHandleRequest, CallSettings)
public override Task<KeyHandle> GetKeyHandleAsync(GetKeyHandleRequest request, CallSettings callSettings = null)
Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle].
Parameters | |
---|---|
Name | Description |
request |
GetKeyHandleRequest 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 |
TaskKeyHandle |
A Task containing the RPC response. |
ListKeyHandles(ListKeyHandlesRequest, CallSettings)
public override PagedEnumerable<ListKeyHandlesResponse, KeyHandle> ListKeyHandles(ListKeyHandlesRequest request, CallSettings callSettings = null)
Lists [KeyHandles][google.cloud.kms.v1.KeyHandle].
Parameters | |
---|---|
Name | Description |
request |
ListKeyHandlesRequest 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 |
PagedEnumerableListKeyHandlesResponseKeyHandle |
A pageable sequence of KeyHandle resources. |
ListKeyHandlesAsync(ListKeyHandlesRequest, CallSettings)
public override PagedAsyncEnumerable<ListKeyHandlesResponse, KeyHandle> ListKeyHandlesAsync(ListKeyHandlesRequest request, CallSettings callSettings = null)
Lists [KeyHandles][google.cloud.kms.v1.KeyHandle].
Parameters | |
---|---|
Name | Description |
request |
ListKeyHandlesRequest 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 |
PagedAsyncEnumerableListKeyHandlesResponseKeyHandle |
A pageable asynchronous sequence of KeyHandle resources. |