SageMaker / Paginator / ListClusters

ListClusters#

class SageMaker.Paginator.ListClusters#
paginator = client.get_paginator('list_clusters')
paginate(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    NameContains='string',
    SortBy='CREATION_TIME'|'NAME',
    SortOrder='Ascending'|'Descending',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • CreationTimeAfter (datetime) –

    Set a start time for the time range during which you want to list SageMaker HyperPod clusters. Timestamps are formatted according to the ISO 8601 standard.

    Acceptable formats include:

    • YYYY-MM-DDThh:mm:ss.sssTZD (UTC), for example, 2014-10-01T20:30:00.000Z

    • YYYY-MM-DDThh:mm:ss.sssTZD (with offset), for example, 2014-10-01T12:30:00.000-08:00

    • YYYY-MM-DD, for example, 2014-10-01

    • Unix time in seconds, for example, 1412195400. This is also referred to as Unix Epoch time and represents the number of seconds since midnight, January 1, 1970 UTC.

    For more information about the timestamp format, see Timestamp in the Amazon Web Services Command Line Interface User Guide.

  • CreationTimeBefore (datetime) – Set an end time for the time range during which you want to list SageMaker HyperPod clusters. A filter that returns nodes in a SageMaker HyperPod cluster created before the specified time. The acceptable formats are the same as the timestamp formats for CreationTimeAfter. For more information about the timestamp format, see Timestamp in the Amazon Web Services Command Line Interface User Guide.

  • NameContains (string) – Set the maximum number of instances to print in the list.

  • SortBy (string) – The field by which to sort results. The default value is CREATION_TIME.

  • SortOrder (string) – The sort order for results. The default value is Ascending.

  • 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

{
    'ClusterSummaries': [
        {
            'ClusterArn': 'string',
            'ClusterName': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'ClusterStatus': 'Creating'|'Deleting'|'Failed'|'InService'|'RollingBack'|'SystemUpdating'|'Updating'
        },
    ]
}

Response Structure

  • (dict) –

    • ClusterSummaries (list) –

      The summaries of listed SageMaker HyperPod clusters.

      • (dict) –

        Lists a summary of the properties of a SageMaker HyperPod cluster.

        • ClusterArn (string) –

          The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.

        • ClusterName (string) –

          The name of the SageMaker HyperPod cluster.

        • CreationTime (datetime) –

          The time when the SageMaker HyperPod cluster is created.

        • ClusterStatus (string) –

          The status of the SageMaker HyperPod cluster.