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_parameter_group::_reset_db_parameter_group_input::ResetDbParameterGroupInputBuilder;

pub use crate::operation::reset_db_parameter_group::_reset_db_parameter_group_output::ResetDbParameterGroupOutputBuilder;

impl crate::operation::reset_db_parameter_group::builders::ResetDbParameterGroupInputBuilder {
    /// 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_parameter_group::ResetDbParameterGroupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::reset_db_parameter_group::ResetDBParameterGroupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.reset_db_parameter_group();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ResetDBParameterGroup`.
///
/// <p>Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, provide a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. To reset the entire DB parameter group, specify the <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters. 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.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ResetDBParameterGroupFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::reset_db_parameter_group::builders::ResetDbParameterGroupInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::reset_db_parameter_group::ResetDbParameterGroupOutput,
        crate::operation::reset_db_parameter_group::ResetDBParameterGroupError,
    > for ResetDBParameterGroupFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::reset_db_parameter_group::ResetDbParameterGroupOutput,
            crate::operation::reset_db_parameter_group::ResetDBParameterGroupError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ResetDBParameterGroupFluentBuilder {
    /// Creates a new `ResetDBParameterGroupFluentBuilder`.
    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 ResetDBParameterGroup as a reference.
    pub fn as_input(&self) -> &crate::operation::reset_db_parameter_group::builders::ResetDbParameterGroupInputBuilder {
        &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_parameter_group::ResetDbParameterGroupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::reset_db_parameter_group::ResetDBParameterGroupError,
            ::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_parameter_group::ResetDBParameterGroup::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::reset_db_parameter_group::ResetDBParameterGroup::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_parameter_group::ResetDbParameterGroupOutput,
        crate::operation::reset_db_parameter_group::ResetDBParameterGroupError,
        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 parameter group.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match the name of an existing <code>DBParameterGroup</code>.</p></li>
    /// </ul>
    pub fn db_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.db_parameter_group_name(input.into());
        self
    }
    /// <p>The name of the DB parameter group.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match the name of an existing <code>DBParameterGroup</code>.</p></li>
    /// </ul>
    pub fn set_db_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_db_parameter_group_name(input);
        self
    }
    /// <p>The name of the DB parameter group.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match the name of an existing <code>DBParameterGroup</code>.</p></li>
    /// </ul>
    pub fn get_db_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_db_parameter_group_name()
    }
    /// <p>Specifies whether to reset all parameters in the DB parameter group to default values. By default, all parameters in the DB parameter group are reset to default values.</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 parameter group to default values. By default, all parameters in the DB parameter group are reset to default values.</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 parameter group to default values. By default, all parameters in the DB parameter group are reset to default values.</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>To reset the entire DB parameter group, specify the <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters. To reset specific parameters, provide a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single request.</p>
    /// <p><b>MySQL</b></p>
    /// <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code></p>
    /// <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p>
    /// <p><b>MariaDB</b></p>
    /// <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code></p>
    /// <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p>
    /// <p><b>Oracle</b></p>
    /// <p>Valid Values (for Apply method): <code>pending-reboot</code></p>
    pub fn parameters(mut self, input: crate::types::Parameter) -> Self {
        self.inner = self.inner.parameters(input);
        self
    }
    /// <p>To reset the entire DB parameter group, specify the <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters. To reset specific parameters, provide a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single request.</p>
    /// <p><b>MySQL</b></p>
    /// <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code></p>
    /// <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p>
    /// <p><b>MariaDB</b></p>
    /// <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code></p>
    /// <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p>
    /// <p><b>Oracle</b></p>
    /// <p>Valid Values (for Apply method): <code>pending-reboot</code></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>To reset the entire DB parameter group, specify the <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters. To reset specific parameters, provide a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single request.</p>
    /// <p><b>MySQL</b></p>
    /// <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code></p>
    /// <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p>
    /// <p><b>MariaDB</b></p>
    /// <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code></p>
    /// <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p>
    /// <p><b>Oracle</b></p>
    /// <p>Valid Values (for Apply method): <code>pending-reboot</code></p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Parameter>> {
        self.inner.get_parameters()
    }
}