CostExplorer / Client / list_tags_for_resource

list_tags_for_resource#

CostExplorer.Client.list_tags_for_resource(**kwargs)#

Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceArn='string'
)
Parameters:

ResourceArn (string) –

[REQUIRED]

The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.

Return type:

dict

Returns:

Response Syntax

{
    'ResourceTags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • ResourceTags (list) –

      A list of tag key value pairs that are associated with the resource.

      • (dict) –

        The tag structure that contains a tag key and value.

        Note

        Tagging is supported only for the following Cost Explorer resource types: AnomalyMonitor, AnomalySubscription, CostCategory.

        • Key (string) –

          The key that’s associated with the tag.

        • Value (string) –

          The value that’s associated with the tag.

Exceptions