aws_sdk_eks/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 unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the cluster in.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The desired Kubernetes version for your cluster. If you don't specify a value here, the default version available in Amazon EKS is used.</p><note>
9    /// <p>The default version might not be the latest version available.</p>
10    /// </note>
11    pub version: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to Amazon Web Services API operations on your behalf. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html">Amazon EKS Service IAM Role</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">Cluster VPC Considerations</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Cluster Security Group Considerations</a> in the <i>Amazon EKS User Guide</i>. You must specify at least two subnets. You can specify up to five security groups. However, we recommend that you use a dedicated security group for your cluster control plane.</p>
15    pub resources_vpc_config: ::std::option::Option<crate::types::VpcConfigRequest>,
16    /// <p>The Kubernetes network configuration for the cluster.</p>
17    pub kubernetes_network_config: ::std::option::Option<crate::types::KubernetesNetworkConfigRequest>,
18    /// <p>Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS Cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p><note>
19    /// <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p>
20    /// </note>
21    pub logging: ::std::option::Option<crate::types::Logging>,
22    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
23    pub client_request_token: ::std::option::Option<::std::string::String>,
24    /// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
25    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26    /// <p>The encryption configuration for the cluster.</p>
27    pub encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
28    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. Before creating a local cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html">Local clusters for Amazon EKS on Amazon Web Services Outposts</a> in the <i>Amazon EKS User Guide</i>. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.</p>
29    pub outpost_config: ::std::option::Option<crate::types::OutpostConfigRequest>,
30    /// <p>The access configuration for the cluster.</p>
31    pub access_config: ::std::option::Option<crate::types::CreateAccessConfigRequest>,
32    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
33    /// <p>The default networking add-ons include <code>vpc-cni</code>, <code>coredns</code>, and <code>kube-proxy</code>.</p>
34    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
35    pub bootstrap_self_managed_addons: ::std::option::Option<bool>,
36    /// <p>New clusters, by default, have extended support enabled. You can disable extended support when creating a cluster by setting this value to <code>STANDARD</code>.</p>
37    pub upgrade_policy: ::std::option::Option<crate::types::UpgradePolicyRequest>,
38    /// <p>Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p>
39    /// <p>Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.</p>
40    /// <p>You can start a zonal shift for an Amazon EKS cluster, or you can allow Amazon Web Services to do it for you by enabling <i>zonal autoshift</i>. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your Amazon EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html">Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
41    pub zonal_shift_config: ::std::option::Option<crate::types::ZonalShiftConfigRequest>,
42    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
43    pub remote_network_config: ::std::option::Option<crate::types::RemoteNetworkConfigRequest>,
44    /// <p>Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account</p>
45    pub compute_config: ::std::option::Option<crate::types::ComputeConfigRequest>,
46    /// <p>Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account.</p>
47    pub storage_config: ::std::option::Option<crate::types::StorageConfigRequest>,
48    /// <p>Indicates whether to enable deletion protection for the cluster. When enabled, the cluster cannot be deleted unless deletion protection is first disabled. This helps prevent accidental cluster deletion. Default value is <code>false</code>.</p>
49    pub deletion_protection: ::std::option::Option<bool>,
50}
51impl CreateClusterInput {
52    /// <p>The unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the cluster in.</p>
53    pub fn name(&self) -> ::std::option::Option<&str> {
54        self.name.as_deref()
55    }
56    /// <p>The desired Kubernetes version for your cluster. If you don't specify a value here, the default version available in Amazon EKS is used.</p><note>
57    /// <p>The default version might not be the latest version available.</p>
58    /// </note>
59    pub fn version(&self) -> ::std::option::Option<&str> {
60        self.version.as_deref()
61    }
62    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to Amazon Web Services API operations on your behalf. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html">Amazon EKS Service IAM Role</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
63    pub fn role_arn(&self) -> ::std::option::Option<&str> {
64        self.role_arn.as_deref()
65    }
66    /// <p>The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">Cluster VPC Considerations</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Cluster Security Group Considerations</a> in the <i>Amazon EKS User Guide</i>. You must specify at least two subnets. You can specify up to five security groups. However, we recommend that you use a dedicated security group for your cluster control plane.</p>
67    pub fn resources_vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfigRequest> {
68        self.resources_vpc_config.as_ref()
69    }
70    /// <p>The Kubernetes network configuration for the cluster.</p>
71    pub fn kubernetes_network_config(&self) -> ::std::option::Option<&crate::types::KubernetesNetworkConfigRequest> {
72        self.kubernetes_network_config.as_ref()
73    }
74    /// <p>Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS Cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p><note>
75    /// <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p>
76    /// </note>
77    pub fn logging(&self) -> ::std::option::Option<&crate::types::Logging> {
78        self.logging.as_ref()
79    }
80    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
81    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
82        self.client_request_token.as_deref()
83    }
84    /// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
85    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
86        self.tags.as_ref()
87    }
88    /// <p>The encryption configuration for the cluster.</p>
89    ///
90    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.encryption_config.is_none()`.
91    pub fn encryption_config(&self) -> &[crate::types::EncryptionConfig] {
92        self.encryption_config.as_deref().unwrap_or_default()
93    }
94    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. Before creating a local cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html">Local clusters for Amazon EKS on Amazon Web Services Outposts</a> in the <i>Amazon EKS User Guide</i>. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.</p>
95    pub fn outpost_config(&self) -> ::std::option::Option<&crate::types::OutpostConfigRequest> {
96        self.outpost_config.as_ref()
97    }
98    /// <p>The access configuration for the cluster.</p>
99    pub fn access_config(&self) -> ::std::option::Option<&crate::types::CreateAccessConfigRequest> {
100        self.access_config.as_ref()
101    }
102    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
103    /// <p>The default networking add-ons include <code>vpc-cni</code>, <code>coredns</code>, and <code>kube-proxy</code>.</p>
104    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
105    pub fn bootstrap_self_managed_addons(&self) -> ::std::option::Option<bool> {
106        self.bootstrap_self_managed_addons
107    }
108    /// <p>New clusters, by default, have extended support enabled. You can disable extended support when creating a cluster by setting this value to <code>STANDARD</code>.</p>
109    pub fn upgrade_policy(&self) -> ::std::option::Option<&crate::types::UpgradePolicyRequest> {
110        self.upgrade_policy.as_ref()
111    }
112    /// <p>Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p>
113    /// <p>Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.</p>
114    /// <p>You can start a zonal shift for an Amazon EKS cluster, or you can allow Amazon Web Services to do it for you by enabling <i>zonal autoshift</i>. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your Amazon EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html">Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
115    pub fn zonal_shift_config(&self) -> ::std::option::Option<&crate::types::ZonalShiftConfigRequest> {
116        self.zonal_shift_config.as_ref()
117    }
118    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
119    pub fn remote_network_config(&self) -> ::std::option::Option<&crate::types::RemoteNetworkConfigRequest> {
120        self.remote_network_config.as_ref()
121    }
122    /// <p>Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account</p>
123    pub fn compute_config(&self) -> ::std::option::Option<&crate::types::ComputeConfigRequest> {
124        self.compute_config.as_ref()
125    }
126    /// <p>Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account.</p>
127    pub fn storage_config(&self) -> ::std::option::Option<&crate::types::StorageConfigRequest> {
128        self.storage_config.as_ref()
129    }
130    /// <p>Indicates whether to enable deletion protection for the cluster. When enabled, the cluster cannot be deleted unless deletion protection is first disabled. This helps prevent accidental cluster deletion. Default value is <code>false</code>.</p>
131    pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
132        self.deletion_protection
133    }
134}
135impl CreateClusterInput {
136    /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
137    pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
138        crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
139    }
140}
141
142/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
143#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
144#[non_exhaustive]
145pub struct CreateClusterInputBuilder {
146    pub(crate) name: ::std::option::Option<::std::string::String>,
147    pub(crate) version: ::std::option::Option<::std::string::String>,
148    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
149    pub(crate) resources_vpc_config: ::std::option::Option<crate::types::VpcConfigRequest>,
150    pub(crate) kubernetes_network_config: ::std::option::Option<crate::types::KubernetesNetworkConfigRequest>,
151    pub(crate) logging: ::std::option::Option<crate::types::Logging>,
152    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
153    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
154    pub(crate) encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
155    pub(crate) outpost_config: ::std::option::Option<crate::types::OutpostConfigRequest>,
156    pub(crate) access_config: ::std::option::Option<crate::types::CreateAccessConfigRequest>,
157    pub(crate) bootstrap_self_managed_addons: ::std::option::Option<bool>,
158    pub(crate) upgrade_policy: ::std::option::Option<crate::types::UpgradePolicyRequest>,
159    pub(crate) zonal_shift_config: ::std::option::Option<crate::types::ZonalShiftConfigRequest>,
160    pub(crate) remote_network_config: ::std::option::Option<crate::types::RemoteNetworkConfigRequest>,
161    pub(crate) compute_config: ::std::option::Option<crate::types::ComputeConfigRequest>,
162    pub(crate) storage_config: ::std::option::Option<crate::types::StorageConfigRequest>,
163    pub(crate) deletion_protection: ::std::option::Option<bool>,
164}
165impl CreateClusterInputBuilder {
166    /// <p>The unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the cluster in.</p>
167    /// This field is required.
168    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169        self.name = ::std::option::Option::Some(input.into());
170        self
171    }
172    /// <p>The unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the cluster in.</p>
173    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174        self.name = input;
175        self
176    }
177    /// <p>The unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the cluster in.</p>
178    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
179        &self.name
180    }
181    /// <p>The desired Kubernetes version for your cluster. If you don't specify a value here, the default version available in Amazon EKS is used.</p><note>
182    /// <p>The default version might not be the latest version available.</p>
183    /// </note>
184    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.version = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The desired Kubernetes version for your cluster. If you don't specify a value here, the default version available in Amazon EKS is used.</p><note>
189    /// <p>The default version might not be the latest version available.</p>
190    /// </note>
191    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.version = input;
193        self
194    }
195    /// <p>The desired Kubernetes version for your cluster. If you don't specify a value here, the default version available in Amazon EKS is used.</p><note>
196    /// <p>The default version might not be the latest version available.</p>
197    /// </note>
198    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
199        &self.version
200    }
201    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to Amazon Web Services API operations on your behalf. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html">Amazon EKS Service IAM Role</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
202    /// This field is required.
203    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204        self.role_arn = ::std::option::Option::Some(input.into());
205        self
206    }
207    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to Amazon Web Services API operations on your behalf. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html">Amazon EKS Service IAM Role</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
208    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209        self.role_arn = input;
210        self
211    }
212    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to Amazon Web Services API operations on your behalf. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html">Amazon EKS Service IAM Role</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
213    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
214        &self.role_arn
215    }
216    /// <p>The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">Cluster VPC Considerations</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Cluster Security Group Considerations</a> in the <i>Amazon EKS User Guide</i>. You must specify at least two subnets. You can specify up to five security groups. However, we recommend that you use a dedicated security group for your cluster control plane.</p>
217    /// This field is required.
218    pub fn resources_vpc_config(mut self, input: crate::types::VpcConfigRequest) -> Self {
219        self.resources_vpc_config = ::std::option::Option::Some(input);
220        self
221    }
222    /// <p>The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">Cluster VPC Considerations</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Cluster Security Group Considerations</a> in the <i>Amazon EKS User Guide</i>. You must specify at least two subnets. You can specify up to five security groups. However, we recommend that you use a dedicated security group for your cluster control plane.</p>
223    pub fn set_resources_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfigRequest>) -> Self {
224        self.resources_vpc_config = input;
225        self
226    }
227    /// <p>The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">Cluster VPC Considerations</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html">Cluster Security Group Considerations</a> in the <i>Amazon EKS User Guide</i>. You must specify at least two subnets. You can specify up to five security groups. However, we recommend that you use a dedicated security group for your cluster control plane.</p>
228    pub fn get_resources_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfigRequest> {
229        &self.resources_vpc_config
230    }
231    /// <p>The Kubernetes network configuration for the cluster.</p>
232    pub fn kubernetes_network_config(mut self, input: crate::types::KubernetesNetworkConfigRequest) -> Self {
233        self.kubernetes_network_config = ::std::option::Option::Some(input);
234        self
235    }
236    /// <p>The Kubernetes network configuration for the cluster.</p>
237    pub fn set_kubernetes_network_config(mut self, input: ::std::option::Option<crate::types::KubernetesNetworkConfigRequest>) -> Self {
238        self.kubernetes_network_config = input;
239        self
240    }
241    /// <p>The Kubernetes network configuration for the cluster.</p>
242    pub fn get_kubernetes_network_config(&self) -> &::std::option::Option<crate::types::KubernetesNetworkConfigRequest> {
243        &self.kubernetes_network_config
244    }
245    /// <p>Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS Cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p><note>
246    /// <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p>
247    /// </note>
248    pub fn logging(mut self, input: crate::types::Logging) -> Self {
249        self.logging = ::std::option::Option::Some(input);
250        self
251    }
252    /// <p>Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS Cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p><note>
253    /// <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p>
254    /// </note>
255    pub fn set_logging(mut self, input: ::std::option::Option<crate::types::Logging>) -> Self {
256        self.logging = input;
257        self
258    }
259    /// <p>Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs . By default, cluster control plane logs aren't exported to CloudWatch Logs . For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html">Amazon EKS Cluster control plane logs</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p><note>
260    /// <p>CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see <a href="http://aws.amazon.com/cloudwatch/pricing/">CloudWatch Pricing</a>.</p>
261    /// </note>
262    pub fn get_logging(&self) -> &::std::option::Option<crate::types::Logging> {
263        &self.logging
264    }
265    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
266    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267        self.client_request_token = ::std::option::Option::Some(input.into());
268        self
269    }
270    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
271    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.client_request_token = input;
273        self
274    }
275    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
276    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
277        &self.client_request_token
278    }
279    /// Adds a key-value pair to `tags`.
280    ///
281    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
282    ///
283    /// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
284    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
285        let mut hash_map = self.tags.unwrap_or_default();
286        hash_map.insert(k.into(), v.into());
287        self.tags = ::std::option::Option::Some(hash_map);
288        self
289    }
290    /// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
291    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
292        self.tags = input;
293        self
294    }
295    /// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
296    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
297        &self.tags
298    }
299    /// Appends an item to `encryption_config`.
300    ///
301    /// To override the contents of this collection use [`set_encryption_config`](Self::set_encryption_config).
302    ///
303    /// <p>The encryption configuration for the cluster.</p>
304    pub fn encryption_config(mut self, input: crate::types::EncryptionConfig) -> Self {
305        let mut v = self.encryption_config.unwrap_or_default();
306        v.push(input);
307        self.encryption_config = ::std::option::Option::Some(v);
308        self
309    }
310    /// <p>The encryption configuration for the cluster.</p>
311    pub fn set_encryption_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>) -> Self {
312        self.encryption_config = input;
313        self
314    }
315    /// <p>The encryption configuration for the cluster.</p>
316    pub fn get_encryption_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>> {
317        &self.encryption_config
318    }
319    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. Before creating a local cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html">Local clusters for Amazon EKS on Amazon Web Services Outposts</a> in the <i>Amazon EKS User Guide</i>. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.</p>
320    pub fn outpost_config(mut self, input: crate::types::OutpostConfigRequest) -> Self {
321        self.outpost_config = ::std::option::Option::Some(input);
322        self
323    }
324    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. Before creating a local cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html">Local clusters for Amazon EKS on Amazon Web Services Outposts</a> in the <i>Amazon EKS User Guide</i>. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.</p>
325    pub fn set_outpost_config(mut self, input: ::std::option::Option<crate::types::OutpostConfigRequest>) -> Self {
326        self.outpost_config = input;
327        self
328    }
329    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. Before creating a local cluster on an Outpost, review <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html">Local clusters for Amazon EKS on Amazon Web Services Outposts</a> in the <i>Amazon EKS User Guide</i>. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.</p>
330    pub fn get_outpost_config(&self) -> &::std::option::Option<crate::types::OutpostConfigRequest> {
331        &self.outpost_config
332    }
333    /// <p>The access configuration for the cluster.</p>
334    pub fn access_config(mut self, input: crate::types::CreateAccessConfigRequest) -> Self {
335        self.access_config = ::std::option::Option::Some(input);
336        self
337    }
338    /// <p>The access configuration for the cluster.</p>
339    pub fn set_access_config(mut self, input: ::std::option::Option<crate::types::CreateAccessConfigRequest>) -> Self {
340        self.access_config = input;
341        self
342    }
343    /// <p>The access configuration for the cluster.</p>
344    pub fn get_access_config(&self) -> &::std::option::Option<crate::types::CreateAccessConfigRequest> {
345        &self.access_config
346    }
347    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
348    /// <p>The default networking add-ons include <code>vpc-cni</code>, <code>coredns</code>, and <code>kube-proxy</code>.</p>
349    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
350    pub fn bootstrap_self_managed_addons(mut self, input: bool) -> Self {
351        self.bootstrap_self_managed_addons = ::std::option::Option::Some(input);
352        self
353    }
354    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
355    /// <p>The default networking add-ons include <code>vpc-cni</code>, <code>coredns</code>, and <code>kube-proxy</code>.</p>
356    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
357    pub fn set_bootstrap_self_managed_addons(mut self, input: ::std::option::Option<bool>) -> Self {
358        self.bootstrap_self_managed_addons = input;
359        self
360    }
361    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
362    /// <p>The default networking add-ons include <code>vpc-cni</code>, <code>coredns</code>, and <code>kube-proxy</code>.</p>
363    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
364    pub fn get_bootstrap_self_managed_addons(&self) -> &::std::option::Option<bool> {
365        &self.bootstrap_self_managed_addons
366    }
367    /// <p>New clusters, by default, have extended support enabled. You can disable extended support when creating a cluster by setting this value to <code>STANDARD</code>.</p>
368    pub fn upgrade_policy(mut self, input: crate::types::UpgradePolicyRequest) -> Self {
369        self.upgrade_policy = ::std::option::Option::Some(input);
370        self
371    }
372    /// <p>New clusters, by default, have extended support enabled. You can disable extended support when creating a cluster by setting this value to <code>STANDARD</code>.</p>
373    pub fn set_upgrade_policy(mut self, input: ::std::option::Option<crate::types::UpgradePolicyRequest>) -> Self {
374        self.upgrade_policy = input;
375        self
376    }
377    /// <p>New clusters, by default, have extended support enabled. You can disable extended support when creating a cluster by setting this value to <code>STANDARD</code>.</p>
378    pub fn get_upgrade_policy(&self) -> &::std::option::Option<crate::types::UpgradePolicyRequest> {
379        &self.upgrade_policy
380    }
381    /// <p>Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p>
382    /// <p>Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.</p>
383    /// <p>You can start a zonal shift for an Amazon EKS cluster, or you can allow Amazon Web Services to do it for you by enabling <i>zonal autoshift</i>. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your Amazon EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html">Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
384    pub fn zonal_shift_config(mut self, input: crate::types::ZonalShiftConfigRequest) -> Self {
385        self.zonal_shift_config = ::std::option::Option::Some(input);
386        self
387    }
388    /// <p>Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p>
389    /// <p>Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.</p>
390    /// <p>You can start a zonal shift for an Amazon EKS cluster, or you can allow Amazon Web Services to do it for you by enabling <i>zonal autoshift</i>. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your Amazon EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html">Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
391    pub fn set_zonal_shift_config(mut self, input: ::std::option::Option<crate::types::ZonalShiftConfigRequest>) -> Self {
392        self.zonal_shift_config = input;
393        self
394    }
395    /// <p>Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p>
396    /// <p>Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.</p>
397    /// <p>You can start a zonal shift for an Amazon EKS cluster, or you can allow Amazon Web Services to do it for you by enabling <i>zonal autoshift</i>. This shift updates the flow of east-to-west network traffic in your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling ingress traffic for applications in your Amazon EKS cluster will automatically route traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html">Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
398    pub fn get_zonal_shift_config(&self) -> &::std::option::Option<crate::types::ZonalShiftConfigRequest> {
399        &self.zonal_shift_config
400    }
401    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
402    pub fn remote_network_config(mut self, input: crate::types::RemoteNetworkConfigRequest) -> Self {
403        self.remote_network_config = ::std::option::Option::Some(input);
404        self
405    }
406    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
407    pub fn set_remote_network_config(mut self, input: ::std::option::Option<crate::types::RemoteNetworkConfigRequest>) -> Self {
408        self.remote_network_config = input;
409        self
410    }
411    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
412    pub fn get_remote_network_config(&self) -> &::std::option::Option<crate::types::RemoteNetworkConfigRequest> {
413        &self.remote_network_config
414    }
415    /// <p>Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account</p>
416    pub fn compute_config(mut self, input: crate::types::ComputeConfigRequest) -> Self {
417        self.compute_config = ::std::option::Option::Some(input);
418        self
419    }
420    /// <p>Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account</p>
421    pub fn set_compute_config(mut self, input: ::std::option::Option<crate::types::ComputeConfigRequest>) -> Self {
422        self.compute_config = input;
423        self
424    }
425    /// <p>Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account</p>
426    pub fn get_compute_config(&self) -> &::std::option::Option<crate::types::ComputeConfigRequest> {
427        &self.compute_config
428    }
429    /// <p>Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account.</p>
430    pub fn storage_config(mut self, input: crate::types::StorageConfigRequest) -> Self {
431        self.storage_config = ::std::option::Option::Some(input);
432        self
433    }
434    /// <p>Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account.</p>
435    pub fn set_storage_config(mut self, input: ::std::option::Option<crate::types::StorageConfigRequest>) -> Self {
436        self.storage_config = input;
437        self
438    }
439    /// <p>Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account.</p>
440    pub fn get_storage_config(&self) -> &::std::option::Option<crate::types::StorageConfigRequest> {
441        &self.storage_config
442    }
443    /// <p>Indicates whether to enable deletion protection for the cluster. When enabled, the cluster cannot be deleted unless deletion protection is first disabled. This helps prevent accidental cluster deletion. Default value is <code>false</code>.</p>
444    pub fn deletion_protection(mut self, input: bool) -> Self {
445        self.deletion_protection = ::std::option::Option::Some(input);
446        self
447    }
448    /// <p>Indicates whether to enable deletion protection for the cluster. When enabled, the cluster cannot be deleted unless deletion protection is first disabled. This helps prevent accidental cluster deletion. Default value is <code>false</code>.</p>
449    pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
450        self.deletion_protection = input;
451        self
452    }
453    /// <p>Indicates whether to enable deletion protection for the cluster. When enabled, the cluster cannot be deleted unless deletion protection is first disabled. This helps prevent accidental cluster deletion. Default value is <code>false</code>.</p>
454    pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
455        &self.deletion_protection
456    }
457    /// Consumes the builder and constructs a [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
458    pub fn build(
459        self,
460    ) -> ::std::result::Result<crate::operation::create_cluster::CreateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
461        ::std::result::Result::Ok(crate::operation::create_cluster::CreateClusterInput {
462            name: self.name,
463            version: self.version,
464            role_arn: self.role_arn,
465            resources_vpc_config: self.resources_vpc_config,
466            kubernetes_network_config: self.kubernetes_network_config,
467            logging: self.logging,
468            client_request_token: self.client_request_token,
469            tags: self.tags,
470            encryption_config: self.encryption_config,
471            outpost_config: self.outpost_config,
472            access_config: self.access_config,
473            bootstrap_self_managed_addons: self.bootstrap_self_managed_addons,
474            upgrade_policy: self.upgrade_policy,
475            zonal_shift_config: self.zonal_shift_config,
476            remote_network_config: self.remote_network_config,
477            compute_config: self.compute_config,
478            storage_config: self.storage_config,
479            deletion_protection: self.deletion_protection,
480        })
481    }
482}