aws_sdk_sagemaker/operation/create_cluster/_create_cluster_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 CreateClusterInput {
6 /// <p>The name for the new SageMaker HyperPod cluster.</p>
7 pub cluster_name: ::std::option::Option<::std::string::String>,
8 /// <p>The instance groups to be created in the SageMaker HyperPod cluster.</p>
9 pub instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>>,
10 /// <p>Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your 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><note>
11 /// <p>When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:</p>
12 /// <ul>
13 /// <li>
14 /// <p>Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.</p></li>
15 /// <li>
16 /// <p>In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/deploy-ipv6-cluster.html#_deploy_an_ipv6_cluster_with_eksctl">Amazon EKS IPv6 Cluster Deployment</a>.</p></li>
17 /// </ul>
18 /// <p>Additional resources for IPv6 configuration:</p>
19 /// <ul>
20 /// <li>
21 /// <p>For information about adding IPv6 support to your VPC, see to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html">IPv6 Support for VPC</a>.</p></li>
22 /// <li>
23 /// <p>For information about creating a new IPv6-compatible VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html">Amazon VPC Creation Guide</a>.</p></li>
24 /// <li>
25 /// <p>To configure SageMaker HyperPod with a custom Amazon VPC, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-optional-vpc">Custom Amazon VPC Setup for SageMaker HyperPod</a>.</p></li>
26 /// </ul>
27 /// </note>
28 pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
29 /// <p>Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html">Tagging Amazon Web Services Resources User Guide</a>.</p>
30 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
31 /// <p>The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is <code>"eks"</code>, which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.</p>
32 pub orchestrator: ::std::option::Option<crate::types::ClusterOrchestrator>,
33 /// <p>The node recovery mode for the SageMaker HyperPod cluster. When set to <code>Automatic</code>, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to <code>None</code>, cluster administrators will need to manually manage any faulty cluster instances.</p>
34 pub node_recovery: ::std::option::Option<crate::types::ClusterNodeRecovery>,
35}
36impl CreateClusterInput {
37 /// <p>The name for the new SageMaker HyperPod cluster.</p>
38 pub fn cluster_name(&self) -> ::std::option::Option<&str> {
39 self.cluster_name.as_deref()
40 }
41 /// <p>The instance groups to be created in the SageMaker HyperPod cluster.</p>
42 ///
43 /// 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()`.
44 pub fn instance_groups(&self) -> &[crate::types::ClusterInstanceGroupSpecification] {
45 self.instance_groups.as_deref().unwrap_or_default()
46 }
47 /// <p>Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your 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><note>
48 /// <p>When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:</p>
49 /// <ul>
50 /// <li>
51 /// <p>Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.</p></li>
52 /// <li>
53 /// <p>In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/deploy-ipv6-cluster.html#_deploy_an_ipv6_cluster_with_eksctl">Amazon EKS IPv6 Cluster Deployment</a>.</p></li>
54 /// </ul>
55 /// <p>Additional resources for IPv6 configuration:</p>
56 /// <ul>
57 /// <li>
58 /// <p>For information about adding IPv6 support to your VPC, see to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html">IPv6 Support for VPC</a>.</p></li>
59 /// <li>
60 /// <p>For information about creating a new IPv6-compatible VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html">Amazon VPC Creation Guide</a>.</p></li>
61 /// <li>
62 /// <p>To configure SageMaker HyperPod with a custom Amazon VPC, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-optional-vpc">Custom Amazon VPC Setup for SageMaker HyperPod</a>.</p></li>
63 /// </ul>
64 /// </note>
65 pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
66 self.vpc_config.as_ref()
67 }
68 /// <p>Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html">Tagging Amazon Web Services Resources User Guide</a>.</p>
69 ///
70 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
71 pub fn tags(&self) -> &[crate::types::Tag] {
72 self.tags.as_deref().unwrap_or_default()
73 }
74 /// <p>The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is <code>"eks"</code>, which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.</p>
75 pub fn orchestrator(&self) -> ::std::option::Option<&crate::types::ClusterOrchestrator> {
76 self.orchestrator.as_ref()
77 }
78 /// <p>The node recovery mode for the SageMaker HyperPod cluster. When set to <code>Automatic</code>, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to <code>None</code>, cluster administrators will need to manually manage any faulty cluster instances.</p>
79 pub fn node_recovery(&self) -> ::std::option::Option<&crate::types::ClusterNodeRecovery> {
80 self.node_recovery.as_ref()
81 }
82}
83impl CreateClusterInput {
84 /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
85 pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
86 crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
87 }
88}
89
90/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
91#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
92#[non_exhaustive]
93pub struct CreateClusterInputBuilder {
94 pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
95 pub(crate) instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>>,
96 pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
97 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
98 pub(crate) orchestrator: ::std::option::Option<crate::types::ClusterOrchestrator>,
99 pub(crate) node_recovery: ::std::option::Option<crate::types::ClusterNodeRecovery>,
100}
101impl CreateClusterInputBuilder {
102 /// <p>The name for the new SageMaker HyperPod cluster.</p>
103 /// This field is required.
104 pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.cluster_name = ::std::option::Option::Some(input.into());
106 self
107 }
108 /// <p>The name for the new SageMaker HyperPod cluster.</p>
109 pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.cluster_name = input;
111 self
112 }
113 /// <p>The name for the new SageMaker HyperPod cluster.</p>
114 pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
115 &self.cluster_name
116 }
117 /// Appends an item to `instance_groups`.
118 ///
119 /// To override the contents of this collection use [`set_instance_groups`](Self::set_instance_groups).
120 ///
121 /// <p>The instance groups to be created in the SageMaker HyperPod cluster.</p>
122 pub fn instance_groups(mut self, input: crate::types::ClusterInstanceGroupSpecification) -> Self {
123 let mut v = self.instance_groups.unwrap_or_default();
124 v.push(input);
125 self.instance_groups = ::std::option::Option::Some(v);
126 self
127 }
128 /// <p>The instance groups to be created in the SageMaker HyperPod cluster.</p>
129 pub fn set_instance_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>>) -> Self {
130 self.instance_groups = input;
131 self
132 }
133 /// <p>The instance groups to be created in the SageMaker HyperPod cluster.</p>
134 pub fn get_instance_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>> {
135 &self.instance_groups
136 }
137 /// <p>Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your 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><note>
138 /// <p>When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:</p>
139 /// <ul>
140 /// <li>
141 /// <p>Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.</p></li>
142 /// <li>
143 /// <p>In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/deploy-ipv6-cluster.html#_deploy_an_ipv6_cluster_with_eksctl">Amazon EKS IPv6 Cluster Deployment</a>.</p></li>
144 /// </ul>
145 /// <p>Additional resources for IPv6 configuration:</p>
146 /// <ul>
147 /// <li>
148 /// <p>For information about adding IPv6 support to your VPC, see to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html">IPv6 Support for VPC</a>.</p></li>
149 /// <li>
150 /// <p>For information about creating a new IPv6-compatible VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html">Amazon VPC Creation Guide</a>.</p></li>
151 /// <li>
152 /// <p>To configure SageMaker HyperPod with a custom Amazon VPC, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-optional-vpc">Custom Amazon VPC Setup for SageMaker HyperPod</a>.</p></li>
153 /// </ul>
154 /// </note>
155 pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
156 self.vpc_config = ::std::option::Option::Some(input);
157 self
158 }
159 /// <p>Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your 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><note>
160 /// <p>When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:</p>
161 /// <ul>
162 /// <li>
163 /// <p>Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.</p></li>
164 /// <li>
165 /// <p>In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/deploy-ipv6-cluster.html#_deploy_an_ipv6_cluster_with_eksctl">Amazon EKS IPv6 Cluster Deployment</a>.</p></li>
166 /// </ul>
167 /// <p>Additional resources for IPv6 configuration:</p>
168 /// <ul>
169 /// <li>
170 /// <p>For information about adding IPv6 support to your VPC, see to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html">IPv6 Support for VPC</a>.</p></li>
171 /// <li>
172 /// <p>For information about creating a new IPv6-compatible VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html">Amazon VPC Creation Guide</a>.</p></li>
173 /// <li>
174 /// <p>To configure SageMaker HyperPod with a custom Amazon VPC, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-optional-vpc">Custom Amazon VPC Setup for SageMaker HyperPod</a>.</p></li>
175 /// </ul>
176 /// </note>
177 pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
178 self.vpc_config = input;
179 self
180 }
181 /// <p>Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your 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><note>
182 /// <p>When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:</p>
183 /// <ul>
184 /// <li>
185 /// <p>Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.</p></li>
186 /// <li>
187 /// <p>In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/deploy-ipv6-cluster.html#_deploy_an_ipv6_cluster_with_eksctl">Amazon EKS IPv6 Cluster Deployment</a>.</p></li>
188 /// </ul>
189 /// <p>Additional resources for IPv6 configuration:</p>
190 /// <ul>
191 /// <li>
192 /// <p>For information about adding IPv6 support to your VPC, see to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html">IPv6 Support for VPC</a>.</p></li>
193 /// <li>
194 /// <p>For information about creating a new IPv6-compatible VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html">Amazon VPC Creation Guide</a>.</p></li>
195 /// <li>
196 /// <p>To configure SageMaker HyperPod with a custom Amazon VPC, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-optional-vpc">Custom Amazon VPC Setup for SageMaker HyperPod</a>.</p></li>
197 /// </ul>
198 /// </note>
199 pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
200 &self.vpc_config
201 }
202 /// Appends an item to `tags`.
203 ///
204 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
205 ///
206 /// <p>Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html">Tagging Amazon Web Services Resources User Guide</a>.</p>
207 pub fn tags(mut self, input: crate::types::Tag) -> Self {
208 let mut v = self.tags.unwrap_or_default();
209 v.push(input);
210 self.tags = ::std::option::Option::Some(v);
211 self
212 }
213 /// <p>Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html">Tagging Amazon Web Services Resources User Guide</a>.</p>
214 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
215 self.tags = input;
216 self
217 }
218 /// <p>Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html">Tagging Amazon Web Services Resources User Guide</a>.</p>
219 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
220 &self.tags
221 }
222 /// <p>The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is <code>"eks"</code>, which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.</p>
223 pub fn orchestrator(mut self, input: crate::types::ClusterOrchestrator) -> Self {
224 self.orchestrator = ::std::option::Option::Some(input);
225 self
226 }
227 /// <p>The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is <code>"eks"</code>, which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.</p>
228 pub fn set_orchestrator(mut self, input: ::std::option::Option<crate::types::ClusterOrchestrator>) -> Self {
229 self.orchestrator = input;
230 self
231 }
232 /// <p>The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is <code>"eks"</code>, which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.</p>
233 pub fn get_orchestrator(&self) -> &::std::option::Option<crate::types::ClusterOrchestrator> {
234 &self.orchestrator
235 }
236 /// <p>The node recovery mode for the SageMaker HyperPod cluster. When set to <code>Automatic</code>, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to <code>None</code>, cluster administrators will need to manually manage any faulty cluster instances.</p>
237 pub fn node_recovery(mut self, input: crate::types::ClusterNodeRecovery) -> Self {
238 self.node_recovery = ::std::option::Option::Some(input);
239 self
240 }
241 /// <p>The node recovery mode for the SageMaker HyperPod cluster. When set to <code>Automatic</code>, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to <code>None</code>, cluster administrators will need to manually manage any faulty cluster instances.</p>
242 pub fn set_node_recovery(mut self, input: ::std::option::Option<crate::types::ClusterNodeRecovery>) -> Self {
243 self.node_recovery = input;
244 self
245 }
246 /// <p>The node recovery mode for the SageMaker HyperPod cluster. When set to <code>Automatic</code>, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to <code>None</code>, cluster administrators will need to manually manage any faulty cluster instances.</p>
247 pub fn get_node_recovery(&self) -> &::std::option::Option<crate::types::ClusterNodeRecovery> {
248 &self.node_recovery
249 }
250 /// Consumes the builder and constructs a [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
251 pub fn build(
252 self,
253 ) -> ::std::result::Result<crate::operation::create_cluster::CreateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
254 ::std::result::Result::Ok(crate::operation::create_cluster::CreateClusterInput {
255 cluster_name: self.cluster_name,
256 instance_groups: self.instance_groups,
257 vpc_config: self.vpc_config,
258 tags: self.tags,
259 orchestrator: self.orchestrator,
260 node_recovery: self.node_recovery,
261 })
262 }
263}