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