crypto_keys_protected_resources_summary
Creates, updates, deletes, gets or lists a crypto_keys_protected_resources_summary resource.
Overview
| Name | crypto_keys_protected_resources_summary |
| Type | Resource |
| Id | google.kmsinventory.crypto_keys_protected_resources_summary |
Fields
The following fields are returned by SELECT queries:
- get_protected_resources_summary
| Name | Datatype | Description |
|---|---|---|
name | string | The full name of the ProtectedResourcesSummary resource. Example: projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary |
cloudProducts | object | The number of resources protected by the key grouped by Cloud product. |
locations | object | The number of resources protected by the key grouped by region. |
projectCount | integer (int32) | The number of distinct Cloud projects in the same Cloud organization as the key that have resources protected by the key. |
resourceCount | string (int64) | The total number of protected resources in the same Cloud organization as the key. |
resourceTypes | object | The number of resources protected by the key grouped by resource type. |
warnings | array | Warning messages for the state of response ProtectedResourcesSummary For example, if the organization service account is not configured, INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_protected_resources_summary | select | projectsId, locationsId, keyRingsId, cryptoKeysId | fallbackScope | Returns aggregate information about the resources protected by the given Cloud KMS 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 to FALLBACK_SCOPE_PROJECT to retrieve a summary of protected resources within the key's project. |
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.
| Name | Datatype | Description |
|---|---|---|
cryptoKeysId | string | |
keyRingsId | string | |
locationsId | string | |
projectsId | string | |
fallbackScope | string |
SELECT examples
- get_protected_resources_summary
Returns aggregate information about the resources protected by the given Cloud KMS 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 to FALLBACK_SCOPE_PROJECT to retrieve a summary of protected resources within the key's project.
SELECT
name,
cloudProducts,
locations,
projectCount,
resourceCount,
resourceTypes,
warnings
FROM google.kmsinventory.crypto_keys_protected_resources_summary
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND keyRingsId = '{{ keyRingsId }}' -- required
AND cryptoKeysId = '{{ cryptoKeysId }}' -- required
AND fallbackScope = '{{ fallbackScope }}'
;