Skip to main content

crypto_keys_protected_resources_summary

Creates, updates, deletes, gets or lists a crypto_keys_protected_resources_summary resource.

Overview

Namecrypto_keys_protected_resources_summary
TypeResource
Idgoogle.kmsinventory.crypto_keys_protected_resources_summary

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe full name of the ProtectedResourcesSummary resource. Example: projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary
cloudProductsobjectThe number of resources protected by the key grouped by Cloud product.
locationsobjectThe number of resources protected by the key grouped by region.
projectCountinteger (int32)The number of distinct Cloud projects in the same Cloud organization as the key that have resources protected by the key.
resourceCountstring (int64)The total number of protected resources in the same Cloud organization as the key.
resourceTypesobjectThe number of resources protected by the key grouped by resource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_protected_resources_summaryselectprojectsId, locationsId, keyRingsId, cryptoKeysIdReturns aggregate information about the resources protected by the given Cloud KMS CryptoKey. Only resources within the same Cloud organization as the key will be returned. The project that holds the key must be part of an organization in order for this call to succeed.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cryptoKeysIdstring
keyRingsIdstring
locationsIdstring
projectsIdstring

SELECT examples

Returns aggregate information about the resources protected by the given Cloud KMS CryptoKey. Only resources within the same Cloud organization as the key will be returned. The project that holds the key must be part of an organization in order for this call to succeed.

SELECT
name,
cloudProducts,
locations,
projectCount,
resourceCount,
resourceTypes
FROM google.kmsinventory.crypto_keys_protected_resources_summary
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND keyRingsId = '{{ keyRingsId }}' -- required
AND cryptoKeysId = '{{ cryptoKeysId }}' -- required;