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::apply_pending_maintenance_action::_apply_pending_maintenance_action_input::ApplyPendingMaintenanceActionInputBuilder;

pub use crate::operation::apply_pending_maintenance_action::_apply_pending_maintenance_action_output::ApplyPendingMaintenanceActionOutputBuilder;

impl crate::operation::apply_pending_maintenance_action::builders::ApplyPendingMaintenanceActionInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.apply_pending_maintenance_action();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ApplyPendingMaintenanceAction`.
///
/// <p>Applies a pending maintenance action to a resource (for example, to a DB instance).</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ApplyPendingMaintenanceActionFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::apply_pending_maintenance_action::builders::ApplyPendingMaintenanceActionInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionOutput,
        crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError,
    > for ApplyPendingMaintenanceActionFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionOutput,
            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ApplyPendingMaintenanceActionFluentBuilder {
    /// Creates a new `ApplyPendingMaintenanceActionFluentBuilder`.
    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 ApplyPendingMaintenanceAction as a reference.
    pub fn as_input(&self) -> &crate::operation::apply_pending_maintenance_action::builders::ApplyPendingMaintenanceActionInputBuilder {
        &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::apply_pending_maintenance_action::ApplyPendingMaintenanceActionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError,
            ::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::apply_pending_maintenance_action::ApplyPendingMaintenanceAction::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceAction::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::apply_pending_maintenance_action::ApplyPendingMaintenanceActionOutput,
        crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError,
        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 RDS Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an RDS Amazon Resource Name (ARN)</a>.</p>
    pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.resource_identifier(input.into());
        self
    }
    /// <p>The RDS Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an RDS Amazon Resource Name (ARN)</a>.</p>
    pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_resource_identifier(input);
        self
    }
    /// <p>The RDS Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an RDS Amazon Resource Name (ARN)</a>.</p>
    pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_resource_identifier()
    }
    /// <p>The pending maintenance action to apply to this resource.</p>
    /// <p>Valid Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>ca-certificate-rotation</code></p></li>
    /// <li>
    /// <p><code>db-upgrade</code></p></li>
    /// <li>
    /// <p><code>hardware-maintenance</code></p></li>
    /// <li>
    /// <p><code>os-upgrade</code></p></li>
    /// <li>
    /// <p><code>system-update</code></p></li>
    /// </ul>
    /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
    pub fn apply_action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.apply_action(input.into());
        self
    }
    /// <p>The pending maintenance action to apply to this resource.</p>
    /// <p>Valid Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>ca-certificate-rotation</code></p></li>
    /// <li>
    /// <p><code>db-upgrade</code></p></li>
    /// <li>
    /// <p><code>hardware-maintenance</code></p></li>
    /// <li>
    /// <p><code>os-upgrade</code></p></li>
    /// <li>
    /// <p><code>system-update</code></p></li>
    /// </ul>
    /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
    pub fn set_apply_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_apply_action(input);
        self
    }
    /// <p>The pending maintenance action to apply to this resource.</p>
    /// <p>Valid Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>ca-certificate-rotation</code></p></li>
    /// <li>
    /// <p><code>db-upgrade</code></p></li>
    /// <li>
    /// <p><code>hardware-maintenance</code></p></li>
    /// <li>
    /// <p><code>os-upgrade</code></p></li>
    /// <li>
    /// <p><code>system-update</code></p></li>
    /// </ul>
    /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
    pub fn get_apply_action(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_apply_action()
    }
    /// <p>A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type <code>immediate</code> can't be undone.</p>
    /// <p>Valid Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>immediate</code> - Apply the maintenance action immediately.</p></li>
    /// <li>
    /// <p><code>next-maintenance</code> - Apply the maintenance action during the next maintenance window for the resource.</p></li>
    /// <li>
    /// <p><code>undo-opt-in</code> - Cancel any existing <code>next-maintenance</code> opt-in requests.</p></li>
    /// </ul>
    pub fn opt_in_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.opt_in_type(input.into());
        self
    }
    /// <p>A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type <code>immediate</code> can't be undone.</p>
    /// <p>Valid Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>immediate</code> - Apply the maintenance action immediately.</p></li>
    /// <li>
    /// <p><code>next-maintenance</code> - Apply the maintenance action during the next maintenance window for the resource.</p></li>
    /// <li>
    /// <p><code>undo-opt-in</code> - Cancel any existing <code>next-maintenance</code> opt-in requests.</p></li>
    /// </ul>
    pub fn set_opt_in_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_opt_in_type(input);
        self
    }
    /// <p>A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type <code>immediate</code> can't be undone.</p>
    /// <p>Valid Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>immediate</code> - Apply the maintenance action immediately.</p></li>
    /// <li>
    /// <p><code>next-maintenance</code> - Apply the maintenance action during the next maintenance window for the resource.</p></li>
    /// <li>
    /// <p><code>undo-opt-in</code> - Cancel any existing <code>next-maintenance</code> opt-in requests.</p></li>
    /// </ul>
    pub fn get_opt_in_type(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_opt_in_type()
    }
}