You can call this operation to list the tags of a CMK.

Request format

KeyId="string"

Request parameters

Parameter Type Required? Example Description
KeyId String Yes key id The GUID of the key.

Sample requests

https://kms.cn-hangzhou.aliyuncs.com/?Action=ListResourceTags
&KeyId=<key id>
&<Common request parameters>

Response parameters

Parameter Type Example Description
RequestId String 4162a6af-bc99-40b3-a552-89dcc8aaf7c8 The request ID.
TagKey String Project The tag key.
TagValue String Test The tag value.

Sample responses

JSON format

{
    "RequestId": "4162a6af-bc99-40b3-a552-89dcc8aaf7c8",
    "Tags": {
            "Tag": [
                {
                    "KeyId": "33caea95-c3e5-4b3e-a9c6-cec76e4eaf83",
                    "TagKey": "Project",
                    "TagValue": "Test"
                }
            ]
        }
}

XML format

<KMS>
        <RequestId>0f900dad-c747-4170-9962-1bfb6b31436b</RequestId> 
        <Tags>
            <Tag>
                <KeyId>33caea95-c3e5-4b3e-a9c6-cec76e4eaf83</KeyId> 
                <TagKey>Project</TagKey> 
                <TagValue>Test</TagValue> 
            </Tag> 
        </Tags> 
</KMS>