libZSservicesZSamazonka-kmsZSamazonka-kms
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.KMS.ListResourceTags

Description

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

Creating a Request

data ListResourceTags Source #

See: newListResourceTags smart constructor.

Constructors

ListResourceTags' 

Fields

  • marker :: Maybe Text

    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.

  • limit :: Maybe Natural

    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.

  • keyId :: Text

    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.

Instances

Instances details
Eq ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Read ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Show ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Generic ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Associated Types

type Rep ListResourceTags :: Type -> Type #

NFData ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Methods

rnf :: ListResourceTags -> () #

Hashable ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

ToJSON ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

AWSRequest ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Associated Types

type AWSResponse ListResourceTags #

ToHeaders ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

ToPath ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

ToQuery ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

type Rep ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

type Rep ListResourceTags = D1 ('MetaData "ListResourceTags" "Amazonka.KMS.ListResourceTags" "libZSservicesZSamazonka-kmsZSamazonka-kms" 'False) (C1 ('MetaCons "ListResourceTags'" 'PrefixI 'True) (S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "keyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse ListResourceTags Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

newListResourceTags Source #

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.

Constructors

ListResourceTagsResponse' 

Fields

  • truncated :: Maybe Bool

    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.

  • nextMarker :: Maybe Text

    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.

  • tags :: Maybe [Tag]

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListResourceTagsResponse Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Read ListResourceTagsResponse Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Show ListResourceTagsResponse Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Generic ListResourceTagsResponse Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

Associated Types

type Rep ListResourceTagsResponse :: Type -> Type #

NFData ListResourceTagsResponse Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

type Rep ListResourceTagsResponse Source # 
Instance details

Defined in Amazonka.KMS.ListResourceTags

type Rep ListResourceTagsResponse = D1 ('MetaData "ListResourceTagsResponse" "Amazonka.KMS.ListResourceTags" "libZSservicesZSamazonka-kmsZSamazonka-kms" 'False) (C1 ('MetaCons "ListResourceTagsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "truncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "nextMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.