# KMS Inventory v1 API - Class KeyTrackingService.KeyTrackingServiceBase (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.KeyTrackingService.KeyTrackingServiceBase)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.5.0/Google.Cloud.Kms.Inventory.V1.KeyTrackingService.KeyTrackingServiceBase)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.4.0/Google.Cloud.Kms.Inventory.V1.KeyTrackingService.KeyTrackingServiceBase)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.3.0/Google.Cloud.Kms.Inventory.V1.KeyTrackingService.KeyTrackingServiceBase)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.2.0/Google.Cloud.Kms.Inventory.V1.KeyTrackingService.KeyTrackingServiceBase)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.1.0/Google.Cloud.Kms.Inventory.V1.KeyTrackingService.KeyTrackingServiceBase)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/1.0.0/Google.Cloud.Kms.Inventory.V1.KeyTrackingService.KeyTrackingServiceBase)

    [BindServiceMethod(typeof(KeyTrackingService), "BindService")]
    public abstract class KeyTrackingService.KeyTrackingServiceBase

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

Base class for server-side implementations of KeyTrackingService

## Inheritance

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

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

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

## Methods

### GetProtectedResourcesSummary(GetProtectedResourcesSummaryRequest, ServerCallContext)

    public virtual Task<ProtectedResourcesSummary> GetProtectedResourcesSummary(GetProtectedResourcesSummaryRequest request, ServerCallContext context)

Returns aggregate information about the resources protected by the given
Cloud KMS \[CryptoKey\]\[google.cloud.kms.v1.CryptoKey\]. By default,
summary of resources within the same Cloud organization as the key will be
returned, which requires the KMS organization service account to be
configured(refer
<https://docs.cloud.google.com/kms/docs/view-key-usage#required-roles>).
If the KMS organization service account is not configured or key's project
is not part of an organization, set
\[fallback_scope\]\[google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest.fallback_scope\]
to `FALLBACK_SCOPE_PROJECT` to retrieve a summary of protected resources
within the key's project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.GetProtectedResourcesSummaryRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **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.ProtectedResourcesSummary` | The response to send back to the client (wrapped by a task). |

### SearchProtectedResources(SearchProtectedResourcesRequest, ServerCallContext)

    public virtual Task<SearchProtectedResourcesResponse> SearchProtectedResources(SearchProtectedResourcesRequest request, ServerCallContext context)

Returns metadata about the resources protected by the given Cloud KMS
\[CryptoKey\]\[google.cloud.kms.v1.CryptoKey\] in the given Cloud
organization/project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Kms.Inventory.V1/latest/Google.Cloud.Kms.Inventory.V1.SearchProtectedResourcesRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **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.SearchProtectedResourcesResponse` | The response to send back to the client (wrapped by a task). |