ComputeOptimizerAutomation / Client / list_tags_for_resource

list_tags_for_resource

ComputeOptimizerAutomation.Client.list_tags_for_resource(**kwargs)

Lists the tags for a specified resource.

See also: AWS API Documentation

Request Syntax

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

resourceArn (string) –

[REQUIRED]

The ARN of the resource to list tags for.

Return type:

dict

Returns:

Response Syntax

{
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • tags (list) –

      The list of tags associated with the specified resource.

      • (dict) –

        A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

        • key (string) –

          The tag key, which can be up to 128 characters long.

        • value (string) –

          The tag value, which can be up to 256 characters long.

Exceptions

  • ComputeOptimizerAutomation.Client.exceptions.InvalidParameterValueException

  • ComputeOptimizerAutomation.Client.exceptions.ForbiddenException

  • ComputeOptimizerAutomation.Client.exceptions.OptInRequiredException

  • ComputeOptimizerAutomation.Client.exceptions.ResourceNotFoundException

  • ComputeOptimizerAutomation.Client.exceptions.ThrottlingException

  • ComputeOptimizerAutomation.Client.exceptions.AccessDeniedException

  • ComputeOptimizerAutomation.Client.exceptions.InternalServerException

  • ComputeOptimizerAutomation.Client.exceptions.ServiceUnavailableException