CloudHSMV2 / Client / list_tags

list_tags#

CloudHSMV2.Client.list_tags(**kwargs)#

Gets a list of tags for the specified CloudHSM cluster.

This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a NextToken value. Use this value in a subsequent ListTags request to get more tags. When you receive a response with no NextToken (or an empty or null value), that means there are no more tags to get.

Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

response = client.list_tags(
    ResourceId='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • ResourceId (string) –

    [REQUIRED]

    The cluster identifier (ID) for the cluster whose tags you are getting. To find the cluster ID, use DescribeClusters.

  • NextToken (string) – The NextToken value that you received in the previous response. Use this value to get more tags.

  • MaxResults (integer) – The maximum number of tags to return in the response. When there are more tags than the number you specify, the response contains a NextToken value.

Return type:

dict

Returns:

Response Syntax

{
    'TagList': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • TagList (list) –

      A list of tags.

      • (dict) –

        Contains a tag. A tag is a key-value pair.

        • Key (string) –

          The key of the tag.

        • Value (string) –

          The value of the tag.

    • NextToken (string) –

      An opaque string that indicates that the response contains only a subset of tags. Use this value in a subsequent ListTags request to get more tags.

Exceptions