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.
71                    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>> {
72                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
73                        let runtime_plugins = crate::operation::list_backups::ListBackups::operation_runtime_plugins(
74                            self.handle.runtime_plugins.clone(),
75                            &self.handle.conf,
76                            self.config_override,
77                        );
78                        crate::operation::list_backups::ListBackups::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::list_backups::ListBackupsOutput, crate::operation::list_backups::ListBackupsError, 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>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>
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>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>
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>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>
113    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
114                    self.inner.get_table_name()
115                }
116    /// <p>Maximum number of backups to return at once.</p>
117    pub fn limit(mut self, input: i32) -> Self {
118                    self.inner = self.inner.limit(input);
119                    self
120                }
121    /// <p>Maximum number of backups to return at once.</p>
122    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
123                    self.inner = self.inner.set_limit(input);
124                    self
125                }
126    /// <p>Maximum number of backups to return at once.</p>
127    pub fn get_limit(&self) -> &::std::option::Option<i32> {
128                    self.inner.get_limit()
129                }
130    /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
131    pub fn time_range_lower_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
132                    self.inner = self.inner.time_range_lower_bound(input);
133                    self
134                }
135    /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
136    pub fn set_time_range_lower_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
137                    self.inner = self.inner.set_time_range_lower_bound(input);
138                    self
139                }
140    /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
141    pub fn get_time_range_lower_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
142                    self.inner.get_time_range_lower_bound()
143                }
144    /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
145    pub fn time_range_upper_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
146                    self.inner = self.inner.time_range_upper_bound(input);
147                    self
148                }
149    /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
150    pub fn set_time_range_upper_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
151                    self.inner = self.inner.set_time_range_upper_bound(input);
152                    self
153                }
154    /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
155    pub fn get_time_range_upper_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
156                    self.inner.get_time_range_upper_bound()
157                }
158    /// <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>
159    pub fn exclusive_start_backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160                    self.inner = self.inner.exclusive_start_backup_arn(input.into());
161                    self
162                }
163    /// <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>
164    pub fn set_exclusive_start_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165                    self.inner = self.inner.set_exclusive_start_backup_arn(input);
166                    self
167                }
168    /// <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>
169    pub fn get_exclusive_start_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
170                    self.inner.get_exclusive_start_backup_arn()
171                }
172    /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
173    /// <p>Where <code>BackupType</code> can be:</p>
174    /// <ul>
175    /// <li>
176    /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
177    /// <li>
178    /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
179    /// <li>
180    /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
181    /// </ul>
182    pub fn backup_type(mut self, input: crate::types::BackupTypeFilter) -> Self {
183                    self.inner = self.inner.backup_type(input);
184                    self
185                }
186    /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
187    /// <p>Where <code>BackupType</code> can be:</p>
188    /// <ul>
189    /// <li>
190    /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
191    /// <li>
192    /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
193    /// <li>
194    /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
195    /// </ul>
196    pub fn set_backup_type(mut self, input: ::std::option::Option<crate::types::BackupTypeFilter>) -> Self {
197                    self.inner = self.inner.set_backup_type(input);
198                    self
199                }
200    /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
201    /// <p>Where <code>BackupType</code> can be:</p>
202    /// <ul>
203    /// <li>
204    /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
205    /// <li>
206    /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
207    /// <li>
208    /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
209    /// </ul>
210    pub fn get_backup_type(&self) -> &::std::option::Option<crate::types::BackupTypeFilter> {
211                    self.inner.get_backup_type()
212                }
213}
214