KMS / Paginator / ListResourceTags

ListResourceTags#

class KMS.Paginator.ListResourceTags#
paginator = client.get_paginator('list_resource_tags')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from KMS.Client.list_resource_tags().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    KeyId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • KeyId (string) –

    [REQUIRED]

    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.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'Tags': [
        {
            'TagKey': 'string',
            'TagValue': 'string'
        },
    ],
    'Truncated': True|False,
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Tags (list) –

      A list of tags. Each tag consists of a tag key and a tag value.

      Note

      Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

      • (dict) –

        A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.

        Warning

        Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.

        For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions in the Amazon Web Services Billing and Cost Management User Guide.

        • TagKey (string) –

          The key of the tag.

        • TagValue (string) –

          The value of the tag.

    • Truncated (boolean) –

      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.

    • NextToken (string) –

      A token to resume pagination.