aws.kms.list_grants
Example SQL Queries
SELECT * FROMaws.kms.list_grantsWHERE"key_id" = 'VALUE';Description
Gets a list of all grants for the specified KMS key.
You must specify the KMS key in all requests. You can filter the grant list by grant ID or grantee principal.
For detailed information about grants, including grant terminology, see Grants in KMS in the Key Management Service Developer Guide . For examples of working with grants in several programming languages, see Programming grants.
The GranteePrincipal field in the ListGrants response usually contains the user or role designated as the grantee principal in the grant. However, when the grantee principal in the grant is an Amazon Web Services service, the GranteePrincipal field contains the service principal, which might represent several different grantee principals.
Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key ARN in the value of the KeyId parameter.
Required permissions: kms:ListGrants (key policy)
Related operations:
Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
Table Definition
| Column Name | Column Data Type |
|---|---|
| key_id Required Input Column The unique identifier for the KMS key to which the grant applies. | VARCHAR |
| grant_id Input Column The unique identifier for the grant. | VARCHAR |
| grantee_principal Input Column The identity that gets the permissions in the grant. The GranteePrincipal field in the ListGrants response usually contains the user or role designated as the grantee principal in the grant. However, when the grantee principal in the grant is an Amazon Web Services service, the GranteePrincipal field contains the service principal, which might represent several different grantee principals. | VARCHAR |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| _aws_region Input Column The AWS region to use. | VARCHAR |
| constraints A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows. | STRUCT( |
Show child fields
| |
| creation_date The date and time when the grant was created. | TIMESTAMP_S |
| issuing_account The Amazon Web Services account under which the grant was issued. | VARCHAR |
| name The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null. | VARCHAR |
| operations The list of operations permitted by the grant. | VARCHAR[] |
Show child fields
| |
| retiring_principal The principal that can retire the grant. | VARCHAR |