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 addons include vpc-cni, coredns, and kube-proxy.</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't change or update 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}
49impl CreateClusterInput {
50    /// <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>
51    pub fn name(&self) -> ::std::option::Option<&str> {
52        self.name.as_deref()
53    }
54    /// <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>
55    /// <p>The default version might not be the latest version available.</p>
56    /// </note>
57    pub fn version(&self) -> ::std::option::Option<&str> {
58        self.version.as_deref()
59    }
60    /// <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>
61    pub fn role_arn(&self) -> ::std::option::Option<&str> {
62        self.role_arn.as_deref()
63    }
64    /// <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>
65    pub fn resources_vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfigRequest> {
66        self.resources_vpc_config.as_ref()
67    }
68    /// <p>The Kubernetes network configuration for the cluster.</p>
69    pub fn kubernetes_network_config(&self) -> ::std::option::Option<&crate::types::KubernetesNetworkConfigRequest> {
70        self.kubernetes_network_config.as_ref()
71    }
72    /// <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>
73    /// <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>
74    /// </note>
75    pub fn logging(&self) -> ::std::option::Option<&crate::types::Logging> {
76        self.logging.as_ref()
77    }
78    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
79    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
80        self.client_request_token.as_deref()
81    }
82    /// <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>
83    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
84        self.tags.as_ref()
85    }
86    /// <p>The encryption configuration for the cluster.</p>
87    ///
88    /// 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()`.
89    pub fn encryption_config(&self) -> &[crate::types::EncryptionConfig] {
90        self.encryption_config.as_deref().unwrap_or_default()
91    }
92    /// <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>
93    pub fn outpost_config(&self) -> ::std::option::Option<&crate::types::OutpostConfigRequest> {
94        self.outpost_config.as_ref()
95    }
96    /// <p>The access configuration for the cluster.</p>
97    pub fn access_config(&self) -> ::std::option::Option<&crate::types::CreateAccessConfigRequest> {
98        self.access_config.as_ref()
99    }
100    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
101    /// <p>The default networking addons include vpc-cni, coredns, and kube-proxy.</p>
102    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
103    pub fn bootstrap_self_managed_addons(&self) -> ::std::option::Option<bool> {
104        self.bootstrap_self_managed_addons
105    }
106    /// <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>
107    pub fn upgrade_policy(&self) -> ::std::option::Option<&crate::types::UpgradePolicyRequest> {
108        self.upgrade_policy.as_ref()
109    }
110    /// <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>
111    /// <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>
112    /// <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>
113    pub fn zonal_shift_config(&self) -> ::std::option::Option<&crate::types::ZonalShiftConfigRequest> {
114        self.zonal_shift_config.as_ref()
115    }
116    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after the cluster is created.</p>
117    pub fn remote_network_config(&self) -> ::std::option::Option<&crate::types::RemoteNetworkConfigRequest> {
118        self.remote_network_config.as_ref()
119    }
120    /// <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>
121    pub fn compute_config(&self) -> ::std::option::Option<&crate::types::ComputeConfigRequest> {
122        self.compute_config.as_ref()
123    }
124    /// <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>
125    pub fn storage_config(&self) -> ::std::option::Option<&crate::types::StorageConfigRequest> {
126        self.storage_config.as_ref()
127    }
128}
129impl CreateClusterInput {
130    /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
131    pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
132        crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
133    }
134}
135
136/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
137#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
138#[non_exhaustive]
139pub struct CreateClusterInputBuilder {
140    pub(crate) name: ::std::option::Option<::std::string::String>,
141    pub(crate) version: ::std::option::Option<::std::string::String>,
142    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
143    pub(crate) resources_vpc_config: ::std::option::Option<crate::types::VpcConfigRequest>,
144    pub(crate) kubernetes_network_config: ::std::option::Option<crate::types::KubernetesNetworkConfigRequest>,
145    pub(crate) logging: ::std::option::Option<crate::types::Logging>,
146    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
147    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
148    pub(crate) encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
149    pub(crate) outpost_config: ::std::option::Option<crate::types::OutpostConfigRequest>,
150    pub(crate) access_config: ::std::option::Option<crate::types::CreateAccessConfigRequest>,
151    pub(crate) bootstrap_self_managed_addons: ::std::option::Option<bool>,
152    pub(crate) upgrade_policy: ::std::option::Option<crate::types::UpgradePolicyRequest>,
153    pub(crate) zonal_shift_config: ::std::option::Option<crate::types::ZonalShiftConfigRequest>,
154    pub(crate) remote_network_config: ::std::option::Option<crate::types::RemoteNetworkConfigRequest>,
155    pub(crate) compute_config: ::std::option::Option<crate::types::ComputeConfigRequest>,
156    pub(crate) storage_config: ::std::option::Option<crate::types::StorageConfigRequest>,
157}
158impl CreateClusterInputBuilder {
159    /// <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>
160    /// This field is required.
161    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.name = ::std::option::Option::Some(input.into());
163        self
164    }
165    /// <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>
166    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.name = input;
168        self
169    }
170    /// <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>
171    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
172        &self.name
173    }
174    /// <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>
175    /// <p>The default version might not be the latest version available.</p>
176    /// </note>
177    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.version = ::std::option::Option::Some(input.into());
179        self
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 set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.version = input;
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 get_version(&self) -> &::std::option::Option<::std::string::String> {
192        &self.version
193    }
194    /// <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>
195    /// This field is required.
196    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.role_arn = ::std::option::Option::Some(input.into());
198        self
199    }
200    /// <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>
201    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202        self.role_arn = input;
203        self
204    }
205    /// <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>
206    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
207        &self.role_arn
208    }
209    /// <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>
210    /// This field is required.
211    pub fn resources_vpc_config(mut self, input: crate::types::VpcConfigRequest) -> Self {
212        self.resources_vpc_config = ::std::option::Option::Some(input);
213        self
214    }
215    /// <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>
216    pub fn set_resources_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfigRequest>) -> Self {
217        self.resources_vpc_config = input;
218        self
219    }
220    /// <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>
221    pub fn get_resources_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfigRequest> {
222        &self.resources_vpc_config
223    }
224    /// <p>The Kubernetes network configuration for the cluster.</p>
225    pub fn kubernetes_network_config(mut self, input: crate::types::KubernetesNetworkConfigRequest) -> Self {
226        self.kubernetes_network_config = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>The Kubernetes network configuration for the cluster.</p>
230    pub fn set_kubernetes_network_config(mut self, input: ::std::option::Option<crate::types::KubernetesNetworkConfigRequest>) -> Self {
231        self.kubernetes_network_config = input;
232        self
233    }
234    /// <p>The Kubernetes network configuration for the cluster.</p>
235    pub fn get_kubernetes_network_config(&self) -> &::std::option::Option<crate::types::KubernetesNetworkConfigRequest> {
236        &self.kubernetes_network_config
237    }
238    /// <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>
239    /// <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>
240    /// </note>
241    pub fn logging(mut self, input: crate::types::Logging) -> Self {
242        self.logging = ::std::option::Option::Some(input);
243        self
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 set_logging(mut self, input: ::std::option::Option<crate::types::Logging>) -> Self {
249        self.logging = 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 get_logging(&self) -> &::std::option::Option<crate::types::Logging> {
256        &self.logging
257    }
258    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
259    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260        self.client_request_token = ::std::option::Option::Some(input.into());
261        self
262    }
263    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
264    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
265        self.client_request_token = input;
266        self
267    }
268    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
269    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
270        &self.client_request_token
271    }
272    /// Adds a key-value pair to `tags`.
273    ///
274    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
275    ///
276    /// <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>
277    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
278        let mut hash_map = self.tags.unwrap_or_default();
279        hash_map.insert(k.into(), v.into());
280        self.tags = ::std::option::Option::Some(hash_map);
281        self
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 set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
285        self.tags = input;
286        self
287    }
288    /// <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>
289    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
290        &self.tags
291    }
292    /// Appends an item to `encryption_config`.
293    ///
294    /// To override the contents of this collection use [`set_encryption_config`](Self::set_encryption_config).
295    ///
296    /// <p>The encryption configuration for the cluster.</p>
297    pub fn encryption_config(mut self, input: crate::types::EncryptionConfig) -> Self {
298        let mut v = self.encryption_config.unwrap_or_default();
299        v.push(input);
300        self.encryption_config = ::std::option::Option::Some(v);
301        self
302    }
303    /// <p>The encryption configuration for the cluster.</p>
304    pub fn set_encryption_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>) -> Self {
305        self.encryption_config = input;
306        self
307    }
308    /// <p>The encryption configuration for the cluster.</p>
309    pub fn get_encryption_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>> {
310        &self.encryption_config
311    }
312    /// <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>
313    pub fn outpost_config(mut self, input: crate::types::OutpostConfigRequest) -> Self {
314        self.outpost_config = ::std::option::Option::Some(input);
315        self
316    }
317    /// <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>
318    pub fn set_outpost_config(mut self, input: ::std::option::Option<crate::types::OutpostConfigRequest>) -> Self {
319        self.outpost_config = input;
320        self
321    }
322    /// <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>
323    pub fn get_outpost_config(&self) -> &::std::option::Option<crate::types::OutpostConfigRequest> {
324        &self.outpost_config
325    }
326    /// <p>The access configuration for the cluster.</p>
327    pub fn access_config(mut self, input: crate::types::CreateAccessConfigRequest) -> Self {
328        self.access_config = ::std::option::Option::Some(input);
329        self
330    }
331    /// <p>The access configuration for the cluster.</p>
332    pub fn set_access_config(mut self, input: ::std::option::Option<crate::types::CreateAccessConfigRequest>) -> Self {
333        self.access_config = input;
334        self
335    }
336    /// <p>The access configuration for the cluster.</p>
337    pub fn get_access_config(&self) -> &::std::option::Option<crate::types::CreateAccessConfigRequest> {
338        &self.access_config
339    }
340    /// <p>If you set this value to <code>False</code> when creating a cluster, the default networking add-ons will not be installed.</p>
341    /// <p>The default networking addons include vpc-cni, coredns, and kube-proxy.</p>
342    /// <p>Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.</p>
343    pub fn bootstrap_self_managed_addons(mut self, input: bool) -> Self {
344        self.bootstrap_self_managed_addons = ::std::option::Option::Some(input);
345        self
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 addons include vpc-cni, coredns, and kube-proxy.</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 set_bootstrap_self_managed_addons(mut self, input: ::std::option::Option<bool>) -> Self {
351        self.bootstrap_self_managed_addons = 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 addons include vpc-cni, coredns, and kube-proxy.</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 get_bootstrap_self_managed_addons(&self) -> &::std::option::Option<bool> {
358        &self.bootstrap_self_managed_addons
359    }
360    /// <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>
361    pub fn upgrade_policy(mut self, input: crate::types::UpgradePolicyRequest) -> Self {
362        self.upgrade_policy = ::std::option::Option::Some(input);
363        self
364    }
365    /// <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>
366    pub fn set_upgrade_policy(mut self, input: ::std::option::Option<crate::types::UpgradePolicyRequest>) -> Self {
367        self.upgrade_policy = input;
368        self
369    }
370    /// <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>
371    pub fn get_upgrade_policy(&self) -> &::std::option::Option<crate::types::UpgradePolicyRequest> {
372        &self.upgrade_policy
373    }
374    /// <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>
375    /// <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>
376    /// <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>
377    pub fn zonal_shift_config(mut self, input: crate::types::ZonalShiftConfigRequest) -> Self {
378        self.zonal_shift_config = ::std::option::Option::Some(input);
379        self
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 set_zonal_shift_config(mut self, input: ::std::option::Option<crate::types::ZonalShiftConfigRequest>) -> Self {
385        self.zonal_shift_config = 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 get_zonal_shift_config(&self) -> &::std::option::Option<crate::types::ZonalShiftConfigRequest> {
392        &self.zonal_shift_config
393    }
394    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after the cluster is created.</p>
395    pub fn remote_network_config(mut self, input: crate::types::RemoteNetworkConfigRequest) -> Self {
396        self.remote_network_config = ::std::option::Option::Some(input);
397        self
398    }
399    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after the cluster is created.</p>
400    pub fn set_remote_network_config(mut self, input: ::std::option::Option<crate::types::RemoteNetworkConfigRequest>) -> Self {
401        self.remote_network_config = input;
402        self
403    }
404    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after the cluster is created.</p>
405    pub fn get_remote_network_config(&self) -> &::std::option::Option<crate::types::RemoteNetworkConfigRequest> {
406        &self.remote_network_config
407    }
408    /// <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>
409    pub fn compute_config(mut self, input: crate::types::ComputeConfigRequest) -> Self {
410        self.compute_config = ::std::option::Option::Some(input);
411        self
412    }
413    /// <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>
414    pub fn set_compute_config(mut self, input: ::std::option::Option<crate::types::ComputeConfigRequest>) -> Self {
415        self.compute_config = input;
416        self
417    }
418    /// <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>
419    pub fn get_compute_config(&self) -> &::std::option::Option<crate::types::ComputeConfigRequest> {
420        &self.compute_config
421    }
422    /// <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>
423    pub fn storage_config(mut self, input: crate::types::StorageConfigRequest) -> Self {
424        self.storage_config = ::std::option::Option::Some(input);
425        self
426    }
427    /// <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>
428    pub fn set_storage_config(mut self, input: ::std::option::Option<crate::types::StorageConfigRequest>) -> Self {
429        self.storage_config = input;
430        self
431    }
432    /// <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>
433    pub fn get_storage_config(&self) -> &::std::option::Option<crate::types::StorageConfigRequest> {
434        &self.storage_config
435    }
436    /// Consumes the builder and constructs a [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
437    pub fn build(
438        self,
439    ) -> ::std::result::Result<crate::operation::create_cluster::CreateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
440        ::std::result::Result::Ok(crate::operation::create_cluster::CreateClusterInput {
441            name: self.name,
442            version: self.version,
443            role_arn: self.role_arn,
444            resources_vpc_config: self.resources_vpc_config,
445            kubernetes_network_config: self.kubernetes_network_config,
446            logging: self.logging,
447            client_request_token: self.client_request_token,
448            tags: self.tags,
449            encryption_config: self.encryption_config,
450            outpost_config: self.outpost_config,
451            access_config: self.access_config,
452            bootstrap_self_managed_addons: self.bootstrap_self_managed_addons,
453            upgrade_policy: self.upgrade_policy,
454            zonal_shift_config: self.zonal_shift_config,
455            remote_network_config: self.remote_network_config,
456            compute_config: self.compute_config,
457            storage_config: self.storage_config,
458        })
459    }
460}