Skip to main content

aws_sdk_sagemaker/operation/list_clusters/
_list_clusters_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListClustersInput {
6    /// <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>
7    /// <p>Acceptable formats include:</p>
8    /// <ul>
9    /// <li>
10    /// <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (UTC), for example, <code>2014-10-01T20:30:00.000Z</code></p></li>
11    /// <li>
12    /// <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>
13    /// <li>
14    /// <p><code>YYYY-MM-DD</code>, for example, <code>2014-10-01</code></p></li>
15    /// <li>
16    /// <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>
17    /// </ul>
18    /// <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>
19    pub creation_time_after: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <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>
21    pub creation_time_before: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <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>
23    pub max_results: ::std::option::Option<i32>,
24    /// <p>Set the maximum number of instances to print in the list.</p>
25    pub name_contains: ::std::option::Option<::std::string::String>,
26    /// <p>Set the next token to retrieve the list of SageMaker HyperPod clusters.</p>
27    pub next_token: ::std::option::Option<::std::string::String>,
28    /// <p>The field by which to sort results. The default value is <code>CREATION_TIME</code>.</p>
29    pub sort_by: ::std::option::Option<crate::types::ClusterSortBy>,
30    /// <p>The sort order for results. The default value is <code>Ascending</code>.</p>
31    pub sort_order: ::std::option::Option<crate::types::SortOrder>,
32    /// <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>
33    pub training_plan_arn: ::std::option::Option<::std::string::String>,
34}
35impl ListClustersInput {
36    /// <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>
37    /// <p>Acceptable formats include:</p>
38    /// <ul>
39    /// <li>
40    /// <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (UTC), for example, <code>2014-10-01T20:30:00.000Z</code></p></li>
41    /// <li>
42    /// <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>
43    /// <li>
44    /// <p><code>YYYY-MM-DD</code>, for example, <code>2014-10-01</code></p></li>
45    /// <li>
46    /// <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>
47    /// </ul>
48    /// <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>
49    pub fn creation_time_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
50        self.creation_time_after.as_ref()
51    }
52    /// <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>
53    pub fn creation_time_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
54        self.creation_time_before.as_ref()
55    }
56    /// <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>
57    pub fn max_results(&self) -> ::std::option::Option<i32> {
58        self.max_results
59    }
60    /// <p>Set the maximum number of instances to print in the list.</p>
61    pub fn name_contains(&self) -> ::std::option::Option<&str> {
62        self.name_contains.as_deref()
63    }
64    /// <p>Set the next token to retrieve the list of SageMaker HyperPod clusters.</p>
65    pub fn next_token(&self) -> ::std::option::Option<&str> {
66        self.next_token.as_deref()
67    }
68    /// <p>The field by which to sort results. The default value is <code>CREATION_TIME</code>.</p>
69    pub fn sort_by(&self) -> ::std::option::Option<&crate::types::ClusterSortBy> {
70        self.sort_by.as_ref()
71    }
72    /// <p>The sort order for results. The default value is <code>Ascending</code>.</p>
73    pub fn sort_order(&self) -> ::std::option::Option<&crate::types::SortOrder> {
74        self.sort_order.as_ref()
75    }
76    /// <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>
77    pub fn training_plan_arn(&self) -> ::std::option::Option<&str> {
78        self.training_plan_arn.as_deref()
79    }
80}
81impl ListClustersInput {
82    /// Creates a new builder-style object to manufacture [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
83    pub fn builder() -> crate::operation::list_clusters::builders::ListClustersInputBuilder {
84        crate::operation::list_clusters::builders::ListClustersInputBuilder::default()
85    }
86}
87
88/// A builder for [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
89#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
90#[non_exhaustive]
91pub struct ListClustersInputBuilder {
92    pub(crate) creation_time_after: ::std::option::Option<::aws_smithy_types::DateTime>,
93    pub(crate) creation_time_before: ::std::option::Option<::aws_smithy_types::DateTime>,
94    pub(crate) max_results: ::std::option::Option<i32>,
95    pub(crate) name_contains: ::std::option::Option<::std::string::String>,
96    pub(crate) next_token: ::std::option::Option<::std::string::String>,
97    pub(crate) sort_by: ::std::option::Option<crate::types::ClusterSortBy>,
98    pub(crate) sort_order: ::std::option::Option<crate::types::SortOrder>,
99    pub(crate) training_plan_arn: ::std::option::Option<::std::string::String>,
100}
101impl ListClustersInputBuilder {
102    /// <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>
103    /// <p>Acceptable formats include:</p>
104    /// <ul>
105    /// <li>
106    /// <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (UTC), for example, <code>2014-10-01T20:30:00.000Z</code></p></li>
107    /// <li>
108    /// <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>
109    /// <li>
110    /// <p><code>YYYY-MM-DD</code>, for example, <code>2014-10-01</code></p></li>
111    /// <li>
112    /// <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>
113    /// </ul>
114    /// <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>
115    pub fn creation_time_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
116        self.creation_time_after = ::std::option::Option::Some(input);
117        self
118    }
119    /// <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>
120    /// <p>Acceptable formats include:</p>
121    /// <ul>
122    /// <li>
123    /// <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (UTC), for example, <code>2014-10-01T20:30:00.000Z</code></p></li>
124    /// <li>
125    /// <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>
126    /// <li>
127    /// <p><code>YYYY-MM-DD</code>, for example, <code>2014-10-01</code></p></li>
128    /// <li>
129    /// <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>
130    /// </ul>
131    /// <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>
132    pub fn set_creation_time_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
133        self.creation_time_after = input;
134        self
135    }
136    /// <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>
137    /// <p>Acceptable formats include:</p>
138    /// <ul>
139    /// <li>
140    /// <p><code>YYYY-MM-DDThh:mm:ss.sssTZD</code> (UTC), for example, <code>2014-10-01T20:30:00.000Z</code></p></li>
141    /// <li>
142    /// <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>
143    /// <li>
144    /// <p><code>YYYY-MM-DD</code>, for example, <code>2014-10-01</code></p></li>
145    /// <li>
146    /// <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>
147    /// </ul>
148    /// <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>
149    pub fn get_creation_time_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
150        &self.creation_time_after
151    }
152    /// <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>
153    pub fn creation_time_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
154        self.creation_time_before = ::std::option::Option::Some(input);
155        self
156    }
157    /// <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>
158    pub fn set_creation_time_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
159        self.creation_time_before = input;
160        self
161    }
162    /// <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>
163    pub fn get_creation_time_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
164        &self.creation_time_before
165    }
166    /// <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>
167    pub fn max_results(mut self, input: i32) -> Self {
168        self.max_results = ::std::option::Option::Some(input);
169        self
170    }
171    /// <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>
172    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
173        self.max_results = input;
174        self
175    }
176    /// <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>
177    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
178        &self.max_results
179    }
180    /// <p>Set the maximum number of instances to print in the list.</p>
181    pub fn name_contains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.name_contains = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>Set the maximum number of instances to print in the list.</p>
186    pub fn set_name_contains(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.name_contains = input;
188        self
189    }
190    /// <p>Set the maximum number of instances to print in the list.</p>
191    pub fn get_name_contains(&self) -> &::std::option::Option<::std::string::String> {
192        &self.name_contains
193    }
194    /// <p>Set the next token to retrieve the list of SageMaker HyperPod clusters.</p>
195    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.next_token = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <p>Set the next token to retrieve the list of SageMaker HyperPod clusters.</p>
200    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.next_token = input;
202        self
203    }
204    /// <p>Set the next token to retrieve the list of SageMaker HyperPod clusters.</p>
205    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
206        &self.next_token
207    }
208    /// <p>The field by which to sort results. The default value is <code>CREATION_TIME</code>.</p>
209    pub fn sort_by(mut self, input: crate::types::ClusterSortBy) -> Self {
210        self.sort_by = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>The field by which to sort results. The default value is <code>CREATION_TIME</code>.</p>
214    pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::ClusterSortBy>) -> Self {
215        self.sort_by = input;
216        self
217    }
218    /// <p>The field by which to sort results. The default value is <code>CREATION_TIME</code>.</p>
219    pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::ClusterSortBy> {
220        &self.sort_by
221    }
222    /// <p>The sort order for results. The default value is <code>Ascending</code>.</p>
223    pub fn sort_order(mut self, input: crate::types::SortOrder) -> Self {
224        self.sort_order = ::std::option::Option::Some(input);
225        self
226    }
227    /// <p>The sort order for results. The default value is <code>Ascending</code>.</p>
228    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
229        self.sort_order = input;
230        self
231    }
232    /// <p>The sort order for results. The default value is <code>Ascending</code>.</p>
233    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
234        &self.sort_order
235    }
236    /// <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>
237    pub fn training_plan_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238        self.training_plan_arn = ::std::option::Option::Some(input.into());
239        self
240    }
241    /// <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>
242    pub fn set_training_plan_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243        self.training_plan_arn = input;
244        self
245    }
246    /// <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>
247    pub fn get_training_plan_arn(&self) -> &::std::option::Option<::std::string::String> {
248        &self.training_plan_arn
249    }
250    /// Consumes the builder and constructs a [`ListClustersInput`](crate::operation::list_clusters::ListClustersInput).
251    pub fn build(
252        self,
253    ) -> ::std::result::Result<crate::operation::list_clusters::ListClustersInput, ::aws_smithy_types::error::operation::BuildError> {
254        ::std::result::Result::Ok(crate::operation::list_clusters::ListClustersInput {
255            creation_time_after: self.creation_time_after,
256            creation_time_before: self.creation_time_before,
257            max_results: self.max_results,
258            name_contains: self.name_contains,
259            next_token: self.next_token,
260            sort_by: self.sort_by,
261            sort_order: self.sort_order,
262            training_plan_arn: self.training_plan_arn,
263        })
264    }
265}