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 |
Gets a list of all grants for the specified customer master key (CMK).
To perform this operation on a CMK in a different AWS account, specify the key ARN in the value of the KeyId parameter.
This operation returns paginated results.
Synopsis
- listGrants :: Text -> ListGrants
- data ListGrants
- lgMarker :: Lens' ListGrants (Maybe Text)
- lgLimit :: Lens' ListGrants (Maybe Natural)
- lgKeyId :: Lens' ListGrants Text
- listGrantsResponse :: ListGrantsResponse
- data ListGrantsResponse
- lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)
- lgGrants :: Lens' ListGrantsResponse [GrantListEntry]
- lgNextMarker :: Lens' ListGrantsResponse (Maybe Text)
Creating a Request
:: Text | |
-> ListGrants |
Creates a value of ListGrants
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lgMarker
- 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.lgLimit
- 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 100, inclusive. If you do not include a value, it defaults to 50.lgKeyId
- A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN. 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 ListGrants Source #
See: listGrants
smart constructor.
Instances
Request Lenses
lgMarker :: Lens' ListGrants (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.
lgLimit :: Lens' ListGrants (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 100, inclusive. If you do not include a value, it defaults to 50.
lgKeyId :: Lens' ListGrants Text Source #
A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN. 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
listGrantsResponse :: ListGrantsResponse Source #
Creates a value of ListGrantsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lgTruncated
- 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.lgGrants
- A list of grants.lgNextMarker
- WhenTruncated
is true, this element is present and contains the value to use for theMarker
parameter in a subsequent request.
data ListGrantsResponse Source #
See: listGrantsResponse
smart constructor.
Instances
Response Lenses
lgTruncated :: Lens' ListGrantsResponse (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.
lgGrants :: Lens' ListGrantsResponse [GrantListEntry] Source #
A list of grants.
lgNextMarker :: Lens' ListGrantsResponse (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.