TagResource - Amazon Key Management Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

TagResource

以下示例显示了对 TagResource 操作进行的添加标签键为 Department 且标签值为 IT 的标签的调用的 Amazon CloudTrail 日志条目。

有关轮换密钥时写入的 UntagResource CloudTrail 日志条目的示例,请参阅 UntagResource。有关标记 Amazon KMS keys 的更多信息,请参阅 标记密钥

{ "eventVersion": "1.05", "userIdentity": { "type": "IAMUser", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:user/Alice", "accountId": "111122223333", "accessKeyId": "EXAMPLE_KEY_ID", "userName": "Alice" }, "eventTime": "2020-07-01T21:19:25Z", "eventSource": "kms.amazonaws.com", "eventName": "TagResource", "awsRegion": "us-west-2", "sourceIPAddress": "192.0.2.0", "userAgent": "Amazon Internal", "requestParameters": { "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "tags": [ { "tagKey": "Department", "tagValue": "IT" } ] }, "responseElements": null, "requestID": "b942584a-f77d-4787-9feb-b9c5be6e746d", "eventID": "0a091b9b-0df5-4cf9-b667-6f2879532b8f", "readOnly": false, "resources": [ { "accountId": "111122223333", "type": "AWS::KMS::Key", "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" } ], "eventType": "AwsApiCall", "recipientAccountId": "111122223333" }