| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.KMS.GetKeyPolicy
Description
Gets a key policy attached to the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.
Synopsis
- getKeyPolicy :: Text -> Text -> GetKeyPolicy
- data GetKeyPolicy
- gkpKeyId :: Lens' GetKeyPolicy Text
- gkpPolicyName :: Lens' GetKeyPolicy Text
- getKeyPolicyResponse :: Int -> GetKeyPolicyResponse
- data GetKeyPolicyResponse
- gkprsPolicy :: Lens' GetKeyPolicyResponse (Maybe Text)
- gkprsResponseStatus :: Lens' GetKeyPolicyResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> GetKeyPolicy |
Creates a value of GetKeyPolicy with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gkpKeyId- A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID:1234abcd-12ab-34cd-56ef-1234567890ab* Key ARN:arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890abTo get the key ID and key ARN for a CMK, useListKeysorDescribeKey.gkpPolicyName- Specifies the name of the key policy. The only valid name isdefault. To get the names of key policies, useListKeyPolicies.
data GetKeyPolicy Source #
See: getKeyPolicy smart constructor.
Instances
Request Lenses
gkpKeyId :: Lens' GetKeyPolicy Text Source #
A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey .
gkpPolicyName :: Lens' GetKeyPolicy Text Source #
Specifies the name of the key policy. The only valid name is default . To get the names of key policies, use ListKeyPolicies .
Destructuring the Response
Arguments
| :: Int | |
| -> GetKeyPolicyResponse |
Creates a value of GetKeyPolicyResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gkprsPolicy- A key policy document in JSON format.gkprsResponseStatus- -- | The response status code.
data GetKeyPolicyResponse Source #
See: getKeyPolicyResponse smart constructor.
Instances
Response Lenses
gkprsPolicy :: Lens' GetKeyPolicyResponse (Maybe Text) Source #
A key policy document in JSON format.
gkprsResponseStatus :: Lens' GetKeyPolicyResponse Int Source #
- - | The response status code.