3.27.0 (latest) 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0

    public class Autokey.AutokeyClient : ClientBase<Autokey.AutokeyClient>

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

Client for Autokey

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html)[Autokey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.Autokey)[AutokeyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.Autokey.AutokeyClient) \> Autokey.AutokeyClient

## Inherited Members

[ClientBase\<Autokey.AutokeyClient\>.WithHost(string)](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Kms.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1)

## Assembly

Google.Cloud.Kms.V1.dll

## Constructors

### AutokeyClient()

    protected AutokeyClient()

Protected parameterless constructor to allow creation of test doubles.

### AutokeyClient(CallInvoker)

    public AutokeyClient(CallInvoker callInvoker)

Creates a new client for Autokey that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker.html` The callInvoker to use to make remote calls. |

### AutokeyClient(ChannelBase)

    public AutokeyClient(ChannelBase channel)

Creates a new client for Autokey

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelBase.html` The channel to use to make remote calls. |

### AutokeyClient(ClientBaseConfiguration)

    protected AutokeyClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` The client configuration. |

## Methods

### CreateIAMPolicyClient()

    public virtual IAMPolicy.IAMPolicyClient CreateIAMPolicyClient()

Creates a new instance of [IAMPolicy.IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicy.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyClient.html` | A new [IAMPolicy.IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyClient.html) for the same target as this client. |

### CreateKeyHandle(CreateKeyHandleRequest, CallOptions)

    public virtual Operation CreateKeyHandle(CreateKeyHandleRequest request, CallOptions options)

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\]\[google.longrunning.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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CreateKeyHandleRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### CreateKeyHandle(CreateKeyHandleRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation CreateKeyHandle(CreateKeyHandleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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\]\[google.longrunning.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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CreateKeyHandleRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### CreateKeyHandleAsync(CreateKeyHandleRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> CreateKeyHandleAsync(CreateKeyHandleRequest request, CallOptions options)

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\]\[google.longrunning.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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CreateKeyHandleRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### CreateKeyHandleAsync(CreateKeyHandleRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> CreateKeyHandleAsync(CreateKeyHandleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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\]\[google.longrunning.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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CreateKeyHandleRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### CreateLocationsClient()

    public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html` | A new [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) for the same target as this client. |

### CreateOperationsClient()

    public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of [Operations.OperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.OperationsClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.OperationsClient.html` | A new Operations client for the same target as this client. |

### GetKeyHandle(GetKeyHandleRequest, CallOptions)

    public virtual KeyHandle GetKeyHandle(GetKeyHandleRequest request, CallOptions options)

Returns the \[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.GetKeyHandleRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle` | The response received from the server. |

### GetKeyHandle(GetKeyHandleRequest, Metadata, DateTime?, CancellationToken)

    public virtual KeyHandle GetKeyHandle(GetKeyHandleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the \[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.GetKeyHandleRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle` | The response received from the server. |

### GetKeyHandleAsync(GetKeyHandleRequest, CallOptions)

    public virtual AsyncUnaryCall<KeyHandle> GetKeyHandleAsync(GetKeyHandleRequest request, CallOptions options)

Returns the \[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.GetKeyHandleRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle` | The call object. |

### GetKeyHandleAsync(GetKeyHandleRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<KeyHandle> GetKeyHandleAsync(GetKeyHandleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the \[KeyHandle\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.GetKeyHandleRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.KeyHandle` | The call object. |

### ListKeyHandles(ListKeyHandlesRequest, CallOptions)

    public virtual ListKeyHandlesResponse ListKeyHandles(ListKeyHandlesRequest request, CallOptions options)

Lists \[KeyHandles\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesResponse` | The response received from the server. |

### ListKeyHandles(ListKeyHandlesRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListKeyHandlesResponse ListKeyHandles(ListKeyHandlesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists \[KeyHandles\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesResponse` | The response received from the server. |

### ListKeyHandlesAsync(ListKeyHandlesRequest, CallOptions)

    public virtual AsyncUnaryCall<ListKeyHandlesResponse> ListKeyHandlesAsync(ListKeyHandlesRequest request, CallOptions options)

Lists \[KeyHandles\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesResponse` | The call object. |

### ListKeyHandlesAsync(ListKeyHandlesRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListKeyHandlesResponse> ListKeyHandlesAsync(ListKeyHandlesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists \[KeyHandles\]\[google.cloud.kms.v1.KeyHandle\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.ListKeyHandlesResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override Autokey.AutokeyClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.Autokeyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.Autokey.AutokeyClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.Kms.V1.Autokey.AutokeyClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)