aws-sdk-rds 1.131.0

AWS SDK for Amazon Relational Database Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::reset_db_cluster_parameter_group::_reset_db_cluster_parameter_group_input::ResetDbClusterParameterGroupInputBuilder;

pub use crate::operation::reset_db_cluster_parameter_group::_reset_db_cluster_parameter_group_output::ResetDbClusterParameterGroupOutputBuilder;

impl crate::operation::reset_db_cluster_parameter_group::builders::ResetDbClusterParameterGroupInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::reset_db_cluster_parameter_group::ResetDbClusterParameterGroupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::reset_db_cluster_parameter_group::ResetDBClusterParameterGroupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.reset_db_cluster_parameter_group();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ResetDBClusterParameterGroup`.
///
/// <p>Modifies the parameters of a DB cluster parameter group to the default value. To reset specific parameters submit a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. To reset the entire DB cluster parameter group, specify the <code>DBClusterParameterGroupName</code> and <code>ResetAllParameters</code> parameters.</p>
/// <p>When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to <code>pending-reboot</code> to take effect on the next DB instance restart or <code>RebootDBInstance</code> request. You must call <code>RebootDBInstance</code> for every DB instance in your DB cluster that you want the updated static parameter to apply to.</p>
/// <p>For more information on Amazon Aurora DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p>
/// <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide.</i></p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ResetDBClusterParameterGroupFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::reset_db_cluster_parameter_group::builders::ResetDbClusterParameterGroupInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::reset_db_cluster_parameter_group::ResetDbClusterParameterGroupOutput,
        crate::operation::reset_db_cluster_parameter_group::ResetDBClusterParameterGroupError,
    > for ResetDBClusterParameterGroupFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::reset_db_cluster_parameter_group::ResetDbClusterParameterGroupOutput,
            crate::operation::reset_db_cluster_parameter_group::ResetDBClusterParameterGroupError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ResetDBClusterParameterGroupFluentBuilder {
    /// Creates a new `ResetDBClusterParameterGroupFluentBuilder`.
    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 ResetDBClusterParameterGroup as a reference.
    pub fn as_input(&self) -> &crate::operation::reset_db_cluster_parameter_group::builders::ResetDbClusterParameterGroupInputBuilder {
        &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::reset_db_cluster_parameter_group::ResetDbClusterParameterGroupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::reset_db_cluster_parameter_group::ResetDBClusterParameterGroupError,
            ::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::reset_db_cluster_parameter_group::ResetDBClusterParameterGroup::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::reset_db_cluster_parameter_group::ResetDBClusterParameterGroup::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::reset_db_cluster_parameter_group::ResetDbClusterParameterGroupOutput,
        crate::operation::reset_db_cluster_parameter_group::ResetDBClusterParameterGroupError,
        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 the DB cluster parameter group to reset.</p>
    pub fn db_cluster_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.db_cluster_parameter_group_name(input.into());
        self
    }
    /// <p>The name of the DB cluster parameter group to reset.</p>
    pub fn set_db_cluster_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_db_cluster_parameter_group_name(input);
        self
    }
    /// <p>The name of the DB cluster parameter group to reset.</p>
    pub fn get_db_cluster_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_db_cluster_parameter_group_name()
    }
    /// <p>Specifies whether to reset all parameters in the DB cluster parameter group to their default values. You can't use this parameter if there is a list of parameter names specified for the <code>Parameters</code> parameter.</p>
    pub fn reset_all_parameters(mut self, input: bool) -> Self {
        self.inner = self.inner.reset_all_parameters(input);
        self
    }
    /// <p>Specifies whether to reset all parameters in the DB cluster parameter group to their default values. You can't use this parameter if there is a list of parameter names specified for the <code>Parameters</code> parameter.</p>
    pub fn set_reset_all_parameters(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_reset_all_parameters(input);
        self
    }
    /// <p>Specifies whether to reset all parameters in the DB cluster parameter group to their default values. You can't use this parameter if there is a list of parameter names specified for the <code>Parameters</code> parameter.</p>
    pub fn get_reset_all_parameters(&self) -> &::std::option::Option<bool> {
        self.inner.get_reset_all_parameters()
    }
    ///
    /// Appends an item to `Parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>A list of parameter names in the DB cluster parameter group to reset to the default values. You can't use this parameter if the <code>ResetAllParameters</code> parameter is enabled.</p>
    pub fn parameters(mut self, input: crate::types::Parameter) -> Self {
        self.inner = self.inner.parameters(input);
        self
    }
    /// <p>A list of parameter names in the DB cluster parameter group to reset to the default values. You can't use this parameter if the <code>ResetAllParameters</code> parameter is enabled.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>) -> Self {
        self.inner = self.inner.set_parameters(input);
        self
    }
    /// <p>A list of parameter names in the DB cluster parameter group to reset to the default values. You can't use this parameter if the <code>ResetAllParameters</code> parameter is enabled.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Parameter>> {
        self.inner.get_parameters()
    }
}