aws_sdk_eks/operation/update_cluster_config/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_cluster_config::_update_cluster_config_output::UpdateClusterConfigOutputBuilder;
3
4pub use crate::operation::update_cluster_config::_update_cluster_config_input::UpdateClusterConfigInputBuilder;
5
6impl crate::operation::update_cluster_config::builders::UpdateClusterConfigInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_cluster_config::UpdateClusterConfigOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_cluster_config::UpdateClusterConfigError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_cluster_config();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateClusterConfig`.
24///
25/// <p>Updates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with <code>DescribeUpdate</code>.</p>
26/// <p>You can use this operation to do the following actions:</p>
27/// <ul>
28/// <li>
29/// <p>You can use this API operation to 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>
30/// <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>
31/// </note></li>
32/// <li>
33/// <p>You can also use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html"> Cluster API server endpoint</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p></li>
34/// <li>
35/// <p>You can also use this API operation to choose different subnets and security groups for the cluster. You must specify at least two subnets that are in different Availability Zones. You can't change which VPC the subnets are from, the subnets must be in the same VPC as the subnets that the cluster was created with. For more information about the VPC requirements, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html">https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html</a> in the <i> <i>Amazon EKS User Guide</i> </i>.</p></li>
36/// <li>
37/// <p>You can also use this API operation to enable or disable ARC zonal shift. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster.</p></li>
38/// <li>
39/// <p>You can also use this API operation to add, change, or remove the configuration in the cluster for EKS Hybrid Nodes. To remove the configuration, use the <code>remoteNetworkConfig</code> key with an object containing both subkeys with empty arrays for each. Here is an inline example: <code>"remoteNetworkConfig": { "remoteNodeNetworks": \[\], "remotePodNetworks": \[\] }</code>.</p></li>
40/// </ul>
41/// <p>Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to <code>UPDATING</code> (this status transition is eventually consistent). When the update is complete (either <code>Failed</code> or <code>Successful</code>), the cluster status moves to <code>Active</code>.</p>
42#[derive(::std::clone::Clone, ::std::fmt::Debug)]
43pub struct UpdateClusterConfigFluentBuilder {
44 handle: ::std::sync::Arc<crate::client::Handle>,
45 inner: crate::operation::update_cluster_config::builders::UpdateClusterConfigInputBuilder,
46 config_override: ::std::option::Option<crate::config::Builder>,
47}
48impl
49 crate::client::customize::internal::CustomizableSend<
50 crate::operation::update_cluster_config::UpdateClusterConfigOutput,
51 crate::operation::update_cluster_config::UpdateClusterConfigError,
52 > for UpdateClusterConfigFluentBuilder
53{
54 fn send(
55 self,
56 config_override: crate::config::Builder,
57 ) -> crate::client::customize::internal::BoxFuture<
58 crate::client::customize::internal::SendResult<
59 crate::operation::update_cluster_config::UpdateClusterConfigOutput,
60 crate::operation::update_cluster_config::UpdateClusterConfigError,
61 >,
62 > {
63 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
64 }
65}
66impl UpdateClusterConfigFluentBuilder {
67 /// Creates a new `UpdateClusterConfigFluentBuilder`.
68 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
69 Self {
70 handle,
71 inner: ::std::default::Default::default(),
72 config_override: ::std::option::Option::None,
73 }
74 }
75 /// Access the UpdateClusterConfig as a reference.
76 pub fn as_input(&self) -> &crate::operation::update_cluster_config::builders::UpdateClusterConfigInputBuilder {
77 &self.inner
78 }
79 /// Sends the request and returns the response.
80 ///
81 /// If an error occurs, an `SdkError` will be returned with additional details that
82 /// can be matched against.
83 ///
84 /// By default, any retryable failures will be retried twice. Retry behavior
85 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
86 /// set when configuring the client.
87 pub async fn send(
88 self,
89 ) -> ::std::result::Result<
90 crate::operation::update_cluster_config::UpdateClusterConfigOutput,
91 ::aws_smithy_runtime_api::client::result::SdkError<
92 crate::operation::update_cluster_config::UpdateClusterConfigError,
93 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
94 >,
95 > {
96 let input = self
97 .inner
98 .build()
99 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
100 let runtime_plugins = crate::operation::update_cluster_config::UpdateClusterConfig::operation_runtime_plugins(
101 self.handle.runtime_plugins.clone(),
102 &self.handle.conf,
103 self.config_override,
104 );
105 crate::operation::update_cluster_config::UpdateClusterConfig::orchestrate(&runtime_plugins, input).await
106 }
107
108 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
109 pub fn customize(
110 self,
111 ) -> crate::client::customize::CustomizableOperation<
112 crate::operation::update_cluster_config::UpdateClusterConfigOutput,
113 crate::operation::update_cluster_config::UpdateClusterConfigError,
114 Self,
115 > {
116 crate::client::customize::CustomizableOperation::new(self)
117 }
118 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
119 self.set_config_override(::std::option::Option::Some(config_override.into()));
120 self
121 }
122
123 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
124 self.config_override = config_override;
125 self
126 }
127 /// <p>The name of the Amazon EKS cluster to update.</p>
128 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.name(input.into());
130 self
131 }
132 /// <p>The name of the Amazon EKS cluster to update.</p>
133 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.inner = self.inner.set_name(input);
135 self
136 }
137 /// <p>The name of the Amazon EKS cluster to update.</p>
138 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
139 self.inner.get_name()
140 }
141 /// <p>An object representing the VPC configuration to use for an Amazon EKS cluster.</p>
142 pub fn resources_vpc_config(mut self, input: crate::types::VpcConfigRequest) -> Self {
143 self.inner = self.inner.resources_vpc_config(input);
144 self
145 }
146 /// <p>An object representing the VPC configuration to use for an Amazon EKS cluster.</p>
147 pub fn set_resources_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfigRequest>) -> Self {
148 self.inner = self.inner.set_resources_vpc_config(input);
149 self
150 }
151 /// <p>An object representing the VPC configuration to use for an Amazon EKS cluster.</p>
152 pub fn get_resources_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfigRequest> {
153 self.inner.get_resources_vpc_config()
154 }
155 /// <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>
156 /// <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>
157 /// </note>
158 pub fn logging(mut self, input: crate::types::Logging) -> Self {
159 self.inner = self.inner.logging(input);
160 self
161 }
162 /// <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>
163 /// <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>
164 /// </note>
165 pub fn set_logging(mut self, input: ::std::option::Option<crate::types::Logging>) -> Self {
166 self.inner = self.inner.set_logging(input);
167 self
168 }
169 /// <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>
170 /// <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>
171 /// </note>
172 pub fn get_logging(&self) -> &::std::option::Option<crate::types::Logging> {
173 self.inner.get_logging()
174 }
175 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
176 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177 self.inner = self.inner.client_request_token(input.into());
178 self
179 }
180 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
181 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182 self.inner = self.inner.set_client_request_token(input);
183 self
184 }
185 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
186 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
187 self.inner.get_client_request_token()
188 }
189 /// <p>The access configuration for the cluster.</p>
190 pub fn access_config(mut self, input: crate::types::UpdateAccessConfigRequest) -> Self {
191 self.inner = self.inner.access_config(input);
192 self
193 }
194 /// <p>The access configuration for the cluster.</p>
195 pub fn set_access_config(mut self, input: ::std::option::Option<crate::types::UpdateAccessConfigRequest>) -> Self {
196 self.inner = self.inner.set_access_config(input);
197 self
198 }
199 /// <p>The access configuration for the cluster.</p>
200 pub fn get_access_config(&self) -> &::std::option::Option<crate::types::UpdateAccessConfigRequest> {
201 self.inner.get_access_config()
202 }
203 /// <p>You can enable or disable extended support for clusters currently on standard support. You cannot disable extended support once it starts. You must enable extended support before your cluster exits standard support.</p>
204 pub fn upgrade_policy(mut self, input: crate::types::UpgradePolicyRequest) -> Self {
205 self.inner = self.inner.upgrade_policy(input);
206 self
207 }
208 /// <p>You can enable or disable extended support for clusters currently on standard support. You cannot disable extended support once it starts. You must enable extended support before your cluster exits standard support.</p>
209 pub fn set_upgrade_policy(mut self, input: ::std::option::Option<crate::types::UpgradePolicyRequest>) -> Self {
210 self.inner = self.inner.set_upgrade_policy(input);
211 self
212 }
213 /// <p>You can enable or disable extended support for clusters currently on standard support. You cannot disable extended support once it starts. You must enable extended support before your cluster exits standard support.</p>
214 pub fn get_upgrade_policy(&self) -> &::std::option::Option<crate::types::UpgradePolicyRequest> {
215 self.inner.get_upgrade_policy()
216 }
217 /// <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>
218 /// <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>
219 /// <p>You can start a zonal shift for an 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 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>
220 pub fn zonal_shift_config(mut self, input: crate::types::ZonalShiftConfigRequest) -> Self {
221 self.inner = self.inner.zonal_shift_config(input);
222 self
223 }
224 /// <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>
225 /// <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>
226 /// <p>You can start a zonal shift for an 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 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>
227 pub fn set_zonal_shift_config(mut self, input: ::std::option::Option<crate::types::ZonalShiftConfigRequest>) -> Self {
228 self.inner = self.inner.set_zonal_shift_config(input);
229 self
230 }
231 /// <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>
232 /// <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>
233 /// <p>You can start a zonal shift for an 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 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>
234 pub fn get_zonal_shift_config(&self) -> &::std::option::Option<crate::types::ZonalShiftConfigRequest> {
235 self.inner.get_zonal_shift_config()
236 }
237 /// <p>Update the configuration of the compute capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
238 pub fn compute_config(mut self, input: crate::types::ComputeConfigRequest) -> Self {
239 self.inner = self.inner.compute_config(input);
240 self
241 }
242 /// <p>Update the configuration of the compute capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
243 pub fn set_compute_config(mut self, input: ::std::option::Option<crate::types::ComputeConfigRequest>) -> Self {
244 self.inner = self.inner.set_compute_config(input);
245 self
246 }
247 /// <p>Update the configuration of the compute capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
248 pub fn get_compute_config(&self) -> &::std::option::Option<crate::types::ComputeConfigRequest> {
249 self.inner.get_compute_config()
250 }
251 /// <p>The Kubernetes network configuration for the cluster.</p>
252 pub fn kubernetes_network_config(mut self, input: crate::types::KubernetesNetworkConfigRequest) -> Self {
253 self.inner = self.inner.kubernetes_network_config(input);
254 self
255 }
256 /// <p>The Kubernetes network configuration for the cluster.</p>
257 pub fn set_kubernetes_network_config(mut self, input: ::std::option::Option<crate::types::KubernetesNetworkConfigRequest>) -> Self {
258 self.inner = self.inner.set_kubernetes_network_config(input);
259 self
260 }
261 /// <p>The Kubernetes network configuration for the cluster.</p>
262 pub fn get_kubernetes_network_config(&self) -> &::std::option::Option<crate::types::KubernetesNetworkConfigRequest> {
263 self.inner.get_kubernetes_network_config()
264 }
265 /// <p>Update the configuration of the block storage capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
266 pub fn storage_config(mut self, input: crate::types::StorageConfigRequest) -> Self {
267 self.inner = self.inner.storage_config(input);
268 self
269 }
270 /// <p>Update the configuration of the block storage capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
271 pub fn set_storage_config(mut self, input: ::std::option::Option<crate::types::StorageConfigRequest>) -> Self {
272 self.inner = self.inner.set_storage_config(input);
273 self
274 }
275 /// <p>Update the configuration of the block storage capability of your EKS Auto Mode cluster. For example, enable the capability.</p>
276 pub fn get_storage_config(&self) -> &::std::option::Option<crate::types::StorageConfigRequest> {
277 self.inner.get_storage_config()
278 }
279 /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
280 pub fn remote_network_config(mut self, input: crate::types::RemoteNetworkConfigRequest) -> Self {
281 self.inner = self.inner.remote_network_config(input);
282 self
283 }
284 /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
285 pub fn set_remote_network_config(mut self, input: ::std::option::Option<crate::types::RemoteNetworkConfigRequest>) -> Self {
286 self.inner = self.inner.set_remote_network_config(input);
287 self
288 }
289 /// <p>The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.</p>
290 pub fn get_remote_network_config(&self) -> &::std::option::Option<crate::types::RemoteNetworkConfigRequest> {
291 self.inner.get_remote_network_config()
292 }
293 /// <p>Specifies whether to enable or disable deletion protection for the cluster. When enabled (<code>true</code>), the cluster cannot be deleted until deletion protection is explicitly disabled. When disabled (<code>false</code>), the cluster can be deleted normally.</p>
294 pub fn deletion_protection(mut self, input: bool) -> Self {
295 self.inner = self.inner.deletion_protection(input);
296 self
297 }
298 /// <p>Specifies whether to enable or disable deletion protection for the cluster. When enabled (<code>true</code>), the cluster cannot be deleted until deletion protection is explicitly disabled. When disabled (<code>false</code>), the cluster can be deleted normally.</p>
299 pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
300 self.inner = self.inner.set_deletion_protection(input);
301 self
302 }
303 /// <p>Specifies whether to enable or disable deletion protection for the cluster. When enabled (<code>true</code>), the cluster cannot be deleted until deletion protection is explicitly disabled. When disabled (<code>false</code>), the cluster can be deleted normally.</p>
304 pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
305 self.inner.get_deletion_protection()
306 }
307}