aws_sdk_dynamodb/operation/list_backups/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_backups::_list_backups_output::ListBackupsOutputBuilder;
3
4pub use crate::operation::list_backups::_list_backups_input::ListBackupsInputBuilder;
5
6impl crate::operation::list_backups::builders::ListBackupsInputBuilder {
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::list_backups::ListBackupsOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::list_backups::ListBackupsError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.list_backups();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `ListBackups`.
21/// 
22/// <p>List DynamoDB backups that are associated with an Amazon Web Services account and weren't made with Amazon Web Services Backup. To list these backups for a given table, specify <code>TableName</code>. <code>ListBackups</code> returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a maximum number of entries to be returned in a page.</p>
23/// <p>In the request, start time is inclusive, but end time is exclusive. Note that these boundaries are for the time at which the original backup was requested.</p>
24/// <p>You can call <code>ListBackups</code> a maximum of five times per second.</p>
25/// <p>If you want to retrieve the complete list of backups made with Amazon Web Services Backup, use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_ListBackupJobs.html">Amazon Web Services Backup list API.</a></p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListBackupsFluentBuilder {
28                handle: ::std::sync::Arc<crate::client::Handle>,
29                inner: crate::operation::list_backups::builders::ListBackupsInputBuilder,
30config_override: ::std::option::Option<crate::config::Builder>,
31            }
32impl
33                crate::client::customize::internal::CustomizableSend<
34                    crate::operation::list_backups::ListBackupsOutput,
35                    crate::operation::list_backups::ListBackupsError,
36                > for ListBackupsFluentBuilder
37            {
38                fn send(
39                    self,
40                    config_override: crate::config::Builder,
41                ) -> crate::client::customize::internal::BoxFuture<
42                    crate::client::customize::internal::SendResult<
43                        crate::operation::list_backups::ListBackupsOutput,
44                        crate::operation::list_backups::ListBackupsError,
45                    >,
46                > {
47                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48                }
49            }
50impl ListBackupsFluentBuilder {
51    /// Creates a new `ListBackupsFluentBuilder`.
52                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53                        Self {
54                            handle,
55                            inner: ::std::default::Default::default(),
56    config_override: ::std::option::Option::None,
57                        }
58                    }
59    /// Access the ListBackups as a reference.
60                    pub fn as_input(&self) -> &crate::operation::list_backups::builders::ListBackupsInputBuilder {
61                        &self.inner
62                    }
63    /// Sends the request and returns the response.
64                    ///
65                    /// If an error occurs, an `SdkError` will be returned with additional details that
66                    /// can be matched against.
67                    ///
68                    /// By default, any retryable failures will be retried twice. Retry behavior
69                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70                    /// set when configuring the client. Note: retries are enabled by default when using
71                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
72                    pub async fn send(self) -> ::std::result::Result<crate::operation::list_backups::ListBackupsOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_backups::ListBackupsError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
73                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
74                        let runtime_plugins = crate::operation::list_backups::ListBackups::operation_runtime_plugins(
75                            self.handle.runtime_plugins.clone(),
76                            &self.handle.conf,
77                            self.config_override,
78                        );
79                        crate::operation::list_backups::ListBackups::orchestrate(&runtime_plugins, input).await
80                    }
81    
82                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
83                    pub fn customize(
84                        self,
85                    ) -> crate::client::customize::CustomizableOperation<crate::operation::list_backups::ListBackupsOutput, crate::operation::list_backups::ListBackupsError, Self> {
86                        crate::client::customize::CustomizableOperation::new(self)
87                    }
88    pub(crate) fn config_override(
89                            mut self,
90                            config_override: impl ::std::convert::Into<crate::config::Builder>,
91                        ) -> Self {
92                            self.set_config_override(::std::option::Option::Some(config_override.into()));
93                            self
94                        }
95    
96                        pub(crate) fn set_config_override(
97                            &mut self,
98                            config_override: ::std::option::Option<crate::config::Builder>,
99                        ) -> &mut Self {
100                            self.config_override = config_override;
101                            self
102                        }
103    /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
104    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105                    self.inner = self.inner.table_name(input.into());
106                    self
107                }
108    /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
109    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110                    self.inner = self.inner.set_table_name(input);
111                    self
112                }
113    /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
114    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
115                    self.inner.get_table_name()
116                }
117    /// <p>Maximum number of backups to return at once.</p>
118    pub fn limit(mut self, input: i32) -> Self {
119                    self.inner = self.inner.limit(input);
120                    self
121                }
122    /// <p>Maximum number of backups to return at once.</p>
123    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
124                    self.inner = self.inner.set_limit(input);
125                    self
126                }
127    /// <p>Maximum number of backups to return at once.</p>
128    pub fn get_limit(&self) -> &::std::option::Option<i32> {
129                    self.inner.get_limit()
130                }
131    /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
132    pub fn time_range_lower_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
133                    self.inner = self.inner.time_range_lower_bound(input);
134                    self
135                }
136    /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
137    pub fn set_time_range_lower_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
138                    self.inner = self.inner.set_time_range_lower_bound(input);
139                    self
140                }
141    /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
142    pub fn get_time_range_lower_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
143                    self.inner.get_time_range_lower_bound()
144                }
145    /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
146    pub fn time_range_upper_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
147                    self.inner = self.inner.time_range_upper_bound(input);
148                    self
149                }
150    /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
151    pub fn set_time_range_upper_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
152                    self.inner = self.inner.set_time_range_upper_bound(input);
153                    self
154                }
155    /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
156    pub fn get_time_range_upper_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
157                    self.inner.get_time_range_upper_bound()
158                }
159    /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (ARN) of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
160    pub fn exclusive_start_backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161                    self.inner = self.inner.exclusive_start_backup_arn(input.into());
162                    self
163                }
164    /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (ARN) of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
165    pub fn set_exclusive_start_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166                    self.inner = self.inner.set_exclusive_start_backup_arn(input);
167                    self
168                }
169    /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (ARN) of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
170    pub fn get_exclusive_start_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
171                    self.inner.get_exclusive_start_backup_arn()
172                }
173    /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
174    /// <p>Where <code>BackupType</code> can be:</p>
175    /// <ul>
176    /// <li>
177    /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
178    /// <li>
179    /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
180    /// <li>
181    /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
182    /// </ul>
183    pub fn backup_type(mut self, input: crate::types::BackupTypeFilter) -> Self {
184                    self.inner = self.inner.backup_type(input);
185                    self
186                }
187    /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
188    /// <p>Where <code>BackupType</code> can be:</p>
189    /// <ul>
190    /// <li>
191    /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
192    /// <li>
193    /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
194    /// <li>
195    /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
196    /// </ul>
197    pub fn set_backup_type(mut self, input: ::std::option::Option<crate::types::BackupTypeFilter>) -> Self {
198                    self.inner = self.inner.set_backup_type(input);
199                    self
200                }
201    /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
202    /// <p>Where <code>BackupType</code> can be:</p>
203    /// <ul>
204    /// <li>
205    /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
206    /// <li>
207    /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
208    /// <li>
209    /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
210    /// </ul>
211    pub fn get_backup_type(&self) -> &::std::option::Option<crate::types::BackupTypeFilter> {
212                    self.inner.get_backup_type()
213                }
214}
215