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

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

GetKeyPolicy

以下示例显示了一个 AWS CloudTrail 日志条目的GetKeyPolicyoperation. 有关查看 AWS KMS 客户主密钥 (CMK) 的密钥策略的信息,请参阅。查看密钥策略

{ "Records": [ { "eventVersion": "1.02", "userIdentity": { "type": "IAMUser", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:user/Alice", "accountId": "111122223333", "accessKeyId": "EXAMPLE_KEY_ID", "userName": "Alice" }, "eventTime": "2014-11-04T00:50:30Z", "eventSource": "kms.amazonaws.com", "eventName": "GetKeyPolicy", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "AWS Internal", "requestParameters": { "keyId": "1234abcd-12ab-34cd-56ef-1234567890ab", "policyName": "default" }, "responseElements": null, "requestID": "93746dd6-63bc-11e4-bc2b-4198b6150d5c", "eventID": "4aa7e4d5-d047-452a-a5a6-2cce282a7e82", "readOnly": true, "resources": [{ "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "accountId": "111122223333" }], "eventType": "AwsApiCall", "recipientAccountId": "111122223333" } ] }