SageMaker / Paginator / ListTags

ListTags#

class SageMaker.Paginator.ListTags#
paginator = client.get_paginator('list_tags')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from SageMaker.Client.list_tags().

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

  • 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': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],

}

Response Structure

  • (dict) –

    • Tags (list) –

      An array of Tag objects, each with a tag key and a value.

      • (dict) –

        A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

        You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags.

        For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy.

        • Key (string) –

          The tag key. Tag keys must be unique per resource.

        • Value (string) –

          The tag value.