aws_sdk_sagemaker/client/
list_clusters.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`ListClusters`](crate::operation::list_clusters::builders::ListClustersFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`creation_time_after(DateTime)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::creation_time_after) / [`set_creation_time_after(Option<DateTime>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_creation_time_after):<br>required: **false**<br><p>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.</p> <p>Acceptable formats include:</p> <ul>  <li>   <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (UTC), for example, <code>2014-10-01T20:30:00.000Z</code></p></li>  <li>   <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (with offset), for example, <code>2014-10-01T12:30:00.000-08:00</code></p></li>  <li>   <p><code>YYYY-MM-DD</code>, for example, <code>2014-10-01</code></p></li>  <li>   <p>Unix time in seconds, for example, <code>1412195400</code>. This is also referred to as Unix Epoch time and represents the number of seconds since midnight, January 1, 1970 UTC.</p></li> </ul> <p>For more information about the timestamp format, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-types.html#parameter-type-timestamp">Timestamp</a> in the <i>Amazon Web Services Command Line Interface User Guide</i>.</p><br>
8    ///   - [`creation_time_before(DateTime)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::creation_time_before) / [`set_creation_time_before(Option<DateTime>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_creation_time_before):<br>required: **false**<br><p>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 <code>CreationTimeAfter</code>. For more information about the timestamp format, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-types.html#parameter-type-timestamp">Timestamp</a> in the <i>Amazon Web Services Command Line Interface User Guide</i>.</p><br>
9    ///   - [`max_results(i32)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_max_results):<br>required: **false**<br><p>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 <code>MaxResults</code>, 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 until <code>NextToken</code> is empty.</p><br>
10    ///   - [`name_contains(impl Into<String>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::name_contains) / [`set_name_contains(Option<String>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_name_contains):<br>required: **false**<br><p>Set the maximum number of instances to print in the list.</p><br>
11    ///   - [`next_token(impl Into<String>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_next_token):<br>required: **false**<br><p>Set the next token to retrieve the list of SageMaker HyperPod clusters.</p><br>
12    ///   - [`sort_by(ClusterSortBy)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::sort_by) / [`set_sort_by(Option<ClusterSortBy>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_sort_by):<br>required: **false**<br><p>The field by which to sort results. The default value is <code>CREATION_TIME</code>.</p><br>
13    ///   - [`sort_order(SortOrder)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::sort_order) / [`set_sort_order(Option<SortOrder>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_sort_order):<br>required: **false**<br><p>The sort order for results. The default value is <code>Ascending</code>.</p><br>
14    ///   - [`training_plan_arn(impl Into<String>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::training_plan_arn) / [`set_training_plan_arn(Option<String>)`](crate::operation::list_clusters::builders::ListClustersFluentBuilder::set_training_plan_arn):<br>required: **false**<br><p>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 <code> <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingPlan.html">CreateTrainingPlan</a> </code>.</p><br>
15    /// - On success, responds with [`ListClustersOutput`](crate::operation::list_clusters::ListClustersOutput) with field(s):
16    ///   - [`next_token(Option<String>)`](crate::operation::list_clusters::ListClustersOutput::next_token): <p>If the result of the previous <code>ListClusters</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of clusters, use the token in the next request.</p>
17    ///   - [`cluster_summaries(Option<Vec::<ClusterSummary>>)`](crate::operation::list_clusters::ListClustersOutput::cluster_summaries): <p>The summaries of listed SageMaker HyperPod clusters.</p>
18    /// - On failure, responds with [`SdkError<ListClustersError>`](crate::operation::list_clusters::ListClustersError)
19    pub fn list_clusters(&self) -> crate::operation::list_clusters::builders::ListClustersFluentBuilder {
20        crate::operation::list_clusters::builders::ListClustersFluentBuilder::new(self.handle.clone())
21    }
22}