aws_sdk_sagemaker/operation/describe_cluster/
_describe_cluster_output.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 DescribeClusterOutput {
6    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
7    pub cluster_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the SageMaker HyperPod cluster.</p>
9    pub cluster_name: ::std::option::Option<::std::string::String>,
10    /// <p>The status of the SageMaker HyperPod cluster.</p>
11    pub cluster_status: ::std::option::Option<crate::types::ClusterStatus>,
12    /// <p>The time when the SageMaker Cluster is created.</p>
13    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
15    pub failure_message: ::std::option::Option<::std::string::String>,
16    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
17    pub instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>>,
18    /// <p>The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.</p>
19    pub restricted_instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterRestrictedInstanceGroupDetails>>,
20    /// <p>Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html">Give SageMaker Access to Resources in your Amazon VPC</a>.</p>
21    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
22    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
23    pub orchestrator: ::std::option::Option<crate::types::ClusterOrchestrator>,
24    /// <p>The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage.</p>
25    pub tiered_storage_config: ::std::option::Option<crate::types::ClusterTieredStorageConfig>,
26    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
27    pub node_recovery: ::std::option::Option<crate::types::ClusterNodeRecovery>,
28    /// <p>The mode used for provisioning nodes in the cluster.</p>
29    pub node_provisioning_mode: ::std::option::Option<crate::types::ClusterNodeProvisioningMode>,
30    /// <p>The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations.</p>
31    pub cluster_role: ::std::option::Option<::std::string::String>,
32    /// <p>The current autoscaling configuration and status for the autoscaler.</p>
33    pub auto_scaling: ::std::option::Option<crate::types::ClusterAutoScalingConfigOutput>,
34    _request_id: Option<String>,
35}
36impl DescribeClusterOutput {
37    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
38    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
39        self.cluster_arn.as_deref()
40    }
41    /// <p>The name of the SageMaker HyperPod cluster.</p>
42    pub fn cluster_name(&self) -> ::std::option::Option<&str> {
43        self.cluster_name.as_deref()
44    }
45    /// <p>The status of the SageMaker HyperPod cluster.</p>
46    pub fn cluster_status(&self) -> ::std::option::Option<&crate::types::ClusterStatus> {
47        self.cluster_status.as_ref()
48    }
49    /// <p>The time when the SageMaker Cluster is created.</p>
50    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51        self.creation_time.as_ref()
52    }
53    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
54    pub fn failure_message(&self) -> ::std::option::Option<&str> {
55        self.failure_message.as_deref()
56    }
57    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
58    ///
59    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.instance_groups.is_none()`.
60    pub fn instance_groups(&self) -> &[crate::types::ClusterInstanceGroupDetails] {
61        self.instance_groups.as_deref().unwrap_or_default()
62    }
63    /// <p>The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.</p>
64    ///
65    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.restricted_instance_groups.is_none()`.
66    pub fn restricted_instance_groups(&self) -> &[crate::types::ClusterRestrictedInstanceGroupDetails] {
67        self.restricted_instance_groups.as_deref().unwrap_or_default()
68    }
69    /// <p>Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html">Give SageMaker Access to Resources in your Amazon VPC</a>.</p>
70    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
71        self.vpc_config.as_ref()
72    }
73    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
74    pub fn orchestrator(&self) -> ::std::option::Option<&crate::types::ClusterOrchestrator> {
75        self.orchestrator.as_ref()
76    }
77    /// <p>The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage.</p>
78    pub fn tiered_storage_config(&self) -> ::std::option::Option<&crate::types::ClusterTieredStorageConfig> {
79        self.tiered_storage_config.as_ref()
80    }
81    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
82    pub fn node_recovery(&self) -> ::std::option::Option<&crate::types::ClusterNodeRecovery> {
83        self.node_recovery.as_ref()
84    }
85    /// <p>The mode used for provisioning nodes in the cluster.</p>
86    pub fn node_provisioning_mode(&self) -> ::std::option::Option<&crate::types::ClusterNodeProvisioningMode> {
87        self.node_provisioning_mode.as_ref()
88    }
89    /// <p>The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations.</p>
90    pub fn cluster_role(&self) -> ::std::option::Option<&str> {
91        self.cluster_role.as_deref()
92    }
93    /// <p>The current autoscaling configuration and status for the autoscaler.</p>
94    pub fn auto_scaling(&self) -> ::std::option::Option<&crate::types::ClusterAutoScalingConfigOutput> {
95        self.auto_scaling.as_ref()
96    }
97}
98impl ::aws_types::request_id::RequestId for DescribeClusterOutput {
99    fn request_id(&self) -> Option<&str> {
100        self._request_id.as_deref()
101    }
102}
103impl DescribeClusterOutput {
104    /// Creates a new builder-style object to manufacture [`DescribeClusterOutput`](crate::operation::describe_cluster::DescribeClusterOutput).
105    pub fn builder() -> crate::operation::describe_cluster::builders::DescribeClusterOutputBuilder {
106        crate::operation::describe_cluster::builders::DescribeClusterOutputBuilder::default()
107    }
108}
109
110/// A builder for [`DescribeClusterOutput`](crate::operation::describe_cluster::DescribeClusterOutput).
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
112#[non_exhaustive]
113pub struct DescribeClusterOutputBuilder {
114    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
115    pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
116    pub(crate) cluster_status: ::std::option::Option<crate::types::ClusterStatus>,
117    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) failure_message: ::std::option::Option<::std::string::String>,
119    pub(crate) instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>>,
120    pub(crate) restricted_instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterRestrictedInstanceGroupDetails>>,
121    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
122    pub(crate) orchestrator: ::std::option::Option<crate::types::ClusterOrchestrator>,
123    pub(crate) tiered_storage_config: ::std::option::Option<crate::types::ClusterTieredStorageConfig>,
124    pub(crate) node_recovery: ::std::option::Option<crate::types::ClusterNodeRecovery>,
125    pub(crate) node_provisioning_mode: ::std::option::Option<crate::types::ClusterNodeProvisioningMode>,
126    pub(crate) cluster_role: ::std::option::Option<::std::string::String>,
127    pub(crate) auto_scaling: ::std::option::Option<crate::types::ClusterAutoScalingConfigOutput>,
128    _request_id: Option<String>,
129}
130impl DescribeClusterOutputBuilder {
131    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
132    /// This field is required.
133    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.cluster_arn = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
138    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.cluster_arn = input;
140        self
141    }
142    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
143    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
144        &self.cluster_arn
145    }
146    /// <p>The name of the SageMaker HyperPod cluster.</p>
147    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.cluster_name = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>The name of the SageMaker HyperPod cluster.</p>
152    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.cluster_name = input;
154        self
155    }
156    /// <p>The name of the SageMaker HyperPod cluster.</p>
157    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
158        &self.cluster_name
159    }
160    /// <p>The status of the SageMaker HyperPod cluster.</p>
161    /// This field is required.
162    pub fn cluster_status(mut self, input: crate::types::ClusterStatus) -> Self {
163        self.cluster_status = ::std::option::Option::Some(input);
164        self
165    }
166    /// <p>The status of the SageMaker HyperPod cluster.</p>
167    pub fn set_cluster_status(mut self, input: ::std::option::Option<crate::types::ClusterStatus>) -> Self {
168        self.cluster_status = input;
169        self
170    }
171    /// <p>The status of the SageMaker HyperPod cluster.</p>
172    pub fn get_cluster_status(&self) -> &::std::option::Option<crate::types::ClusterStatus> {
173        &self.cluster_status
174    }
175    /// <p>The time when the SageMaker Cluster is created.</p>
176    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
177        self.creation_time = ::std::option::Option::Some(input);
178        self
179    }
180    /// <p>The time when the SageMaker Cluster is created.</p>
181    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
182        self.creation_time = input;
183        self
184    }
185    /// <p>The time when the SageMaker Cluster is created.</p>
186    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
187        &self.creation_time
188    }
189    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
190    pub fn failure_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.failure_message = ::std::option::Option::Some(input.into());
192        self
193    }
194    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
195    pub fn set_failure_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.failure_message = input;
197        self
198    }
199    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
200    pub fn get_failure_message(&self) -> &::std::option::Option<::std::string::String> {
201        &self.failure_message
202    }
203    /// Appends an item to `instance_groups`.
204    ///
205    /// To override the contents of this collection use [`set_instance_groups`](Self::set_instance_groups).
206    ///
207    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
208    pub fn instance_groups(mut self, input: crate::types::ClusterInstanceGroupDetails) -> Self {
209        let mut v = self.instance_groups.unwrap_or_default();
210        v.push(input);
211        self.instance_groups = ::std::option::Option::Some(v);
212        self
213    }
214    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
215    pub fn set_instance_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>>) -> Self {
216        self.instance_groups = input;
217        self
218    }
219    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
220    pub fn get_instance_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>> {
221        &self.instance_groups
222    }
223    /// Appends an item to `restricted_instance_groups`.
224    ///
225    /// To override the contents of this collection use [`set_restricted_instance_groups`](Self::set_restricted_instance_groups).
226    ///
227    /// <p>The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.</p>
228    pub fn restricted_instance_groups(mut self, input: crate::types::ClusterRestrictedInstanceGroupDetails) -> Self {
229        let mut v = self.restricted_instance_groups.unwrap_or_default();
230        v.push(input);
231        self.restricted_instance_groups = ::std::option::Option::Some(v);
232        self
233    }
234    /// <p>The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.</p>
235    pub fn set_restricted_instance_groups(
236        mut self,
237        input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterRestrictedInstanceGroupDetails>>,
238    ) -> Self {
239        self.restricted_instance_groups = input;
240        self
241    }
242    /// <p>The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.</p>
243    pub fn get_restricted_instance_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterRestrictedInstanceGroupDetails>> {
244        &self.restricted_instance_groups
245    }
246    /// <p>Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html">Give SageMaker Access to Resources in your Amazon VPC</a>.</p>
247    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
248        self.vpc_config = ::std::option::Option::Some(input);
249        self
250    }
251    /// <p>Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html">Give SageMaker Access to Resources in your Amazon VPC</a>.</p>
252    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
253        self.vpc_config = input;
254        self
255    }
256    /// <p>Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html">Give SageMaker Access to Resources in your Amazon VPC</a>.</p>
257    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
258        &self.vpc_config
259    }
260    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
261    pub fn orchestrator(mut self, input: crate::types::ClusterOrchestrator) -> Self {
262        self.orchestrator = ::std::option::Option::Some(input);
263        self
264    }
265    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
266    pub fn set_orchestrator(mut self, input: ::std::option::Option<crate::types::ClusterOrchestrator>) -> Self {
267        self.orchestrator = input;
268        self
269    }
270    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
271    pub fn get_orchestrator(&self) -> &::std::option::Option<crate::types::ClusterOrchestrator> {
272        &self.orchestrator
273    }
274    /// <p>The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage.</p>
275    pub fn tiered_storage_config(mut self, input: crate::types::ClusterTieredStorageConfig) -> Self {
276        self.tiered_storage_config = ::std::option::Option::Some(input);
277        self
278    }
279    /// <p>The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage.</p>
280    pub fn set_tiered_storage_config(mut self, input: ::std::option::Option<crate::types::ClusterTieredStorageConfig>) -> Self {
281        self.tiered_storage_config = input;
282        self
283    }
284    /// <p>The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage.</p>
285    pub fn get_tiered_storage_config(&self) -> &::std::option::Option<crate::types::ClusterTieredStorageConfig> {
286        &self.tiered_storage_config
287    }
288    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
289    pub fn node_recovery(mut self, input: crate::types::ClusterNodeRecovery) -> Self {
290        self.node_recovery = ::std::option::Option::Some(input);
291        self
292    }
293    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
294    pub fn set_node_recovery(mut self, input: ::std::option::Option<crate::types::ClusterNodeRecovery>) -> Self {
295        self.node_recovery = input;
296        self
297    }
298    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
299    pub fn get_node_recovery(&self) -> &::std::option::Option<crate::types::ClusterNodeRecovery> {
300        &self.node_recovery
301    }
302    /// <p>The mode used for provisioning nodes in the cluster.</p>
303    pub fn node_provisioning_mode(mut self, input: crate::types::ClusterNodeProvisioningMode) -> Self {
304        self.node_provisioning_mode = ::std::option::Option::Some(input);
305        self
306    }
307    /// <p>The mode used for provisioning nodes in the cluster.</p>
308    pub fn set_node_provisioning_mode(mut self, input: ::std::option::Option<crate::types::ClusterNodeProvisioningMode>) -> Self {
309        self.node_provisioning_mode = input;
310        self
311    }
312    /// <p>The mode used for provisioning nodes in the cluster.</p>
313    pub fn get_node_provisioning_mode(&self) -> &::std::option::Option<crate::types::ClusterNodeProvisioningMode> {
314        &self.node_provisioning_mode
315    }
316    /// <p>The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations.</p>
317    pub fn cluster_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
318        self.cluster_role = ::std::option::Option::Some(input.into());
319        self
320    }
321    /// <p>The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations.</p>
322    pub fn set_cluster_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
323        self.cluster_role = input;
324        self
325    }
326    /// <p>The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations.</p>
327    pub fn get_cluster_role(&self) -> &::std::option::Option<::std::string::String> {
328        &self.cluster_role
329    }
330    /// <p>The current autoscaling configuration and status for the autoscaler.</p>
331    pub fn auto_scaling(mut self, input: crate::types::ClusterAutoScalingConfigOutput) -> Self {
332        self.auto_scaling = ::std::option::Option::Some(input);
333        self
334    }
335    /// <p>The current autoscaling configuration and status for the autoscaler.</p>
336    pub fn set_auto_scaling(mut self, input: ::std::option::Option<crate::types::ClusterAutoScalingConfigOutput>) -> Self {
337        self.auto_scaling = input;
338        self
339    }
340    /// <p>The current autoscaling configuration and status for the autoscaler.</p>
341    pub fn get_auto_scaling(&self) -> &::std::option::Option<crate::types::ClusterAutoScalingConfigOutput> {
342        &self.auto_scaling
343    }
344    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
345        self._request_id = Some(request_id.into());
346        self
347    }
348
349    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
350        self._request_id = request_id;
351        self
352    }
353    /// Consumes the builder and constructs a [`DescribeClusterOutput`](crate::operation::describe_cluster::DescribeClusterOutput).
354    pub fn build(self) -> crate::operation::describe_cluster::DescribeClusterOutput {
355        crate::operation::describe_cluster::DescribeClusterOutput {
356            cluster_arn: self.cluster_arn,
357            cluster_name: self.cluster_name,
358            cluster_status: self.cluster_status,
359            creation_time: self.creation_time,
360            failure_message: self.failure_message,
361            instance_groups: self.instance_groups,
362            restricted_instance_groups: self.restricted_instance_groups,
363            vpc_config: self.vpc_config,
364            orchestrator: self.orchestrator,
365            tiered_storage_config: self.tiered_storage_config,
366            node_recovery: self.node_recovery,
367            node_provisioning_mode: self.node_provisioning_mode,
368            cluster_role: self.cluster_role,
369            auto_scaling: self.auto_scaling,
370            _request_id: self._request_id,
371        }
372    }
373}