CmdID

CmdID / aws / aws kms

aws kms list-resource-tags

Returns all tags on the specified KMS key. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To get the tags on a KMS key

The following list-resource-tags example gets the tags for a KMS key. To add or replace resource tags on KMS keys, use the tag-resource command. The output shows that this KMS key has two resource tags, each of which has a key and value.

To specify the KMS key, use the key-id parameter. This example uses a key ID value, but you can use a key ID or key ARN in this command.

aws kms list-resource-tags --key-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111Identify
--key-idGets tags on the specified KMS key.
Its output
{
    "Tags": [
    {
        "TagKey": "Dept",
        "TagValue": "IT"
    },
    {
        "TagKey": "Purpose",
        "TagValue": "Test"
    }
    ],
    "Truncated": false
}

For more information about using tags in AWS KMS, see Tagging keys in the AWS Key Management Service Developer Guide.

Options

3 in the AWS CLI reference
--key-idGets tags on the specified KMS key.
--limitUse this parameter to specify the maximum number of items to return.
--markerUse this parameter in a subsequent request after you receive a response with truncated results.