Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Gets a list of all KMS keys in the caller's Amazon Web Services account and Region.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:ListKeys (IAM policy)
Related operations:
- CreateKey
- DescribeKey
- ListAliases
- ListResourceTags
This operation returns paginated results.
Synopsis
- data ListKeys = ListKeys' {}
- newListKeys :: ListKeys
- listKeys_limit :: Lens' ListKeys (Maybe Natural)
- listKeys_marker :: Lens' ListKeys (Maybe Text)
- data ListKeysResponse = ListKeysResponse' {
- keys :: Maybe [KeyListEntry]
- nextMarker :: Maybe Text
- truncated :: Maybe Bool
- httpStatus :: Int
- newListKeysResponse :: Int -> ListKeysResponse
- listKeysResponse_keys :: Lens' ListKeysResponse (Maybe [KeyListEntry])
- listKeysResponse_nextMarker :: Lens' ListKeysResponse (Maybe Text)
- listKeysResponse_truncated :: Lens' ListKeysResponse (Maybe Bool)
- listKeysResponse_httpStatus :: Lens' ListKeysResponse Int
Creating a Request
See: newListKeys
smart constructor.
ListKeys' | |
|
Instances
newListKeys :: ListKeys Source #
Create a value of ListKeys
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:limit:ListKeys'
, listKeys_limit
- Use this parameter to specify the maximum number of items to return.
When this value is present, 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.
$sel:marker:ListKeys'
, listKeys_marker
- 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.
Request Lenses
listKeys_limit :: Lens' ListKeys (Maybe Natural) Source #
Use this parameter to specify the maximum number of items to return. When this value is present, 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.
listKeys_marker :: Lens' ListKeys (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.
Destructuring the Response
data ListKeysResponse Source #
See: newListKeysResponse
smart constructor.
ListKeysResponse' | |
|
Instances
Create a value of ListKeysResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:keys:ListKeysResponse'
, listKeysResponse_keys
- A list of KMS keys.
ListKeysResponse
, listKeysResponse_nextMarker
- When Truncated
is true, this element is present and contains the value
to use for the Marker
parameter in a subsequent request.
ListKeysResponse
, listKeysResponse_truncated
- 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 thisresponse to the
Marker
parameter in a subsequent request.
$sel:httpStatus:ListKeysResponse'
, listKeysResponse_httpStatus
- The response's http status code.
Response Lenses
listKeysResponse_keys :: Lens' ListKeysResponse (Maybe [KeyListEntry]) Source #
A list of KMS keys.
listKeysResponse_nextMarker :: Lens' ListKeysResponse (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.
listKeysResponse_truncated :: Lens' ListKeysResponse (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 thisresponse to the
Marker
parameter in a subsequent request.
listKeysResponse_httpStatus :: Lens' ListKeysResponse Int Source #
The response's http status code.