SSM / Client / list_tags_for_resource

list_tags_for_resource#

SSM.Client.list_tags_for_resource(**kwargs)#

Returns a list of the tags assigned to the specified resource.

For information about the ID format for each supported resource type, see AddTagsToResource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceType='Document'|'ManagedInstance'|'MaintenanceWindow'|'Parameter'|'PatchBaseline'|'OpsItem'|'OpsMetadata'|'Automation'|'Association',
    ResourceId='string'
)
Parameters:
  • ResourceType (string) –

    [REQUIRED]

    Returns a list of tags for a specific resource type.

  • ResourceId (string) –

    [REQUIRED]

    The resource ID for which you want to see a list of tags.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • TagList (list) –

      A list of tags.

      • (dict) –

        Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.

        • Key (string) –

          The name of the tag.

        • Value (string) –

          The value of the tag.

Exceptions

  • SSM.Client.exceptions.InvalidResourceType

  • SSM.Client.exceptions.InvalidResourceId

  • SSM.Client.exceptions.InternalServerError