aws-sdk-efs 1.61.0

AWS SDK for Amazon Elastic File System
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::delete_replication_configuration::_delete_replication_configuration_output::DeleteReplicationConfigurationOutputBuilder;

pub use crate::operation::delete_replication_configuration::_delete_replication_configuration_input::DeleteReplicationConfigurationInputBuilder;

impl crate::operation::delete_replication_configuration::builders::DeleteReplicationConfigurationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::delete_replication_configuration::DeleteReplicationConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::delete_replication_configuration::DeleteReplicationConfigurationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.delete_replication_configuration();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DeleteReplicationConfiguration`.
///
/// <p>Deletes a replication configuration. Deleting a replication configuration ends the replication process. After a replication configuration is deleted, the destination file system becomes <code>Writeable</code> and its replication overwrite protection is re-enabled. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/delete-replications.html">Delete a replication configuration</a>.</p>
/// <p>This operation requires permissions for the <code>elasticfilesystem:DeleteReplicationConfiguration</code> action.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DeleteReplicationConfigurationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::delete_replication_configuration::builders::DeleteReplicationConfigurationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::delete_replication_configuration::DeleteReplicationConfigurationOutput,
        crate::operation::delete_replication_configuration::DeleteReplicationConfigurationError,
    > for DeleteReplicationConfigurationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::delete_replication_configuration::DeleteReplicationConfigurationOutput,
            crate::operation::delete_replication_configuration::DeleteReplicationConfigurationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DeleteReplicationConfigurationFluentBuilder {
    /// Creates a new `DeleteReplicationConfigurationFluentBuilder`.
    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 DeleteReplicationConfiguration as a reference.
    pub fn as_input(&self) -> &crate::operation::delete_replication_configuration::builders::DeleteReplicationConfigurationInputBuilder {
        &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::delete_replication_configuration::DeleteReplicationConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::delete_replication_configuration::DeleteReplicationConfigurationError,
            ::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::delete_replication_configuration::DeleteReplicationConfiguration::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::delete_replication_configuration::DeleteReplicationConfiguration::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::delete_replication_configuration::DeleteReplicationConfigurationOutput,
        crate::operation::delete_replication_configuration::DeleteReplicationConfigurationError,
        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 ID of the source file system in the replication configuration.</p>
    pub fn source_file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.source_file_system_id(input.into());
        self
    }
    /// <p>The ID of the source file system in the replication configuration.</p>
    pub fn set_source_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_source_file_system_id(input);
        self
    }
    /// <p>The ID of the source file system in the replication configuration.</p>
    pub fn get_source_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_source_file_system_id()
    }
    /// <p>When replicating across Amazon Web Services accounts or across Amazon Web Services Regions, Amazon EFS deletes the replication configuration from both the source and destination account or Region (<code>ALL_CONFIGURATIONS</code>) by default. If there's a configuration or permissions issue that prevents Amazon EFS from deleting the replication configuration from both sides, you can use the <code>LOCAL_CONFIGURATION_ONLY</code> mode to delete the replication configuration from only the local side (the account or Region from which the delete is performed).</p><note>
    /// <p>Only use the <code>LOCAL_CONFIGURATION_ONLY</code> mode in the case that Amazon EFS is unable to delete the replication configuration in both the source and destination account or Region. Deleting the local configuration leaves the configuration in the other account or Region unrecoverable.</p>
    /// <p>Additionally, do not use this mode for same-account, same-region replication as doing so results in a BadRequest exception error.</p>
    /// </note>
    pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self {
        self.inner = self.inner.deletion_mode(input);
        self
    }
    /// <p>When replicating across Amazon Web Services accounts or across Amazon Web Services Regions, Amazon EFS deletes the replication configuration from both the source and destination account or Region (<code>ALL_CONFIGURATIONS</code>) by default. If there's a configuration or permissions issue that prevents Amazon EFS from deleting the replication configuration from both sides, you can use the <code>LOCAL_CONFIGURATION_ONLY</code> mode to delete the replication configuration from only the local side (the account or Region from which the delete is performed).</p><note>
    /// <p>Only use the <code>LOCAL_CONFIGURATION_ONLY</code> mode in the case that Amazon EFS is unable to delete the replication configuration in both the source and destination account or Region. Deleting the local configuration leaves the configuration in the other account or Region unrecoverable.</p>
    /// <p>Additionally, do not use this mode for same-account, same-region replication as doing so results in a BadRequest exception error.</p>
    /// </note>
    pub fn set_deletion_mode(mut self, input: ::std::option::Option<crate::types::DeletionMode>) -> Self {
        self.inner = self.inner.set_deletion_mode(input);
        self
    }
    /// <p>When replicating across Amazon Web Services accounts or across Amazon Web Services Regions, Amazon EFS deletes the replication configuration from both the source and destination account or Region (<code>ALL_CONFIGURATIONS</code>) by default. If there's a configuration or permissions issue that prevents Amazon EFS from deleting the replication configuration from both sides, you can use the <code>LOCAL_CONFIGURATION_ONLY</code> mode to delete the replication configuration from only the local side (the account or Region from which the delete is performed).</p><note>
    /// <p>Only use the <code>LOCAL_CONFIGURATION_ONLY</code> mode in the case that Amazon EFS is unable to delete the replication configuration in both the source and destination account or Region. Deleting the local configuration leaves the configuration in the other account or Region unrecoverable.</p>
    /// <p>Additionally, do not use this mode for same-account, same-region replication as doing so results in a BadRequest exception error.</p>
    /// </note>
    pub fn get_deletion_mode(&self) -> &::std::option::Option<crate::types::DeletionMode> {
        self.inner.get_deletion_mode()
    }
}