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