Copyright | (c) 2013-2021 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 |
Returns all tags on the specified KMS key.
For general information about tags, including the format and syntax, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference. For information about using tags in KMS, see Tagging keys.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:ListResourceTags (key policy)
Related operations:
- CreateKey
- ReplicateKey
- TagResource
- UntagResource
Synopsis
- data ListResourceTags = ListResourceTags' {}
- newListResourceTags :: Text -> ListResourceTags
- listResourceTags_marker :: Lens' ListResourceTags (Maybe Text)
- listResourceTags_limit :: Lens' ListResourceTags (Maybe Natural)
- listResourceTags_keyId :: Lens' ListResourceTags Text
- data ListResourceTagsResponse = ListResourceTagsResponse' {}
- newListResourceTagsResponse :: Int -> ListResourceTagsResponse
- listResourceTagsResponse_truncated :: Lens' ListResourceTagsResponse (Maybe Bool)
- listResourceTagsResponse_nextMarker :: Lens' ListResourceTagsResponse (Maybe Text)
- listResourceTagsResponse_tags :: Lens' ListResourceTagsResponse (Maybe [Tag])
- listResourceTagsResponse_httpStatus :: Lens' ListResourceTagsResponse Int
Creating a Request
data ListResourceTags Source #
See: newListResourceTags
smart constructor.
ListResourceTags' | |
|
Instances
Create a value of ListResourceTags
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:marker:ListResourceTags'
, listResourceTags_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.
Do not attempt to construct this value. Use only the value of
NextMarker
from the truncated response you just received.
$sel:limit:ListResourceTags'
, listResourceTags_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 50, inclusive. If you do not include a value, it defaults to 50.
$sel:keyId:ListResourceTags'
, listResourceTags_keyId
- Gets tags on the specified KMS key.
Specify the key ID or key ARN of the KMS key.
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 KMS key, use ListKeys or DescribeKey.
Request Lenses
listResourceTags_marker :: Lens' ListResourceTags (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.
Do not attempt to construct this value. Use only the value of
NextMarker
from the truncated response you just received.
listResourceTags_limit :: Lens' ListResourceTags (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 50, inclusive. If you do not include a value, it defaults to 50.
listResourceTags_keyId :: Lens' ListResourceTags Text Source #
Gets tags on the specified KMS key.
Specify the key ID or key ARN of the KMS key.
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 KMS key, use ListKeys or DescribeKey.
Destructuring the Response
data ListResourceTagsResponse Source #
See: newListResourceTagsResponse
smart constructor.
ListResourceTagsResponse' | |
|
Instances
newListResourceTagsResponse Source #
Create a value of ListResourceTagsResponse
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:truncated:ListResourceTagsResponse'
, listResourceTagsResponse_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:nextMarker:ListResourceTagsResponse'
, listResourceTagsResponse_nextMarker
- When Truncated
is true, this element is present and contains the value
to use for the Marker
parameter in a subsequent request.
Do not assume or infer any information from this value.
$sel:tags:ListResourceTagsResponse'
, listResourceTagsResponse_tags
- A list of tags. Each tag consists of a tag key and a tag value.
Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see Using ABAC in KMS in the Key Management Service Developer Guide.
$sel:httpStatus:ListResourceTagsResponse'
, listResourceTagsResponse_httpStatus
- The response's http status code.
Response Lenses
listResourceTagsResponse_truncated :: Lens' ListResourceTagsResponse (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.
listResourceTagsResponse_nextMarker :: Lens' ListResourceTagsResponse (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.
Do not assume or infer any information from this value.
listResourceTagsResponse_tags :: Lens' ListResourceTagsResponse (Maybe [Tag]) Source #
A list of tags. Each tag consists of a tag key and a tag value.
Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see Using ABAC in KMS in the Key Management Service Developer Guide.
listResourceTagsResponse_httpStatus :: Lens' ListResourceTagsResponse Int Source #
The response's http status code.