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.ListKeyPolicies
Description
Gets the names of the key policies that are attached to a customer master key (CMK). This operation is designed to get policy names that you can use in a GetKeyPolicy
operation. However, the only valid policy name is default
. You cannot perform this operation on a CMK in a different AWS account.
This operation returns paginated results.
Synopsis
- listKeyPolicies :: Text -> ListKeyPolicies
- data ListKeyPolicies
- lkpMarker :: Lens' ListKeyPolicies (Maybe Text)
- lkpLimit :: Lens' ListKeyPolicies (Maybe Natural)
- lkpKeyId :: Lens' ListKeyPolicies Text
- listKeyPoliciesResponse :: Int -> ListKeyPoliciesResponse
- data ListKeyPoliciesResponse
- lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text]
- lkprsTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)
- lkprsNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text)
- lkprsResponseStatus :: Lens' ListKeyPoliciesResponse Int
Creating a Request
Arguments
:: Text | |
-> ListKeyPolicies |
Creates a value of ListKeyPolicies
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lkpMarker
- Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value ofNextMarker
from the truncated response you just received.lkpLimit
- Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer. This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100. Currently only 1 policy can be attached to a key.lkpKeyId
- 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, useListKeys
orDescribeKey
.
data ListKeyPolicies Source #
See: listKeyPolicies
smart constructor.
Instances
Request Lenses
lkpMarker :: Lens' ListKeyPolicies (Maybe Text) Source #
Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker
from the truncated response you just received.
lkpLimit :: Lens' ListKeyPolicies (Maybe Natural) Source #
Use this parameter to specify the maximum number of items to return. When this value is present, AWS KMS does not return more than the specified number of items, but it might return fewer. This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100. Currently only 1 policy can be attached to a key.
lkpKeyId :: Lens' ListKeyPolicies 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
.
Destructuring the Response
listKeyPoliciesResponse Source #
Arguments
:: Int | |
-> ListKeyPoliciesResponse |
Creates a value of ListKeyPoliciesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lkprsPolicyNames
- A list of key policy names. Currently, there is only one key policy per CMK and it is always nameddefault
.lkprsTruncated
- A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of theNextMarker
element in this response to theMarker
parameter in a subsequent request.lkprsNextMarker
- WhenTruncated
is true, this element is present and contains the value to use for theMarker
parameter in a subsequent request.lkprsResponseStatus
- -- | The response status code.
data ListKeyPoliciesResponse Source #
See: listKeyPoliciesResponse
smart constructor.
Instances
Response Lenses
lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text] Source #
A list of key policy names. Currently, there is only one key policy per CMK and it is always named default
.
lkprsTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool) Source #
A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker
element in this response to the Marker
parameter in a subsequent request.
lkprsNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text) Source #
When Truncated
is true, this element is present and contains the value to use for the Marker
parameter in a subsequent request.
lkprsResponseStatus :: Lens' ListKeyPoliciesResponse Int Source #
- - | The response status code.