// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::activate_certificate_authority::_activate_certificate_authority_input::ActivateCertificateAuthorityInputBuilder;
pub use crate::operation::activate_certificate_authority::_activate_certificate_authority_output::ActivateCertificateAuthorityOutputBuilder;
impl crate::operation::activate_certificate_authority::builders::ActivateCertificateAuthorityInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.activate_certificate_authority();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `ActivateCertificateAuthority`.
///
/// <p>Activates a successor certificate authority (CA) as the signing certificate authority for your cluster, completing a CA rotation.</p>
/// <p>When you activate a successor CA, Amazon EKS promotes it to be the cluster's signer (its <code>signingStatus</code> becomes <code>IN_USE</code>) and the outgoing CA is retired (<code>NOT_USED</code>). The outgoing CA remains in the cluster's trust bundle but no longer signs certificates. The successor CA you activate must already be present on the cluster and fully distributed (its <code>distributionStatus</code> must be <code>COMPLETE</code>). This is an asynchronous operation that returns an <code>update</code> object you can track with <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeUpdate.html"> <code>DescribeUpdate</code> </a>.</p>
/// <p>Before you activate the successor CA, make sure the worker nodes you manage and your external clients have been updated to trust it, so they maintain connectivity to the API server after activation. For a limited period after activation, CA rollback is available to revert to the outgoing CA if needed. If you don't activate the successor CA yourself, Amazon EKS activates it automatically as the expiration deadline approaches. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/certificate-authority-rotation.html">Rotate the Amazon EKS cluster certificate authority</a> in the <i>Amazon EKS User Guide</i>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ActivateCertificateAuthorityFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::activate_certificate_authority::builders::ActivateCertificateAuthorityInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityOutput,
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityError,
> for ActivateCertificateAuthorityFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityOutput,
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl ActivateCertificateAuthorityFluentBuilder {
/// Creates a new `ActivateCertificateAuthorityFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the ActivateCertificateAuthority as a reference.
pub fn as_input(&self) -> &crate::operation::activate_certificate_authority::builders::ActivateCertificateAuthorityInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::activate_certificate_authority::ActivateCertificateAuthority::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::activate_certificate_authority::ActivateCertificateAuthority::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityOutput,
crate::operation::activate_certificate_authority::ActivateCertificateAuthorityError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The name of your cluster.</p>
pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.cluster_name(input.into());
self
}
/// <p>The name of your cluster.</p>
pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_cluster_name(input);
self
}
/// <p>The name of your cluster.</p>
pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_cluster_name()
}
/// <p>The ID of the certificate authority to activate as the cluster's signing certificate authority. This certificate authority must already exist on the cluster and have a <code>distributionStatus</code> of <code>COMPLETE</code>.</p>
pub fn certificate_authority_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.certificate_authority_id(input.into());
self
}
/// <p>The ID of the certificate authority to activate as the cluster's signing certificate authority. This certificate authority must already exist on the cluster and have a <code>distributionStatus</code> of <code>COMPLETE</code>.</p>
pub fn set_certificate_authority_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_certificate_authority_id(input);
self
}
/// <p>The ID of the certificate authority to activate as the cluster's signing certificate authority. This certificate authority must already exist on the cluster and have a <code>distributionStatus</code> of <code>COMPLETE</code>.</p>
pub fn get_certificate_authority_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_certificate_authority_id()
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.client_request_token(input.into());
self
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_client_request_token(input);
self
}
/// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_client_request_token()
}
}