ListClusters
Retrieves the list of SageMaker HyperPod clusters.
Request Syntax
{
"MaxResults": number,
"NameContains": "string",
"NextToken": "string",
"SortBy": "string",
"SortOrder": "string",
"TrainingPlanArn": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- MaxResults
-
Specifies the maximum number of clusters to evaluate for the operation (not necessarily the number of matching items). After SageMaker processes the number of clusters up to
MaxResults, it stops the operation and returns the matching clusters up to that point. If all the matching clusters are desired, SageMaker will go through all the clusters untilNextTokenis empty.Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- NameContains
-
Set the maximum number of instances to print in the list.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 63.
Pattern:
[a-zA-Z0-9\-]+Required: No
- NextToken
-
Set the next token to retrieve the list of SageMaker HyperPod clusters.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 8192.
Pattern:
.*Required: No
- SortBy
-
The field by which to sort results. The default value is
CREATION_TIME.Type: String
Valid Values:
CREATION_TIME | NAMERequired: No
- SortOrder
-
The sort order for results. The default value is
Ascending.Type: String
Valid Values:
Ascending | DescendingRequired: No
- TrainingPlanArn
-
The Amazon Resource Name (ARN); of the training plan to filter clusters by. For more information about reserving GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see
CreateTrainingPlan.Type: String
Length Constraints: Minimum length of 50. Maximum length of 2048.
Pattern:
arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:training-plan/.*Required: No
Response Syntax
{
"ClusterSummaries": [
{
"ClusterArn": "string",
"ClusterName": "string",
"ClusterStatus": "string",
"ImageVersionStatus": "string",
"TrainingPlanArns": [ "string" ]
}
],
"NextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- ClusterSummaries
-
The summaries of listed SageMaker HyperPod clusters.
Type: Array of ClusterSummary objects
- NextToken
-
If the result of the previous
ListClustersrequest was truncated, the response includes aNextToken. To retrieve the next set of clusters, use the token in the next request.Type: String
Length Constraints: Minimum length of 0. Maximum length of 8192.
Pattern:
.*
Errors
For information about the errors that are common to all actions, see Common Error Types.
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: