SageMaker / Client / list_clusters

list_clusters#

SageMaker.Client.list_clusters(**kwargs)#

Retrieves the list of SageMaker HyperPod clusters.

See also: AWS API Documentation

Request Syntax

response = client.list_clusters(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    MaxResults=123,
    NameContains='string',
    NextToken='string',
    SortBy='CREATION_TIME'|'NAME',
    SortOrder='Ascending'|'Descending'
)
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.

  • MaxResults (integer) – Set the maximum number of SageMaker HyperPod clusters to list.

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

  • NextToken (string) – Set the next token to retrieve the list of SageMaker HyperPod clusters.

  • 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.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • NextToken (string) –

      If the result of the previous ListClusters request was truncated, the response includes a NextToken. To retrieve the next set of clusters, use the token in the next request.

    • 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.