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(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::list_backups::ListBackupsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_backups::ListBackupsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_backups();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListBackups`.
24///
25/// <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>
26/// <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>
27/// <p>You can call <code>ListBackups</code> a maximum of five times per second.</p>
28/// <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>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct ListBackupsFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::list_backups::builders::ListBackupsInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::list_backups::ListBackupsOutput,
38 crate::operation::list_backups::ListBackupsError,
39 > for ListBackupsFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::list_backups::ListBackupsOutput,
47 crate::operation::list_backups::ListBackupsError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl ListBackupsFluentBuilder {
54 /// Creates a new `ListBackupsFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the ListBackups as a reference.
63 pub fn as_input(&self) -> &crate::operation::list_backups::builders::ListBackupsInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::list_backups::ListBackupsOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::list_backups::ListBackupsError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::list_backups::ListBackups::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::list_backups::ListBackups::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::list_backups::ListBackupsOutput,
100 crate::operation::list_backups::ListBackupsError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// <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>
115 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.table_name(input.into());
117 self
118 }
119 /// <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>
120 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_table_name(input);
122 self
123 }
124 /// <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>
125 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_table_name()
127 }
128 /// <p>Maximum number of backups to return at once.</p>
129 pub fn limit(mut self, input: i32) -> Self {
130 self.inner = self.inner.limit(input);
131 self
132 }
133 /// <p>Maximum number of backups to return at once.</p>
134 pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
135 self.inner = self.inner.set_limit(input);
136 self
137 }
138 /// <p>Maximum number of backups to return at once.</p>
139 pub fn get_limit(&self) -> &::std::option::Option<i32> {
140 self.inner.get_limit()
141 }
142 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
143 pub fn time_range_lower_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
144 self.inner = self.inner.time_range_lower_bound(input);
145 self
146 }
147 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
148 pub fn set_time_range_lower_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
149 self.inner = self.inner.set_time_range_lower_bound(input);
150 self
151 }
152 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
153 pub fn get_time_range_lower_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
154 self.inner.get_time_range_lower_bound()
155 }
156 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
157 pub fn time_range_upper_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
158 self.inner = self.inner.time_range_upper_bound(input);
159 self
160 }
161 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
162 pub fn set_time_range_upper_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
163 self.inner = self.inner.set_time_range_upper_bound(input);
164 self
165 }
166 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
167 pub fn get_time_range_upper_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
168 self.inner.get_time_range_upper_bound()
169 }
170 /// <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>
171 pub fn exclusive_start_backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.inner = self.inner.exclusive_start_backup_arn(input.into());
173 self
174 }
175 /// <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>
176 pub fn set_exclusive_start_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_exclusive_start_backup_arn(input);
178 self
179 }
180 /// <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>
181 pub fn get_exclusive_start_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
182 self.inner.get_exclusive_start_backup_arn()
183 }
184 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
185 /// <p>Where <code>BackupType</code> can be:</p>
186 /// <ul>
187 /// <li>
188 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
189 /// <li>
190 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
191 /// <li>
192 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
193 /// </ul>
194 pub fn backup_type(mut self, input: crate::types::BackupTypeFilter) -> Self {
195 self.inner = self.inner.backup_type(input);
196 self
197 }
198 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
199 /// <p>Where <code>BackupType</code> can be:</p>
200 /// <ul>
201 /// <li>
202 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
203 /// <li>
204 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
205 /// <li>
206 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
207 /// </ul>
208 pub fn set_backup_type(mut self, input: ::std::option::Option<crate::types::BackupTypeFilter>) -> Self {
209 self.inner = self.inner.set_backup_type(input);
210 self
211 }
212 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
213 /// <p>Where <code>BackupType</code> can be:</p>
214 /// <ul>
215 /// <li>
216 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
217 /// <li>
218 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
219 /// <li>
220 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
221 /// </ul>
222 pub fn get_backup_type(&self) -> &::std::option::Option<crate::types::BackupTypeFilter> {
223 self.inner.get_backup_type()
224 }
225}