aws_sdk_dynamodb/operation/update_continuous_backups/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_continuous_backups::_update_continuous_backups_output::UpdateContinuousBackupsOutputBuilder;
3
4pub use crate::operation::update_continuous_backups::_update_continuous_backups_input::UpdateContinuousBackupsInputBuilder;
5
6impl crate::operation::update_continuous_backups::builders::UpdateContinuousBackupsInputBuilder {
7                    /// Sends a request with this input using the given client.
8                    pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9                        crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::update_continuous_backups::UpdateContinuousBackupsError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.update_continuous_backups();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `UpdateContinuousBackups`.
21/// 
22/// <p><code>UpdateContinuousBackups</code> enables or disables point in time recovery for the specified table. A successful <code>UpdateContinuousBackups</code> call returns the current <code>ContinuousBackupsDescription</code>. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p>
23/// <p>Once continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>.</p>
24/// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point in time in the last 35 days. You can set the <code>RecoveryPeriodInDays</code> to any value between 1 and 35 days.</p>
25#[derive(::std::clone::Clone, ::std::fmt::Debug)]
26pub struct UpdateContinuousBackupsFluentBuilder {
27                handle: ::std::sync::Arc<crate::client::Handle>,
28                inner: crate::operation::update_continuous_backups::builders::UpdateContinuousBackupsInputBuilder,
29config_override: ::std::option::Option<crate::config::Builder>,
30            }
31impl
32                crate::client::customize::internal::CustomizableSend<
33                    crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput,
34                    crate::operation::update_continuous_backups::UpdateContinuousBackupsError,
35                > for UpdateContinuousBackupsFluentBuilder
36            {
37                fn send(
38                    self,
39                    config_override: crate::config::Builder,
40                ) -> crate::client::customize::internal::BoxFuture<
41                    crate::client::customize::internal::SendResult<
42                        crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput,
43                        crate::operation::update_continuous_backups::UpdateContinuousBackupsError,
44                    >,
45                > {
46                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
47                }
48            }
49impl UpdateContinuousBackupsFluentBuilder {
50    /// Creates a new `UpdateContinuousBackupsFluentBuilder`.
51                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
52                        Self {
53                            handle,
54                            inner: ::std::default::Default::default(),
55    config_override: ::std::option::Option::None,
56                        }
57                    }
58    /// Access the UpdateContinuousBackups as a reference.
59                    pub fn as_input(&self) -> &crate::operation::update_continuous_backups::builders::UpdateContinuousBackupsInputBuilder {
60                        &self.inner
61                    }
62    /// Sends the request and returns the response.
63                    ///
64                    /// If an error occurs, an `SdkError` will be returned with additional details that
65                    /// can be matched against.
66                    ///
67                    /// By default, any retryable failures will be retried twice. Retry behavior
68                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
69                    /// set when configuring the client. Note: retries are enabled by default when using
70                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
71                    pub async fn send(self) -> ::std::result::Result<crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_continuous_backups::UpdateContinuousBackupsError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
72                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
73                        let runtime_plugins = crate::operation::update_continuous_backups::UpdateContinuousBackups::operation_runtime_plugins(
74                            self.handle.runtime_plugins.clone(),
75                            &self.handle.conf,
76                            self.config_override,
77                        );
78                        crate::operation::update_continuous_backups::UpdateContinuousBackups::orchestrate(&runtime_plugins, input).await
79                    }
80    
81                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
82                    pub fn customize(
83                        self,
84                    ) -> crate::client::customize::CustomizableOperation<crate::operation::update_continuous_backups::UpdateContinuousBackupsOutput, crate::operation::update_continuous_backups::UpdateContinuousBackupsError, Self> {
85                        crate::client::customize::CustomizableOperation::new(self)
86                    }
87    pub(crate) fn config_override(
88                            mut self,
89                            config_override: impl ::std::convert::Into<crate::config::Builder>,
90                        ) -> Self {
91                            self.set_config_override(::std::option::Option::Some(config_override.into()));
92                            self
93                        }
94    
95                        pub(crate) fn set_config_override(
96                            &mut self,
97                            config_override: ::std::option::Option<crate::config::Builder>,
98                        ) -> &mut Self {
99                            self.config_override = config_override;
100                            self
101                        }
102    /// <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
103    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104                    self.inner = self.inner.table_name(input.into());
105                    self
106                }
107    /// <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
108    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109                    self.inner = self.inner.set_table_name(input);
110                    self
111                }
112    /// <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
113    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
114                    self.inner.get_table_name()
115                }
116    /// <p>Represents the settings used to enable point in time recovery.</p>
117    pub fn point_in_time_recovery_specification(mut self, input: crate::types::PointInTimeRecoverySpecification) -> Self {
118                    self.inner = self.inner.point_in_time_recovery_specification(input);
119                    self
120                }
121    /// <p>Represents the settings used to enable point in time recovery.</p>
122    pub fn set_point_in_time_recovery_specification(mut self, input: ::std::option::Option<crate::types::PointInTimeRecoverySpecification>) -> Self {
123                    self.inner = self.inner.set_point_in_time_recovery_specification(input);
124                    self
125                }
126    /// <p>Represents the settings used to enable point in time recovery.</p>
127    pub fn get_point_in_time_recovery_specification(&self) -> &::std::option::Option<crate::types::PointInTimeRecoverySpecification> {
128                    self.inner.get_point_in_time_recovery_specification()
129                }
130}
131