# Discovery Engine v1 API - Class CmekConfigServiceClient (1.13.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.13.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.12.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.11.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.10.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.9.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)
- [1.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient)

    public abstract class CmekConfigServiceClient

Reference documentation and code samples for the Discovery Engine v1 API class CmekConfigServiceClient.

CmekConfigService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> CmekConfigServiceClient

## Inherited Members

[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)

## Derived Types

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

## Namespace

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

## Assembly

Google.Cloud.DiscoveryEngine.V1.dll

## Remarks

Service for managing CMEK related tasks

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the CmekConfigService service, which is a host of "discoveryengine.googleapis.com"
and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default CmekConfigService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default CmekConfigService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### DeleteCmekConfigOperationsClient

    public virtual OperationsClient DeleteCmekConfigOperationsClient { get; }

The long-running operations client for `DeleteCmekConfig`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### GrpcClient

    public virtual CmekConfigService.CmekConfigServiceClient GrpcClient { get; }

The underlying gRPC CmekConfigService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigService.CmekConfigServiceClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

### UpdateCmekConfigOperationsClient

    public virtual OperationsClient UpdateCmekConfigOperationsClient { get; }

The long-running operations client for `UpdateCmekConfig`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

## Methods

### Create()

    public static CmekConfigServiceClient Create()

Synchronously creates a [CmekConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [CmekConfigServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient` | The created [CmekConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<CmekConfigServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [CmekConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [CmekConfigServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient` | The task representing the created [CmekConfigServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient). |

### DeleteCmekConfig(CmekConfigName, CallSettings)

    public virtual Operation<Empty, DeleteCmekConfigMetadata> DeleteCmekConfig(CmekConfigName name, CallSettings callSettings = null)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigName` Required. The resource name of the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\] to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    CmekConfigName name = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = cmekConfigServiceClient.DeleteCmekConfig(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = cmekConfigServiceClient.PollOnceDeleteCmekConfig(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfig(DeleteCmekConfigRequest, CallSettings)

    public virtual Operation<Empty, DeleteCmekConfigMetadata> DeleteCmekConfig(DeleteCmekConfigRequest request, CallSettings callSettings = null)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    DeleteCmekConfigRequest request = new DeleteCmekConfigRequest
    {
        CmekConfigName = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = cmekConfigServiceClient.DeleteCmekConfig(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = cmekConfigServiceClient.PollOnceDeleteCmekConfig(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfig(string, CallSettings)

    public virtual Operation<Empty, DeleteCmekConfigMetadata> DeleteCmekConfig(string name, CallSettings callSettings = null)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\] to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cmekConfig";
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = cmekConfigServiceClient.DeleteCmekConfig(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = cmekConfigServiceClient.PollOnceDeleteCmekConfig(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfigAsync(CmekConfigName, CallSettings)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> DeleteCmekConfigAsync(CmekConfigName name, CallSettings callSettings = null)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigName` Required. The resource name of the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\] to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmekConfigName name = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = await cmekConfigServiceClient.DeleteCmekConfigAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceDeleteCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfigAsync(CmekConfigName, CancellationToken)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> DeleteCmekConfigAsync(CmekConfigName name, CancellationToken cancellationToken)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigName` Required. The resource name of the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\] to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmekConfigName name = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = await cmekConfigServiceClient.DeleteCmekConfigAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceDeleteCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfigAsync(DeleteCmekConfigRequest, CallSettings)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> DeleteCmekConfigAsync(DeleteCmekConfigRequest request, CallSettings callSettings = null)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteCmekConfigRequest request = new DeleteCmekConfigRequest
    {
        CmekConfigName = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = await cmekConfigServiceClient.DeleteCmekConfigAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceDeleteCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfigAsync(DeleteCmekConfigRequest, CancellationToken)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> DeleteCmekConfigAsync(DeleteCmekConfigRequest request, CancellationToken cancellationToken)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteCmekConfigRequest request = new DeleteCmekConfigRequest
    {
        CmekConfigName = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = await cmekConfigServiceClient.DeleteCmekConfigAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceDeleteCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfigAsync(string, CallSettings)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> DeleteCmekConfigAsync(string name, CallSettings callSettings = null)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\] to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cmekConfig";
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = await cmekConfigServiceClient.DeleteCmekConfigAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceDeleteCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteCmekConfigAsync(string, CancellationToken)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> DeleteCmekConfigAsync(string name, CancellationToken cancellationToken)

De-provisions a CmekConfig.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\] to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cmekConfig";
    // Make the request
    Operation<Empty, DeleteCmekConfigMetadata> response = await cmekConfigServiceClient.DeleteCmekConfigAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, DeleteCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, DeleteCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceDeleteCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### GetCmekConfig(CmekConfigName, CallSettings)

    public virtual CmekConfig GetCmekConfig(CmekConfigName name, CallSettings callSettings = null)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigName` Required. Resource name of \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    CmekConfigName name = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    CmekConfig response = cmekConfigServiceClient.GetCmekConfig(name);

### GetCmekConfig(GetCmekConfigRequest, CallSettings)

    public virtual CmekConfig GetCmekConfig(GetCmekConfigRequest request, CallSettings callSettings = null)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GetCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    GetCmekConfigRequest request = new GetCmekConfigRequest
    {
        CmekConfigName = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    CmekConfig response = cmekConfigServiceClient.GetCmekConfig(request);

### GetCmekConfig(string, CallSettings)

    public virtual CmekConfig GetCmekConfig(string name, CallSettings callSettings = null)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Resource name of \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cmekConfig";
    // Make the request
    CmekConfig response = cmekConfigServiceClient.GetCmekConfig(name);

### GetCmekConfigAsync(CmekConfigName, CallSettings)

    public virtual Task<CmekConfig> GetCmekConfigAsync(CmekConfigName name, CallSettings callSettings = null)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigName` Required. Resource name of \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmekConfigName name = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    CmekConfig response = await cmekConfigServiceClient.GetCmekConfigAsync(name);

### GetCmekConfigAsync(CmekConfigName, CancellationToken)

    public virtual Task<CmekConfig> GetCmekConfigAsync(CmekConfigName name, CancellationToken cancellationToken)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigName` Required. Resource name of \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmekConfigName name = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    CmekConfig response = await cmekConfigServiceClient.GetCmekConfigAsync(name);

### GetCmekConfigAsync(GetCmekConfigRequest, CallSettings)

    public virtual Task<CmekConfig> GetCmekConfigAsync(GetCmekConfigRequest request, CallSettings callSettings = null)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GetCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetCmekConfigRequest request = new GetCmekConfigRequest
    {
        CmekConfigName = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    CmekConfig response = await cmekConfigServiceClient.GetCmekConfigAsync(request);

### GetCmekConfigAsync(GetCmekConfigRequest, CancellationToken)

    public virtual Task<CmekConfig> GetCmekConfigAsync(GetCmekConfigRequest request, CancellationToken cancellationToken)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GetCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetCmekConfigRequest request = new GetCmekConfigRequest
    {
        CmekConfigName = CmekConfigName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    CmekConfig response = await cmekConfigServiceClient.GetCmekConfigAsync(request);

### GetCmekConfigAsync(string, CallSettings)

    public virtual Task<CmekConfig> GetCmekConfigAsync(string name, CallSettings callSettings = null)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Resource name of \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cmekConfig";
    // Make the request
    CmekConfig response = await cmekConfigServiceClient.GetCmekConfigAsync(name);

### GetCmekConfigAsync(string, CancellationToken)

    public virtual Task<CmekConfig> GetCmekConfigAsync(string name, CancellationToken cancellationToken)

Gets the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Resource name of \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cmekConfig";
    // Make the request
    CmekConfig response = await cmekConfigServiceClient.GetCmekConfigAsync(name);

### ListCmekConfigs(ListCmekConfigsRequest, CallSettings)

    public virtual ListCmekConfigsResponse ListCmekConfigs(ListCmekConfigsRequest request, CallSettings callSettings = null)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    ListCmekConfigsRequest request = new ListCmekConfigsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    ListCmekConfigsResponse response = cmekConfigServiceClient.ListCmekConfigs(request);

### ListCmekConfigs(LocationName, CallSettings)

    public virtual ListCmekConfigsResponse ListCmekConfigs(LocationName parent, CallSettings callSettings = null)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.LocationName` Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    ListCmekConfigsResponse response = cmekConfigServiceClient.ListCmekConfigs(parent);

### ListCmekConfigs(string, CallSettings)

    public virtual ListCmekConfigsResponse ListCmekConfigs(string parent, CallSettings callSettings = null)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    ListCmekConfigsResponse response = cmekConfigServiceClient.ListCmekConfigs(parent);

### ListCmekConfigsAsync(ListCmekConfigsRequest, CallSettings)

    public virtual Task<ListCmekConfigsResponse> ListCmekConfigsAsync(ListCmekConfigsRequest request, CallSettings callSettings = null)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListCmekConfigsRequest request = new ListCmekConfigsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    ListCmekConfigsResponse response = await cmekConfigServiceClient.ListCmekConfigsAsync(request);

### ListCmekConfigsAsync(ListCmekConfigsRequest, CancellationToken)

    public virtual Task<ListCmekConfigsResponse> ListCmekConfigsAsync(ListCmekConfigsRequest request, CancellationToken cancellationToken)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListCmekConfigsRequest request = new ListCmekConfigsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    ListCmekConfigsResponse response = await cmekConfigServiceClient.ListCmekConfigsAsync(request);

### ListCmekConfigsAsync(LocationName, CallSettings)

    public virtual Task<ListCmekConfigsResponse> ListCmekConfigsAsync(LocationName parent, CallSettings callSettings = null)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.LocationName` Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    ListCmekConfigsResponse response = await cmekConfigServiceClient.ListCmekConfigsAsync(parent);

### ListCmekConfigsAsync(LocationName, CancellationToken)

    public virtual Task<ListCmekConfigsResponse> ListCmekConfigsAsync(LocationName parent, CancellationToken cancellationToken)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.LocationName` Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    ListCmekConfigsResponse response = await cmekConfigServiceClient.ListCmekConfigsAsync(parent);

### ListCmekConfigsAsync(string, CallSettings)

    public virtual Task<ListCmekConfigsResponse> ListCmekConfigsAsync(string parent, CallSettings callSettings = null)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    ListCmekConfigsResponse response = await cmekConfigServiceClient.ListCmekConfigsAsync(parent);

### ListCmekConfigsAsync(string, CancellationToken)

    public virtual Task<ListCmekConfigsResponse> ListCmekConfigsAsync(string parent, CancellationToken cancellationToken)

Lists all the \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s
with the project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list \[CmekConfig\]\[google.cloud.discoveryengine.v1.CmekConfig\]s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.ListCmekConfigsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    ListCmekConfigsResponse response = await cmekConfigServiceClient.ListCmekConfigsAsync(parent);

### PollOnceDeleteCmekConfig(string, CallSettings)

    public virtual Operation<Empty, DeleteCmekConfigMetadata> PollOnceDeleteCmekConfig(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `DeleteCmekConfig`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | The result of polling the operation. |

### PollOnceDeleteCmekConfigAsync(string, CallSettings)

    public virtual Task<Operation<Empty, DeleteCmekConfigMetadata>> PollOnceDeleteCmekConfigAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`DeleteCmekConfig`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DeleteCmekConfigMetadata` | A task representing the result of polling the operation. |

### PollOnceUpdateCmekConfig(string, CallSettings)

    public virtual Operation<CmekConfig, UpdateCmekConfigMetadata> PollOnceUpdateCmekConfig(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `UpdateCmekConfig`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | The result of polling the operation. |

### PollOnceUpdateCmekConfigAsync(string, CallSettings)

    public virtual Task<Operation<CmekConfig, UpdateCmekConfigMetadata>> PollOnceUpdateCmekConfigAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`UpdateCmekConfig`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_CmekConfigServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_CmekConfigServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_CmekConfigServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfigServiceClient#Google_Cloud_DiscoveryEngine_V1_CmekConfigServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateCmekConfig(CmekConfig, CallSettings)

    public virtual Operation<CmekConfig, UpdateCmekConfigMetadata> UpdateCmekConfig(CmekConfig config, CallSettings callSettings = null)

Provisions a CMEK key for use in a location of a customer's project.
This method will also conduct location validation on the provided
cmekConfig to make sure the key is valid and can be used in the
selected location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `config` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` Required. The CmekConfig resource. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    CmekConfig config = new CmekConfig();
    // Make the request
    Operation<CmekConfig, UpdateCmekConfigMetadata> response = cmekConfigServiceClient.UpdateCmekConfig(config);

    // Poll until the returned long-running operation is complete
    Operation<CmekConfig, UpdateCmekConfigMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    CmekConfig result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<CmekConfig, UpdateCmekConfigMetadata> retrievedResponse = cmekConfigServiceClient.PollOnceUpdateCmekConfig(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        CmekConfig retrievedResult = retrievedResponse.Result;
    }

### UpdateCmekConfig(UpdateCmekConfigRequest, CallSettings)

    public virtual Operation<CmekConfig, UpdateCmekConfigMetadata> UpdateCmekConfig(UpdateCmekConfigRequest request, CallSettings callSettings = null)

Provisions a CMEK key for use in a location of a customer's project.
This method will also conduct location validation on the provided
cmekConfig to make sure the key is valid and can be used in the
selected location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | The RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.Create();
    // Initialize request argument(s)
    UpdateCmekConfigRequest request = new UpdateCmekConfigRequest
    {
        Config = new CmekConfig(),
        SetDefault = false,
    };
    // Make the request
    Operation<CmekConfig, UpdateCmekConfigMetadata> response = cmekConfigServiceClient.UpdateCmekConfig(request);

    // Poll until the returned long-running operation is complete
    Operation<CmekConfig, UpdateCmekConfigMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    CmekConfig result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<CmekConfig, UpdateCmekConfigMetadata> retrievedResponse = cmekConfigServiceClient.PollOnceUpdateCmekConfig(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        CmekConfig retrievedResult = retrievedResponse.Result;
    }

### UpdateCmekConfigAsync(CmekConfig, CallSettings)

    public virtual Task<Operation<CmekConfig, UpdateCmekConfigMetadata>> UpdateCmekConfigAsync(CmekConfig config, CallSettings callSettings = null)

Provisions a CMEK key for use in a location of a customer's project.
This method will also conduct location validation on the provided
cmekConfig to make sure the key is valid and can be used in the
selected location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `config` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` Required. The CmekConfig resource. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmekConfig config = new CmekConfig();
    // Make the request
    Operation<CmekConfig, UpdateCmekConfigMetadata> response = await cmekConfigServiceClient.UpdateCmekConfigAsync(config);

    // Poll until the returned long-running operation is complete
    Operation<CmekConfig, UpdateCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    CmekConfig result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<CmekConfig, UpdateCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceUpdateCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        CmekConfig retrievedResult = retrievedResponse.Result;
    }

### UpdateCmekConfigAsync(CmekConfig, CancellationToken)

    public virtual Task<Operation<CmekConfig, UpdateCmekConfigMetadata>> UpdateCmekConfigAsync(CmekConfig config, CancellationToken cancellationToken)

Provisions a CMEK key for use in a location of a customer's project.
This method will also conduct location validation on the provided
cmekConfig to make sure the key is valid and can be used in the
selected location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `config` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfig` Required. The CmekConfig resource. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    CmekConfig config = new CmekConfig();
    // Make the request
    Operation<CmekConfig, UpdateCmekConfigMetadata> response = await cmekConfigServiceClient.UpdateCmekConfigAsync(config);

    // Poll until the returned long-running operation is complete
    Operation<CmekConfig, UpdateCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    CmekConfig result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<CmekConfig, UpdateCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceUpdateCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        CmekConfig retrievedResult = retrievedResponse.Result;
    }

### UpdateCmekConfigAsync(UpdateCmekConfigRequest, CallSettings)

    public virtual Task<Operation<CmekConfig, UpdateCmekConfigMetadata>> UpdateCmekConfigAsync(UpdateCmekConfigRequest request, CallSettings callSettings = null)

Provisions a CMEK key for use in a location of a customer's project.
This method will also conduct location validation on the provided
cmekConfig to make sure the key is valid and can be used in the
selected location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateCmekConfigRequest request = new UpdateCmekConfigRequest
    {
        Config = new CmekConfig(),
        SetDefault = false,
    };
    // Make the request
    Operation<CmekConfig, UpdateCmekConfigMetadata> response = await cmekConfigServiceClient.UpdateCmekConfigAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<CmekConfig, UpdateCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    CmekConfig result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<CmekConfig, UpdateCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceUpdateCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        CmekConfig retrievedResult = retrievedResponse.Result;
    }

### UpdateCmekConfigAsync(UpdateCmekConfigRequest, CancellationToken)

    public virtual Task<Operation<CmekConfig, UpdateCmekConfigMetadata>> UpdateCmekConfigAsync(UpdateCmekConfigRequest request, CancellationToken cancellationToken)

Provisions a CMEK key for use in a location of a customer's project.
This method will also conduct location validation on the provided
cmekConfig to make sure the key is valid and can be used in the
selected location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CmekConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UpdateCmekConfigMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    CmekConfigServiceClient cmekConfigServiceClient = await CmekConfigServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateCmekConfigRequest request = new UpdateCmekConfigRequest
    {
        Config = new CmekConfig(),
        SetDefault = false,
    };
    // Make the request
    Operation<CmekConfig, UpdateCmekConfigMetadata> response = await cmekConfigServiceClient.UpdateCmekConfigAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<CmekConfig, UpdateCmekConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    CmekConfig result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<CmekConfig, UpdateCmekConfigMetadata> retrievedResponse = await cmekConfigServiceClient.PollOnceUpdateCmekConfigAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        CmekConfig retrievedResult = retrievedResponse.Result;
    }