# KMS Inventory v1 API - Class KeyDashboardServiceClient (1.6.0)

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

- [1.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.5.0/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.4.0/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.3.0/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.2.0/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.1.0/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.0.0/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient)

    public abstract class KeyDashboardServiceClient

Reference documentation and code samples for the KMS Inventory v1 API class KeyDashboardServiceClient.

KeyDashboardService client wrapper, for convenient use.

## Inheritance

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

## 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

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

## Namespace

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

## Assembly

Google.Cloud.Kms.Inventory.V1.dll

## Remarks

Provides a cross-region view of all Cloud KMS keys in a given Cloud project.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the KeyDashboardService service, which is a host of "kmsinventory.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 KeyDashboardService 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 KeyDashboardService scopes are:

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

<br />

### GrpcClient

    public virtual KeyDashboardService.KeyDashboardServiceClient GrpcClient { get; }

The underlying gRPC KeyDashboardService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardService.KeyDashboardServiceClient` |   |

### 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` |   |

## Methods

### Create()

    public static KeyDashboardServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient` | The task representing the created [KeyDashboardServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient). |

### ListCryptoKeys(ProjectName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeys(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html` | A pageable sequence of [CryptoKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html) resources. |

**Example**

    // Create client
    KeyDashboardServiceClient keyDashboardServiceClient = KeyDashboardServiceClient.Create();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    // Make the request
    PagedEnumerable<ListCryptoKeysResponse, gckv::CryptoKey> response = keyDashboardServiceClient.ListCryptoKeys(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gckv::CryptoKey item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListCryptoKeysResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gckv::CryptoKey item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gckv::CryptoKey> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gckv::CryptoKey item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListCryptoKeys(ListCryptoKeysRequest, CallSettings)

    public virtual PagedEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeys(ListCryptoKeysRequest request, CallSettings callSettings = null)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html` | A pageable sequence of [CryptoKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html) resources. |

**Example**

    // Create client
    KeyDashboardServiceClient keyDashboardServiceClient = KeyDashboardServiceClient.Create();
    // Initialize request argument(s)
    ListCryptoKeysRequest request = new ListCryptoKeysRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    };
    // Make the request
    PagedEnumerable<ListCryptoKeysResponse, gckv::CryptoKey> response = keyDashboardServiceClient.ListCryptoKeys(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gckv::CryptoKey item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListCryptoKeysResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gckv::CryptoKey item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gckv::CryptoKey> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gckv::CryptoKey item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListCryptoKeys(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeys(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html` | A pageable sequence of [CryptoKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html) resources. |

**Example**

    // Create client
    KeyDashboardServiceClient keyDashboardServiceClient = KeyDashboardServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    // Make the request
    PagedEnumerable<ListCryptoKeysResponse, gckv::CryptoKey> response = keyDashboardServiceClient.ListCryptoKeys(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (gckv::CryptoKey item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListCryptoKeysResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gckv::CryptoKey item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gckv::CryptoKey> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gckv::CryptoKey item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListCryptoKeysAsync(ProjectName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeysAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html` | A pageable asynchronous sequence of [CryptoKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html) resources. |

**Example**

    // Create client
    KeyDashboardServiceClient keyDashboardServiceClient = await KeyDashboardServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    // Make the request
    PagedAsyncEnumerable<ListCryptoKeysResponse, gckv::CryptoKey> response = keyDashboardServiceClient.ListCryptoKeysAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gckv::CryptoKey item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListCryptoKeysResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gckv::CryptoKey item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gckv::CryptoKey> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gckv::CryptoKey item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListCryptoKeysAsync(ListCryptoKeysRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeysAsync(ListCryptoKeysRequest request, CallSettings callSettings = null)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html` | A pageable asynchronous sequence of [CryptoKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html) resources. |

**Example**

    // Create client
    KeyDashboardServiceClient keyDashboardServiceClient = await KeyDashboardServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListCryptoKeysRequest request = new ListCryptoKeysRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListCryptoKeysResponse, gckv::CryptoKey> response = keyDashboardServiceClient.ListCryptoKeysAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gckv::CryptoKey item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListCryptoKeysResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gckv::CryptoKey item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gckv::CryptoKey> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gckv::CryptoKey item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListCryptoKeysAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListCryptoKeysResponse, CryptoKey> ListCryptoKeysAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
Note that this data is sourced from snapshots, meaning it may not
completely reflect the actual state of key metadata at call time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.ListCryptoKeysResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html` | A pageable asynchronous sequence of [CryptoKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.V1/latest/Google.Cloud.Kms.V1.CryptoKey.html) resources. |

**Example**

    // Create client
    KeyDashboardServiceClient keyDashboardServiceClient = await KeyDashboardServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    // Make the request
    PagedAsyncEnumerable<ListCryptoKeysResponse, gckv::CryptoKey> response = keyDashboardServiceClient.ListCryptoKeysAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (gckv::CryptoKey item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListCryptoKeysResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (gckv::CryptoKey item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<gckv::CryptoKey> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (gckv::CryptoKey item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient#Google_Cloud_Kms_Inventory_V1_KeyDashboardServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient#Google_Cloud_Kms_Inventory_V1_KeyDashboardServiceClient_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.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient#Google_Cloud_Kms_Inventory_V1_KeyDashboardServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.KeyDashboardServiceClient#Google_Cloud_Kms_Inventory_V1_KeyDashboardServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.