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>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>
19    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
20    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
21    pub orchestrator: ::std::option::Option<crate::types::ClusterOrchestrator>,
22    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
23    pub node_recovery: ::std::option::Option<crate::types::ClusterNodeRecovery>,
24    _request_id: Option<String>,
25}
26impl DescribeClusterOutput {
27    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
28    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
29        self.cluster_arn.as_deref()
30    }
31    /// <p>The name of the SageMaker HyperPod cluster.</p>
32    pub fn cluster_name(&self) -> ::std::option::Option<&str> {
33        self.cluster_name.as_deref()
34    }
35    /// <p>The status of the SageMaker HyperPod cluster.</p>
36    pub fn cluster_status(&self) -> ::std::option::Option<&crate::types::ClusterStatus> {
37        self.cluster_status.as_ref()
38    }
39    /// <p>The time when the SageMaker Cluster is created.</p>
40    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
41        self.creation_time.as_ref()
42    }
43    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
44    pub fn failure_message(&self) -> ::std::option::Option<&str> {
45        self.failure_message.as_deref()
46    }
47    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
48    ///
49    /// 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()`.
50    pub fn instance_groups(&self) -> &[crate::types::ClusterInstanceGroupDetails] {
51        self.instance_groups.as_deref().unwrap_or_default()
52    }
53    /// <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>
54    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
55        self.vpc_config.as_ref()
56    }
57    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
58    pub fn orchestrator(&self) -> ::std::option::Option<&crate::types::ClusterOrchestrator> {
59        self.orchestrator.as_ref()
60    }
61    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
62    pub fn node_recovery(&self) -> ::std::option::Option<&crate::types::ClusterNodeRecovery> {
63        self.node_recovery.as_ref()
64    }
65}
66impl ::aws_types::request_id::RequestId for DescribeClusterOutput {
67    fn request_id(&self) -> Option<&str> {
68        self._request_id.as_deref()
69    }
70}
71impl DescribeClusterOutput {
72    /// Creates a new builder-style object to manufacture [`DescribeClusterOutput`](crate::operation::describe_cluster::DescribeClusterOutput).
73    pub fn builder() -> crate::operation::describe_cluster::builders::DescribeClusterOutputBuilder {
74        crate::operation::describe_cluster::builders::DescribeClusterOutputBuilder::default()
75    }
76}
77
78/// A builder for [`DescribeClusterOutput`](crate::operation::describe_cluster::DescribeClusterOutput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct DescribeClusterOutputBuilder {
82    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
83    pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
84    pub(crate) cluster_status: ::std::option::Option<crate::types::ClusterStatus>,
85    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
86    pub(crate) failure_message: ::std::option::Option<::std::string::String>,
87    pub(crate) instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>>,
88    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
89    pub(crate) orchestrator: ::std::option::Option<crate::types::ClusterOrchestrator>,
90    pub(crate) node_recovery: ::std::option::Option<crate::types::ClusterNodeRecovery>,
91    _request_id: Option<String>,
92}
93impl DescribeClusterOutputBuilder {
94    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
95    /// This field is required.
96    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.cluster_arn = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
101    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.cluster_arn = input;
103        self
104    }
105    /// <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.</p>
106    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
107        &self.cluster_arn
108    }
109    /// <p>The name of the SageMaker HyperPod cluster.</p>
110    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.cluster_name = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The name of the SageMaker HyperPod cluster.</p>
115    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.cluster_name = input;
117        self
118    }
119    /// <p>The name of the SageMaker HyperPod cluster.</p>
120    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
121        &self.cluster_name
122    }
123    /// <p>The status of the SageMaker HyperPod cluster.</p>
124    /// This field is required.
125    pub fn cluster_status(mut self, input: crate::types::ClusterStatus) -> Self {
126        self.cluster_status = ::std::option::Option::Some(input);
127        self
128    }
129    /// <p>The status of the SageMaker HyperPod cluster.</p>
130    pub fn set_cluster_status(mut self, input: ::std::option::Option<crate::types::ClusterStatus>) -> Self {
131        self.cluster_status = input;
132        self
133    }
134    /// <p>The status of the SageMaker HyperPod cluster.</p>
135    pub fn get_cluster_status(&self) -> &::std::option::Option<crate::types::ClusterStatus> {
136        &self.cluster_status
137    }
138    /// <p>The time when the SageMaker Cluster is created.</p>
139    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
140        self.creation_time = ::std::option::Option::Some(input);
141        self
142    }
143    /// <p>The time when the SageMaker Cluster is created.</p>
144    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
145        self.creation_time = input;
146        self
147    }
148    /// <p>The time when the SageMaker Cluster is created.</p>
149    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
150        &self.creation_time
151    }
152    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
153    pub fn failure_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.failure_message = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
158    pub fn set_failure_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.failure_message = input;
160        self
161    }
162    /// <p>The failure message of the SageMaker HyperPod cluster.</p>
163    pub fn get_failure_message(&self) -> &::std::option::Option<::std::string::String> {
164        &self.failure_message
165    }
166    /// Appends an item to `instance_groups`.
167    ///
168    /// To override the contents of this collection use [`set_instance_groups`](Self::set_instance_groups).
169    ///
170    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
171    pub fn instance_groups(mut self, input: crate::types::ClusterInstanceGroupDetails) -> Self {
172        let mut v = self.instance_groups.unwrap_or_default();
173        v.push(input);
174        self.instance_groups = ::std::option::Option::Some(v);
175        self
176    }
177    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
178    pub fn set_instance_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>>) -> Self {
179        self.instance_groups = input;
180        self
181    }
182    /// <p>The instance groups of the SageMaker HyperPod cluster.</p>
183    pub fn get_instance_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupDetails>> {
184        &self.instance_groups
185    }
186    /// <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>
187    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
188        self.vpc_config = ::std::option::Option::Some(input);
189        self
190    }
191    /// <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>
192    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
193        self.vpc_config = input;
194        self
195    }
196    /// <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>
197    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
198        &self.vpc_config
199    }
200    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
201    pub fn orchestrator(mut self, input: crate::types::ClusterOrchestrator) -> Self {
202        self.orchestrator = ::std::option::Option::Some(input);
203        self
204    }
205    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
206    pub fn set_orchestrator(mut self, input: ::std::option::Option<crate::types::ClusterOrchestrator>) -> Self {
207        self.orchestrator = input;
208        self
209    }
210    /// <p>The type of orchestrator used for the SageMaker HyperPod cluster.</p>
211    pub fn get_orchestrator(&self) -> &::std::option::Option<crate::types::ClusterOrchestrator> {
212        &self.orchestrator
213    }
214    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
215    pub fn node_recovery(mut self, input: crate::types::ClusterNodeRecovery) -> Self {
216        self.node_recovery = ::std::option::Option::Some(input);
217        self
218    }
219    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
220    pub fn set_node_recovery(mut self, input: ::std::option::Option<crate::types::ClusterNodeRecovery>) -> Self {
221        self.node_recovery = input;
222        self
223    }
224    /// <p>The node recovery mode configured for the SageMaker HyperPod cluster.</p>
225    pub fn get_node_recovery(&self) -> &::std::option::Option<crate::types::ClusterNodeRecovery> {
226        &self.node_recovery
227    }
228    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
229        self._request_id = Some(request_id.into());
230        self
231    }
232
233    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
234        self._request_id = request_id;
235        self
236    }
237    /// Consumes the builder and constructs a [`DescribeClusterOutput`](crate::operation::describe_cluster::DescribeClusterOutput).
238    pub fn build(self) -> crate::operation::describe_cluster::DescribeClusterOutput {
239        crate::operation::describe_cluster::DescribeClusterOutput {
240            cluster_arn: self.cluster_arn,
241            cluster_name: self.cluster_name,
242            cluster_status: self.cluster_status,
243            creation_time: self.creation_time,
244            failure_message: self.failure_message,
245            instance_groups: self.instance_groups,
246            vpc_config: self.vpc_config,
247            orchestrator: self.orchestrator,
248            node_recovery: self.node_recovery,
249            _request_id: self._request_id,
250        }
251    }
252}