Skip to main content

aws_sdk_eks/types/
_cluster.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object representing an Amazon EKS cluster.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Cluster {
7    /// <p>The name of your cluster.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
10    pub arn: ::std::option::Option<::std::string::String>,
11    /// <p>The Unix epoch timestamp at object creation.</p>
12    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
13    /// <p>The Kubernetes server version for the cluster.</p>
14    pub version: ::std::option::Option<::std::string::String>,
15    /// <p>The endpoint for your Kubernetes API server.</p>
16    pub endpoint: ::std::option::Option<::std::string::String>,
17    /// <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.</p>
18    pub role_arn: ::std::option::Option<::std::string::String>,
19    /// <p>The VPC configuration 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>.</p>
20    pub resources_vpc_config: ::std::option::Option<crate::types::VpcConfigResponse>,
21    /// <p>The Kubernetes network configuration for the cluster.</p>
22    pub kubernetes_network_config: ::std::option::Option<crate::types::KubernetesNetworkConfigResponse>,
23    /// <p>The logging configuration for your cluster.</p>
24    pub logging: ::std::option::Option<crate::types::Logging>,
25    /// <p>The identity provider information for the cluster.</p>
26    pub identity: ::std::option::Option<crate::types::Identity>,
27    /// <p>The current status of the cluster.</p>
28    pub status: ::std::option::Option<crate::types::ClusterStatus>,
29    /// <p>The <code>certificate-authority-data</code> for your cluster.</p>
30    pub certificate_authority: ::std::option::Option<crate::types::Certificate>,
31    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
32    pub client_request_token: ::std::option::Option<::std::string::String>,
33    /// <p>The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web Services Cloud, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html">Platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>. For more information about local clusters deployed on an Outpost, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html">Amazon EKS local cluster platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
34    pub platform_version: ::std::option::Option<::std::string::String>,
35    /// <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>
36    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
37    /// <p>The encryption configuration for the cluster.</p>
38    pub encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
39    /// <p>The configuration used to connect to a cluster for registration.</p>
40    pub connector_config: ::std::option::Option<crate::types::ConnectorConfigResponse>,
41    /// <p>The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an Amazon EKS cluster on the Amazon Web Services cloud.</p>
42    pub id: ::std::option::Option<::std::string::String>,
43    /// <p>An object representing the health of your Amazon EKS cluster.</p>
44    pub health: ::std::option::Option<crate::types::ClusterHealth>,
45    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object isn't available for clusters on the Amazon Web Services cloud.</p>
46    pub outpost_config: ::std::option::Option<crate::types::OutpostConfigResponse>,
47    /// <p>The access configuration for the cluster.</p>
48    pub access_config: ::std::option::Option<crate::types::AccessConfigResponse>,
49    /// <p>This value indicates if extended support is enabled or disabled for the cluster.</p>
50    /// <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html">Learn more about EKS Extended Support in the <i>Amazon EKS User Guide</i>.</a></p>
51    pub upgrade_policy: ::std::option::Option<crate::types::UpgradePolicyResponse>,
52    /// <p>The configuration for zonal shift for the cluster.</p>
53    pub zonal_shift_config: ::std::option::Option<crate::types::ZonalShiftConfigResponse>,
54    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
55    pub remote_network_config: ::std::option::Option<crate::types::RemoteNetworkConfigResponse>,
56    /// <p>Indicates the current configuration of the compute capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account. For more information, see EKS Auto Mode compute capability in the <i>Amazon EKS User Guide</i>.</p>
57    pub compute_config: ::std::option::Option<crate::types::ComputeConfigResponse>,
58    /// <p>Indicates the current configuration of the block storage capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account. For more information, see EKS Auto Mode block storage capability in the <i>Amazon EKS User Guide</i>.</p>
59    pub storage_config: ::std::option::Option<crate::types::StorageConfigResponse>,
60    /// <p>The current deletion protection setting for the cluster. When <code>true</code>, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When <code>false</code>, the cluster can be deleted normally. This setting only applies to clusters in an active state.</p>
61    pub deletion_protection: ::std::option::Option<bool>,
62    /// <p>The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.</p>
63    pub control_plane_scaling_config: ::std::option::Option<crate::types::ControlPlaneScalingConfig>,
64}
65impl Cluster {
66    /// <p>The name of your cluster.</p>
67    pub fn name(&self) -> ::std::option::Option<&str> {
68        self.name.as_deref()
69    }
70    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
71    pub fn arn(&self) -> ::std::option::Option<&str> {
72        self.arn.as_deref()
73    }
74    /// <p>The Unix epoch timestamp at object creation.</p>
75    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
76        self.created_at.as_ref()
77    }
78    /// <p>The Kubernetes server version for the cluster.</p>
79    pub fn version(&self) -> ::std::option::Option<&str> {
80        self.version.as_deref()
81    }
82    /// <p>The endpoint for your Kubernetes API server.</p>
83    pub fn endpoint(&self) -> ::std::option::Option<&str> {
84        self.endpoint.as_deref()
85    }
86    /// <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.</p>
87    pub fn role_arn(&self) -> ::std::option::Option<&str> {
88        self.role_arn.as_deref()
89    }
90    /// <p>The VPC configuration 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>.</p>
91    pub fn resources_vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfigResponse> {
92        self.resources_vpc_config.as_ref()
93    }
94    /// <p>The Kubernetes network configuration for the cluster.</p>
95    pub fn kubernetes_network_config(&self) -> ::std::option::Option<&crate::types::KubernetesNetworkConfigResponse> {
96        self.kubernetes_network_config.as_ref()
97    }
98    /// <p>The logging configuration for your cluster.</p>
99    pub fn logging(&self) -> ::std::option::Option<&crate::types::Logging> {
100        self.logging.as_ref()
101    }
102    /// <p>The identity provider information for the cluster.</p>
103    pub fn identity(&self) -> ::std::option::Option<&crate::types::Identity> {
104        self.identity.as_ref()
105    }
106    /// <p>The current status of the cluster.</p>
107    pub fn status(&self) -> ::std::option::Option<&crate::types::ClusterStatus> {
108        self.status.as_ref()
109    }
110    /// <p>The <code>certificate-authority-data</code> for your cluster.</p>
111    pub fn certificate_authority(&self) -> ::std::option::Option<&crate::types::Certificate> {
112        self.certificate_authority.as_ref()
113    }
114    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
115    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
116        self.client_request_token.as_deref()
117    }
118    /// <p>The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web Services Cloud, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html">Platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>. For more information about local clusters deployed on an Outpost, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html">Amazon EKS local cluster platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
119    pub fn platform_version(&self) -> ::std::option::Option<&str> {
120        self.platform_version.as_deref()
121    }
122    /// <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>
123    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
124        self.tags.as_ref()
125    }
126    /// <p>The encryption configuration for the cluster.</p>
127    ///
128    /// 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()`.
129    pub fn encryption_config(&self) -> &[crate::types::EncryptionConfig] {
130        self.encryption_config.as_deref().unwrap_or_default()
131    }
132    /// <p>The configuration used to connect to a cluster for registration.</p>
133    pub fn connector_config(&self) -> ::std::option::Option<&crate::types::ConnectorConfigResponse> {
134        self.connector_config.as_ref()
135    }
136    /// <p>The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an Amazon EKS cluster on the Amazon Web Services cloud.</p>
137    pub fn id(&self) -> ::std::option::Option<&str> {
138        self.id.as_deref()
139    }
140    /// <p>An object representing the health of your Amazon EKS cluster.</p>
141    pub fn health(&self) -> ::std::option::Option<&crate::types::ClusterHealth> {
142        self.health.as_ref()
143    }
144    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object isn't available for clusters on the Amazon Web Services cloud.</p>
145    pub fn outpost_config(&self) -> ::std::option::Option<&crate::types::OutpostConfigResponse> {
146        self.outpost_config.as_ref()
147    }
148    /// <p>The access configuration for the cluster.</p>
149    pub fn access_config(&self) -> ::std::option::Option<&crate::types::AccessConfigResponse> {
150        self.access_config.as_ref()
151    }
152    /// <p>This value indicates if extended support is enabled or disabled for the cluster.</p>
153    /// <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html">Learn more about EKS Extended Support in the <i>Amazon EKS User Guide</i>.</a></p>
154    pub fn upgrade_policy(&self) -> ::std::option::Option<&crate::types::UpgradePolicyResponse> {
155        self.upgrade_policy.as_ref()
156    }
157    /// <p>The configuration for zonal shift for the cluster.</p>
158    pub fn zonal_shift_config(&self) -> ::std::option::Option<&crate::types::ZonalShiftConfigResponse> {
159        self.zonal_shift_config.as_ref()
160    }
161    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
162    pub fn remote_network_config(&self) -> ::std::option::Option<&crate::types::RemoteNetworkConfigResponse> {
163        self.remote_network_config.as_ref()
164    }
165    /// <p>Indicates the current configuration of the compute capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account. For more information, see EKS Auto Mode compute capability in the <i>Amazon EKS User Guide</i>.</p>
166    pub fn compute_config(&self) -> ::std::option::Option<&crate::types::ComputeConfigResponse> {
167        self.compute_config.as_ref()
168    }
169    /// <p>Indicates the current configuration of the block storage capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account. For more information, see EKS Auto Mode block storage capability in the <i>Amazon EKS User Guide</i>.</p>
170    pub fn storage_config(&self) -> ::std::option::Option<&crate::types::StorageConfigResponse> {
171        self.storage_config.as_ref()
172    }
173    /// <p>The current deletion protection setting for the cluster. When <code>true</code>, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When <code>false</code>, the cluster can be deleted normally. This setting only applies to clusters in an active state.</p>
174    pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
175        self.deletion_protection
176    }
177    /// <p>The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.</p>
178    pub fn control_plane_scaling_config(&self) -> ::std::option::Option<&crate::types::ControlPlaneScalingConfig> {
179        self.control_plane_scaling_config.as_ref()
180    }
181}
182impl Cluster {
183    /// Creates a new builder-style object to manufacture [`Cluster`](crate::types::Cluster).
184    pub fn builder() -> crate::types::builders::ClusterBuilder {
185        crate::types::builders::ClusterBuilder::default()
186    }
187}
188
189/// A builder for [`Cluster`](crate::types::Cluster).
190#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
191#[non_exhaustive]
192pub struct ClusterBuilder {
193    pub(crate) name: ::std::option::Option<::std::string::String>,
194    pub(crate) arn: ::std::option::Option<::std::string::String>,
195    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
196    pub(crate) version: ::std::option::Option<::std::string::String>,
197    pub(crate) endpoint: ::std::option::Option<::std::string::String>,
198    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
199    pub(crate) resources_vpc_config: ::std::option::Option<crate::types::VpcConfigResponse>,
200    pub(crate) kubernetes_network_config: ::std::option::Option<crate::types::KubernetesNetworkConfigResponse>,
201    pub(crate) logging: ::std::option::Option<crate::types::Logging>,
202    pub(crate) identity: ::std::option::Option<crate::types::Identity>,
203    pub(crate) status: ::std::option::Option<crate::types::ClusterStatus>,
204    pub(crate) certificate_authority: ::std::option::Option<crate::types::Certificate>,
205    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
206    pub(crate) platform_version: ::std::option::Option<::std::string::String>,
207    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
208    pub(crate) encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
209    pub(crate) connector_config: ::std::option::Option<crate::types::ConnectorConfigResponse>,
210    pub(crate) id: ::std::option::Option<::std::string::String>,
211    pub(crate) health: ::std::option::Option<crate::types::ClusterHealth>,
212    pub(crate) outpost_config: ::std::option::Option<crate::types::OutpostConfigResponse>,
213    pub(crate) access_config: ::std::option::Option<crate::types::AccessConfigResponse>,
214    pub(crate) upgrade_policy: ::std::option::Option<crate::types::UpgradePolicyResponse>,
215    pub(crate) zonal_shift_config: ::std::option::Option<crate::types::ZonalShiftConfigResponse>,
216    pub(crate) remote_network_config: ::std::option::Option<crate::types::RemoteNetworkConfigResponse>,
217    pub(crate) compute_config: ::std::option::Option<crate::types::ComputeConfigResponse>,
218    pub(crate) storage_config: ::std::option::Option<crate::types::StorageConfigResponse>,
219    pub(crate) deletion_protection: ::std::option::Option<bool>,
220    pub(crate) control_plane_scaling_config: ::std::option::Option<crate::types::ControlPlaneScalingConfig>,
221}
222impl ClusterBuilder {
223    /// <p>The name of your cluster.</p>
224    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225        self.name = ::std::option::Option::Some(input.into());
226        self
227    }
228    /// <p>The name of your cluster.</p>
229    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230        self.name = input;
231        self
232    }
233    /// <p>The name of your cluster.</p>
234    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
235        &self.name
236    }
237    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
238    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239        self.arn = ::std::option::Option::Some(input.into());
240        self
241    }
242    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
243    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244        self.arn = input;
245        self
246    }
247    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
248    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
249        &self.arn
250    }
251    /// <p>The Unix epoch timestamp at object creation.</p>
252    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
253        self.created_at = ::std::option::Option::Some(input);
254        self
255    }
256    /// <p>The Unix epoch timestamp at object creation.</p>
257    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
258        self.created_at = input;
259        self
260    }
261    /// <p>The Unix epoch timestamp at object creation.</p>
262    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
263        &self.created_at
264    }
265    /// <p>The Kubernetes server version for the cluster.</p>
266    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267        self.version = ::std::option::Option::Some(input.into());
268        self
269    }
270    /// <p>The Kubernetes server version for the cluster.</p>
271    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.version = input;
273        self
274    }
275    /// <p>The Kubernetes server version for the cluster.</p>
276    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
277        &self.version
278    }
279    /// <p>The endpoint for your Kubernetes API server.</p>
280    pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281        self.endpoint = ::std::option::Option::Some(input.into());
282        self
283    }
284    /// <p>The endpoint for your Kubernetes API server.</p>
285    pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286        self.endpoint = input;
287        self
288    }
289    /// <p>The endpoint for your Kubernetes API server.</p>
290    pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
291        &self.endpoint
292    }
293    /// <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.</p>
294    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
295        self.role_arn = ::std::option::Option::Some(input.into());
296        self
297    }
298    /// <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.</p>
299    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300        self.role_arn = input;
301        self
302    }
303    /// <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.</p>
304    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
305        &self.role_arn
306    }
307    /// <p>The VPC configuration 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>.</p>
308    pub fn resources_vpc_config(mut self, input: crate::types::VpcConfigResponse) -> Self {
309        self.resources_vpc_config = ::std::option::Option::Some(input);
310        self
311    }
312    /// <p>The VPC configuration 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>.</p>
313    pub fn set_resources_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfigResponse>) -> Self {
314        self.resources_vpc_config = input;
315        self
316    }
317    /// <p>The VPC configuration 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>.</p>
318    pub fn get_resources_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfigResponse> {
319        &self.resources_vpc_config
320    }
321    /// <p>The Kubernetes network configuration for the cluster.</p>
322    pub fn kubernetes_network_config(mut self, input: crate::types::KubernetesNetworkConfigResponse) -> Self {
323        self.kubernetes_network_config = ::std::option::Option::Some(input);
324        self
325    }
326    /// <p>The Kubernetes network configuration for the cluster.</p>
327    pub fn set_kubernetes_network_config(mut self, input: ::std::option::Option<crate::types::KubernetesNetworkConfigResponse>) -> Self {
328        self.kubernetes_network_config = input;
329        self
330    }
331    /// <p>The Kubernetes network configuration for the cluster.</p>
332    pub fn get_kubernetes_network_config(&self) -> &::std::option::Option<crate::types::KubernetesNetworkConfigResponse> {
333        &self.kubernetes_network_config
334    }
335    /// <p>The logging configuration for your cluster.</p>
336    pub fn logging(mut self, input: crate::types::Logging) -> Self {
337        self.logging = ::std::option::Option::Some(input);
338        self
339    }
340    /// <p>The logging configuration for your cluster.</p>
341    pub fn set_logging(mut self, input: ::std::option::Option<crate::types::Logging>) -> Self {
342        self.logging = input;
343        self
344    }
345    /// <p>The logging configuration for your cluster.</p>
346    pub fn get_logging(&self) -> &::std::option::Option<crate::types::Logging> {
347        &self.logging
348    }
349    /// <p>The identity provider information for the cluster.</p>
350    pub fn identity(mut self, input: crate::types::Identity) -> Self {
351        self.identity = ::std::option::Option::Some(input);
352        self
353    }
354    /// <p>The identity provider information for the cluster.</p>
355    pub fn set_identity(mut self, input: ::std::option::Option<crate::types::Identity>) -> Self {
356        self.identity = input;
357        self
358    }
359    /// <p>The identity provider information for the cluster.</p>
360    pub fn get_identity(&self) -> &::std::option::Option<crate::types::Identity> {
361        &self.identity
362    }
363    /// <p>The current status of the cluster.</p>
364    pub fn status(mut self, input: crate::types::ClusterStatus) -> Self {
365        self.status = ::std::option::Option::Some(input);
366        self
367    }
368    /// <p>The current status of the cluster.</p>
369    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ClusterStatus>) -> Self {
370        self.status = input;
371        self
372    }
373    /// <p>The current status of the cluster.</p>
374    pub fn get_status(&self) -> &::std::option::Option<crate::types::ClusterStatus> {
375        &self.status
376    }
377    /// <p>The <code>certificate-authority-data</code> for your cluster.</p>
378    pub fn certificate_authority(mut self, input: crate::types::Certificate) -> Self {
379        self.certificate_authority = ::std::option::Option::Some(input);
380        self
381    }
382    /// <p>The <code>certificate-authority-data</code> for your cluster.</p>
383    pub fn set_certificate_authority(mut self, input: ::std::option::Option<crate::types::Certificate>) -> Self {
384        self.certificate_authority = input;
385        self
386    }
387    /// <p>The <code>certificate-authority-data</code> for your cluster.</p>
388    pub fn get_certificate_authority(&self) -> &::std::option::Option<crate::types::Certificate> {
389        &self.certificate_authority
390    }
391    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
392    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
393        self.client_request_token = ::std::option::Option::Some(input.into());
394        self
395    }
396    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
397    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
398        self.client_request_token = input;
399        self
400    }
401    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
402    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
403        &self.client_request_token
404    }
405    /// <p>The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web Services Cloud, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html">Platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>. For more information about local clusters deployed on an Outpost, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html">Amazon EKS local cluster platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
406    pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
407        self.platform_version = ::std::option::Option::Some(input.into());
408        self
409    }
410    /// <p>The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web Services Cloud, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html">Platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>. For more information about local clusters deployed on an Outpost, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html">Amazon EKS local cluster platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
411    pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412        self.platform_version = input;
413        self
414    }
415    /// <p>The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web Services Cloud, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html">Platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>. For more information about local clusters deployed on an Outpost, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html">Amazon EKS local cluster platform versions</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p>
416    pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
417        &self.platform_version
418    }
419    /// Adds a key-value pair to `tags`.
420    ///
421    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
422    ///
423    /// <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>
424    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
425        let mut hash_map = self.tags.unwrap_or_default();
426        hash_map.insert(k.into(), v.into());
427        self.tags = ::std::option::Option::Some(hash_map);
428        self
429    }
430    /// <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>
431    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
432        self.tags = input;
433        self
434    }
435    /// <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>
436    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
437        &self.tags
438    }
439    /// Appends an item to `encryption_config`.
440    ///
441    /// To override the contents of this collection use [`set_encryption_config`](Self::set_encryption_config).
442    ///
443    /// <p>The encryption configuration for the cluster.</p>
444    pub fn encryption_config(mut self, input: crate::types::EncryptionConfig) -> Self {
445        let mut v = self.encryption_config.unwrap_or_default();
446        v.push(input);
447        self.encryption_config = ::std::option::Option::Some(v);
448        self
449    }
450    /// <p>The encryption configuration for the cluster.</p>
451    pub fn set_encryption_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>) -> Self {
452        self.encryption_config = input;
453        self
454    }
455    /// <p>The encryption configuration for the cluster.</p>
456    pub fn get_encryption_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>> {
457        &self.encryption_config
458    }
459    /// <p>The configuration used to connect to a cluster for registration.</p>
460    pub fn connector_config(mut self, input: crate::types::ConnectorConfigResponse) -> Self {
461        self.connector_config = ::std::option::Option::Some(input);
462        self
463    }
464    /// <p>The configuration used to connect to a cluster for registration.</p>
465    pub fn set_connector_config(mut self, input: ::std::option::Option<crate::types::ConnectorConfigResponse>) -> Self {
466        self.connector_config = input;
467        self
468    }
469    /// <p>The configuration used to connect to a cluster for registration.</p>
470    pub fn get_connector_config(&self) -> &::std::option::Option<crate::types::ConnectorConfigResponse> {
471        &self.connector_config
472    }
473    /// <p>The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an Amazon EKS cluster on the Amazon Web Services cloud.</p>
474    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
475        self.id = ::std::option::Option::Some(input.into());
476        self
477    }
478    /// <p>The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an Amazon EKS cluster on the Amazon Web Services cloud.</p>
479    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
480        self.id = input;
481        self
482    }
483    /// <p>The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an Amazon EKS cluster on the Amazon Web Services cloud.</p>
484    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
485        &self.id
486    }
487    /// <p>An object representing the health of your Amazon EKS cluster.</p>
488    pub fn health(mut self, input: crate::types::ClusterHealth) -> Self {
489        self.health = ::std::option::Option::Some(input);
490        self
491    }
492    /// <p>An object representing the health of your Amazon EKS cluster.</p>
493    pub fn set_health(mut self, input: ::std::option::Option<crate::types::ClusterHealth>) -> Self {
494        self.health = input;
495        self
496    }
497    /// <p>An object representing the health of your Amazon EKS cluster.</p>
498    pub fn get_health(&self) -> &::std::option::Option<crate::types::ClusterHealth> {
499        &self.health
500    }
501    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object isn't available for clusters on the Amazon Web Services cloud.</p>
502    pub fn outpost_config(mut self, input: crate::types::OutpostConfigResponse) -> Self {
503        self.outpost_config = ::std::option::Option::Some(input);
504        self
505    }
506    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object isn't available for clusters on the Amazon Web Services cloud.</p>
507    pub fn set_outpost_config(mut self, input: ::std::option::Option<crate::types::OutpostConfigResponse>) -> Self {
508        self.outpost_config = input;
509        self
510    }
511    /// <p>An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object isn't available for clusters on the Amazon Web Services cloud.</p>
512    pub fn get_outpost_config(&self) -> &::std::option::Option<crate::types::OutpostConfigResponse> {
513        &self.outpost_config
514    }
515    /// <p>The access configuration for the cluster.</p>
516    pub fn access_config(mut self, input: crate::types::AccessConfigResponse) -> Self {
517        self.access_config = ::std::option::Option::Some(input);
518        self
519    }
520    /// <p>The access configuration for the cluster.</p>
521    pub fn set_access_config(mut self, input: ::std::option::Option<crate::types::AccessConfigResponse>) -> Self {
522        self.access_config = input;
523        self
524    }
525    /// <p>The access configuration for the cluster.</p>
526    pub fn get_access_config(&self) -> &::std::option::Option<crate::types::AccessConfigResponse> {
527        &self.access_config
528    }
529    /// <p>This value indicates if extended support is enabled or disabled for the cluster.</p>
530    /// <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html">Learn more about EKS Extended Support in the <i>Amazon EKS User Guide</i>.</a></p>
531    pub fn upgrade_policy(mut self, input: crate::types::UpgradePolicyResponse) -> Self {
532        self.upgrade_policy = ::std::option::Option::Some(input);
533        self
534    }
535    /// <p>This value indicates if extended support is enabled or disabled for the cluster.</p>
536    /// <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html">Learn more about EKS Extended Support in the <i>Amazon EKS User Guide</i>.</a></p>
537    pub fn set_upgrade_policy(mut self, input: ::std::option::Option<crate::types::UpgradePolicyResponse>) -> Self {
538        self.upgrade_policy = input;
539        self
540    }
541    /// <p>This value indicates if extended support is enabled or disabled for the cluster.</p>
542    /// <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html">Learn more about EKS Extended Support in the <i>Amazon EKS User Guide</i>.</a></p>
543    pub fn get_upgrade_policy(&self) -> &::std::option::Option<crate::types::UpgradePolicyResponse> {
544        &self.upgrade_policy
545    }
546    /// <p>The configuration for zonal shift for the cluster.</p>
547    pub fn zonal_shift_config(mut self, input: crate::types::ZonalShiftConfigResponse) -> Self {
548        self.zonal_shift_config = ::std::option::Option::Some(input);
549        self
550    }
551    /// <p>The configuration for zonal shift for the cluster.</p>
552    pub fn set_zonal_shift_config(mut self, input: ::std::option::Option<crate::types::ZonalShiftConfigResponse>) -> Self {
553        self.zonal_shift_config = input;
554        self
555    }
556    /// <p>The configuration for zonal shift for the cluster.</p>
557    pub fn get_zonal_shift_config(&self) -> &::std::option::Option<crate::types::ZonalShiftConfigResponse> {
558        &self.zonal_shift_config
559    }
560    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
561    pub fn remote_network_config(mut self, input: crate::types::RemoteNetworkConfigResponse) -> Self {
562        self.remote_network_config = ::std::option::Option::Some(input);
563        self
564    }
565    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
566    pub fn set_remote_network_config(mut self, input: ::std::option::Option<crate::types::RemoteNetworkConfigResponse>) -> Self {
567        self.remote_network_config = input;
568        self
569    }
570    /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
571    pub fn get_remote_network_config(&self) -> &::std::option::Option<crate::types::RemoteNetworkConfigResponse> {
572        &self.remote_network_config
573    }
574    /// <p>Indicates the current configuration of the compute capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account. For more information, see EKS Auto Mode compute capability in the <i>Amazon EKS User Guide</i>.</p>
575    pub fn compute_config(mut self, input: crate::types::ComputeConfigResponse) -> Self {
576        self.compute_config = ::std::option::Option::Some(input);
577        self
578    }
579    /// <p>Indicates the current configuration of the compute capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account. For more information, see EKS Auto Mode compute capability in the <i>Amazon EKS User Guide</i>.</p>
580    pub fn set_compute_config(mut self, input: ::std::option::Option<crate::types::ComputeConfigResponse>) -> Self {
581        self.compute_config = input;
582        self
583    }
584    /// <p>Indicates the current configuration of the compute capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account. For more information, see EKS Auto Mode compute capability in the <i>Amazon EKS User Guide</i>.</p>
585    pub fn get_compute_config(&self) -> &::std::option::Option<crate::types::ComputeConfigResponse> {
586        &self.compute_config
587    }
588    /// <p>Indicates the current configuration of the block storage capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account. For more information, see EKS Auto Mode block storage capability in the <i>Amazon EKS User Guide</i>.</p>
589    pub fn storage_config(mut self, input: crate::types::StorageConfigResponse) -> Self {
590        self.storage_config = ::std::option::Option::Some(input);
591        self
592    }
593    /// <p>Indicates the current configuration of the block storage capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account. For more information, see EKS Auto Mode block storage capability in the <i>Amazon EKS User Guide</i>.</p>
594    pub fn set_storage_config(mut self, input: ::std::option::Option<crate::types::StorageConfigResponse>) -> Self {
595        self.storage_config = input;
596        self
597    }
598    /// <p>Indicates the current configuration of the block storage capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account. For more information, see EKS Auto Mode block storage capability in the <i>Amazon EKS User Guide</i>.</p>
599    pub fn get_storage_config(&self) -> &::std::option::Option<crate::types::StorageConfigResponse> {
600        &self.storage_config
601    }
602    /// <p>The current deletion protection setting for the cluster. When <code>true</code>, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When <code>false</code>, the cluster can be deleted normally. This setting only applies to clusters in an active state.</p>
603    pub fn deletion_protection(mut self, input: bool) -> Self {
604        self.deletion_protection = ::std::option::Option::Some(input);
605        self
606    }
607    /// <p>The current deletion protection setting for the cluster. When <code>true</code>, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When <code>false</code>, the cluster can be deleted normally. This setting only applies to clusters in an active state.</p>
608    pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
609        self.deletion_protection = input;
610        self
611    }
612    /// <p>The current deletion protection setting for the cluster. When <code>true</code>, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When <code>false</code>, the cluster can be deleted normally. This setting only applies to clusters in an active state.</p>
613    pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
614        &self.deletion_protection
615    }
616    /// <p>The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.</p>
617    pub fn control_plane_scaling_config(mut self, input: crate::types::ControlPlaneScalingConfig) -> Self {
618        self.control_plane_scaling_config = ::std::option::Option::Some(input);
619        self
620    }
621    /// <p>The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.</p>
622    pub fn set_control_plane_scaling_config(mut self, input: ::std::option::Option<crate::types::ControlPlaneScalingConfig>) -> Self {
623        self.control_plane_scaling_config = input;
624        self
625    }
626    /// <p>The control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.</p>
627    pub fn get_control_plane_scaling_config(&self) -> &::std::option::Option<crate::types::ControlPlaneScalingConfig> {
628        &self.control_plane_scaling_config
629    }
630    /// Consumes the builder and constructs a [`Cluster`](crate::types::Cluster).
631    pub fn build(self) -> crate::types::Cluster {
632        crate::types::Cluster {
633            name: self.name,
634            arn: self.arn,
635            created_at: self.created_at,
636            version: self.version,
637            endpoint: self.endpoint,
638            role_arn: self.role_arn,
639            resources_vpc_config: self.resources_vpc_config,
640            kubernetes_network_config: self.kubernetes_network_config,
641            logging: self.logging,
642            identity: self.identity,
643            status: self.status,
644            certificate_authority: self.certificate_authority,
645            client_request_token: self.client_request_token,
646            platform_version: self.platform_version,
647            tags: self.tags,
648            encryption_config: self.encryption_config,
649            connector_config: self.connector_config,
650            id: self.id,
651            health: self.health,
652            outpost_config: self.outpost_config,
653            access_config: self.access_config,
654            upgrade_policy: self.upgrade_policy,
655            zonal_shift_config: self.zonal_shift_config,
656            remote_network_config: self.remote_network_config,
657            compute_config: self.compute_config,
658            storage_config: self.storage_config,
659            deletion_protection: self.deletion_protection,
660            control_plane_scaling_config: self.control_plane_scaling_config,
661        }
662    }
663}