Service Client: Google::Cloud::Kms::Inventory::V1::KeyTrackingService::KeyTrackingServiceClient

Client stub representing the remote KeyTrackingService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to kms.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Kms::Inventory::V1::KeyTrackingService - Compiled Protocol Buffers messages for google/cloud/kms/inventory/v1/key_tracking_service.proto

SYNOPSIS

use Google::Cloud::Kms::Inventory::V1::KeyTrackingService;

my $msg = Google::Cloud::Kms::Inventory::V1::KeyTrackingService::GetProtectedResourcesSummaryRequest->new({
    name => $name,
    fallback_scope => $fallback_scope,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Kms::Inventory::V1::KeyTrackingService::GetProtectedResourcesSummaryRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/kms/inventory/v1/key_tracking_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Kms::Inventory::V1::KeyTrackingService::GetProtectedResourcesSummaryRequest

Request message for [KeyTrackingService.GetProtectedResourcesSummary][google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].

  • $msg->fallback_scope() / $msg->fallback_scope($value)

    Type: Enum (Google::Cloud::Kms::Inventory::V1::FallbackScope)

    Optional. The scope to use if the kms organization service account is not configured.

Google::Cloud::Kms::Inventory::V1::KeyTrackingService::ProtectedResourcesSummary

Aggregate information about the resources protected by a Cloud KMS key in the same Cloud organization/project as the key.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Kms::Inventory::V1::KeyTrackingService::SearchProtectedResourcesRequest

Request message for [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources].

Inherits from Protobuf::Message.

Accessors

  • $msg->scope() / $msg->scope($value)

    Type: String

    Required. A scope can be an organization or a project. Resources protected by the crypto key in provided scope will be returned.

    The following values are allowed:

    * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")

  • $msg->crypto_key() / $msg->crypto_key($value)

    Type: String

    Required. The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey].

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of resources to return. The service may return fewer than this value. If unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 will be coerced to 500.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    A page token, received from a previous [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources] must match the call that provided the page token.

  • $msg->resource_types() / $msg->resource_types($value)

    Type: String

    Optional. A list of resource types that this request searches for. If empty, it will search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource-types).

    Regular expressions are also supported. For example:

    * `compute.googleapis.com.*` snapshots resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`.

    See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will be returned.

Google::Cloud::Kms::Inventory::V1::KeyTrackingService::SearchProtectedResourcesResponse

Response message for [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources].

Inherits from Protobuf::Message.

Accessors

  • $msg->protected_resources() / $msg->protected_resources($value)

    Type: Message (Google::Cloud::Kms::Inventory::V1::KeyTrackingService::ProtectedResource)

    Protected resources for this page.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.

Google::Cloud::Kms::Inventory::V1::KeyTrackingService::ProtectedResource

Metadata about a resource protected by a Cloud KMS key.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The full resource name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.

  • $msg->project() / $msg->project($value)

    Type: String

    Format: `projects/{PROJECT_NUMBER}`.

  • $msg->project_id() / $msg->project_id($value)

    Type: String

    The ID of the project that owns the resource.

  • $msg->cloud_product() / $msg->cloud_product($value)

    Type: String

    The Cloud product that owns the resource. Example: `compute`

  • $msg->resource_type() / $msg->resource_type($value)

    Type: String

    Example: `compute.googleapis.com/Disk`

  • $msg->location() / $msg->location($value)

    Type: String

    Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`.

  • $msg->labels() / $msg->labels($value)

    Type: Message (Google::Cloud::Kms::Inventory::V1::KeyTrackingService::ProtectedResource::LabelsEntry)

    A key-value pair of the resource's labels (v1) to their values.

  • $msg->crypto_key_version() / $msg->crypto_key_version($value)

    Type: String

    The name of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key version data to Asset Inventory. If there are multiple key versions protecting the resource, then this is same value as the first element of crypto_key_versions.

  • $msg->crypto_key_versions() / $msg->crypto_key_versions($value)

    Type: String

    The names of the Cloud KMS [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) used to protect this resource via CMEK. This field is empty if the Google Cloud product owning the resource does not provide key versions data to Asset Inventory. The first element of this field is stored in crypto_key_version.

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The time at which this resource was created. The granularity is in seconds. Timestamp.nanos will always be 0.

Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Warning

A warning message that indicates potential problems with the response data.

Inherits from Protobuf::Message.

Accessors

  • $msg->warning_code() / $msg->warning_code($value)

    Type: Enum (Google::Cloud::Kms::Inventory::V1::Warning::WarningCode)

    The specific warning code for the displayed message.

  • $msg->display_message() / $msg->display_message($value)

    Type: String

    The literal message providing context and details about the warnings.

Enum: Warning::WarningCode

  • WARNING_CODE_UNSPECIFIED => 0

  • INSUFFICIENT_PERMISSIONS_PARTIAL_DATA => 1

  • RESOURCE_LIMIT_EXCEEDED_PARTIAL_DATA => 2

  • ORG_LESS_PROJECT_PARTIAL_DATA => 3

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Kms::Inventory::V1::KeyTrackingService::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.