aws_sdk_dynamodb/operation/export_table_to_point_in_time/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::export_table_to_point_in_time::_export_table_to_point_in_time_output::ExportTableToPointInTimeOutputBuilder;
3
4pub use crate::operation::export_table_to_point_in_time::_export_table_to_point_in_time_input::ExportTableToPointInTimeInputBuilder;
5
6impl crate::operation::export_table_to_point_in_time::builders::ExportTableToPointInTimeInputBuilder {
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::export_table_to_point_in_time::ExportTableToPointInTimeOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.export_table_to_point_in_time();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ExportTableToPointInTime`.
24///
25/// <p>Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ExportTableToPointInTimeFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::export_table_to_point_in_time::builders::ExportTableToPointInTimeInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeOutput,
35        crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeError,
36    > for ExportTableToPointInTimeFluentBuilder
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::export_table_to_point_in_time::ExportTableToPointInTimeOutput,
44            crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ExportTableToPointInTimeFluentBuilder {
51    /// Creates a new `ExportTableToPointInTimeFluentBuilder`.
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 ExportTableToPointInTime as a reference.
60    pub fn as_input(&self) -> &crate::operation::export_table_to_point_in_time::builders::ExportTableToPointInTimeInputBuilder {
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(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::export_table_to_point_in_time::ExportTableToPointInTime::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::export_table_to_point_in_time::ExportTableToPointInTime::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeOutput,
97        crate::operation::export_table_to_point_in_time::ExportTableToPointInTimeError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The Amazon Resource Name (ARN) associated with the table to export.</p>
112    pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.table_arn(input.into());
114        self
115    }
116    /// <p>The Amazon Resource Name (ARN) associated with the table to export.</p>
117    pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_table_arn(input);
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) associated with the table to export.</p>
122    pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_table_arn()
124    }
125    /// <p>Time in the past from which to export table data, counted in seconds from the start of the Unix epoch. The table export will be a snapshot of the table's state at this point in time.</p>
126    pub fn export_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
127        self.inner = self.inner.export_time(input);
128        self
129    }
130    /// <p>Time in the past from which to export table data, counted in seconds from the start of the Unix epoch. The table export will be a snapshot of the table's state at this point in time.</p>
131    pub fn set_export_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
132        self.inner = self.inner.set_export_time(input);
133        self
134    }
135    /// <p>Time in the past from which to export table data, counted in seconds from the start of the Unix epoch. The table export will be a snapshot of the table's state at this point in time.</p>
136    pub fn get_export_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
137        self.inner.get_export_time()
138    }
139    /// <p>Providing a <code>ClientToken</code> makes the call to <code>ExportTableToPointInTimeInput</code> idempotent, meaning that multiple identical calls have the same effect as one single call.</p>
140    /// <p>A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent.</p>
141    /// <p>If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, DynamoDB returns an <code>ImportConflictException</code>.</p>
142    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.client_token(input.into());
144        self
145    }
146    /// <p>Providing a <code>ClientToken</code> makes the call to <code>ExportTableToPointInTimeInput</code> idempotent, meaning that multiple identical calls have the same effect as one single call.</p>
147    /// <p>A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent.</p>
148    /// <p>If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, DynamoDB returns an <code>ImportConflictException</code>.</p>
149    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_client_token(input);
151        self
152    }
153    /// <p>Providing a <code>ClientToken</code> makes the call to <code>ExportTableToPointInTimeInput</code> idempotent, meaning that multiple identical calls have the same effect as one single call.</p>
154    /// <p>A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent.</p>
155    /// <p>If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, DynamoDB returns an <code>ImportConflictException</code>.</p>
156    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_client_token()
158    }
159    /// <p>The name of the Amazon S3 bucket to export the snapshot to.</p>
160    pub fn s3_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.inner = self.inner.s3_bucket(input.into());
162        self
163    }
164    /// <p>The name of the Amazon S3 bucket to export the snapshot to.</p>
165    pub fn set_s3_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.inner = self.inner.set_s3_bucket(input);
167        self
168    }
169    /// <p>The name of the Amazon S3 bucket to export the snapshot to.</p>
170    pub fn get_s3_bucket(&self) -> &::std::option::Option<::std::string::String> {
171        self.inner.get_s3_bucket()
172    }
173    /// <p>The ID of the Amazon Web Services account that owns the bucket the export will be stored in.</p><note>
174    /// <p>S3BucketOwner is a required parameter when exporting to a S3 bucket in another account.</p>
175    /// </note>
176    pub fn s3_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.inner = self.inner.s3_bucket_owner(input.into());
178        self
179    }
180    /// <p>The ID of the Amazon Web Services account that owns the bucket the export will be stored in.</p><note>
181    /// <p>S3BucketOwner is a required parameter when exporting to a S3 bucket in another account.</p>
182    /// </note>
183    pub fn set_s3_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.inner = self.inner.set_s3_bucket_owner(input);
185        self
186    }
187    /// <p>The ID of the Amazon Web Services account that owns the bucket the export will be stored in.</p><note>
188    /// <p>S3BucketOwner is a required parameter when exporting to a S3 bucket in another account.</p>
189    /// </note>
190    pub fn get_s3_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
191        self.inner.get_s3_bucket_owner()
192    }
193    /// <p>The Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.</p>
194    pub fn s3_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.s3_prefix(input.into());
196        self
197    }
198    /// <p>The Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.</p>
199    pub fn set_s3_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.inner = self.inner.set_s3_prefix(input);
201        self
202    }
203    /// <p>The Amazon S3 bucket prefix to use as the file name and path of the exported snapshot.</p>
204    pub fn get_s3_prefix(&self) -> &::std::option::Option<::std::string::String> {
205        self.inner.get_s3_prefix()
206    }
207    /// <p>Type of encryption used on the bucket where export data will be stored. Valid values for <code>S3SseAlgorithm</code> are:</p>
208    /// <ul>
209    /// <li>
210    /// <p><code>AES256</code> - server-side encryption with Amazon S3 managed keys</p></li>
211    /// <li>
212    /// <p><code>KMS</code> - server-side encryption with KMS managed keys</p></li>
213    /// </ul>
214    pub fn s3_sse_algorithm(mut self, input: crate::types::S3SseAlgorithm) -> Self {
215        self.inner = self.inner.s3_sse_algorithm(input);
216        self
217    }
218    /// <p>Type of encryption used on the bucket where export data will be stored. Valid values for <code>S3SseAlgorithm</code> are:</p>
219    /// <ul>
220    /// <li>
221    /// <p><code>AES256</code> - server-side encryption with Amazon S3 managed keys</p></li>
222    /// <li>
223    /// <p><code>KMS</code> - server-side encryption with KMS managed keys</p></li>
224    /// </ul>
225    pub fn set_s3_sse_algorithm(mut self, input: ::std::option::Option<crate::types::S3SseAlgorithm>) -> Self {
226        self.inner = self.inner.set_s3_sse_algorithm(input);
227        self
228    }
229    /// <p>Type of encryption used on the bucket where export data will be stored. Valid values for <code>S3SseAlgorithm</code> are:</p>
230    /// <ul>
231    /// <li>
232    /// <p><code>AES256</code> - server-side encryption with Amazon S3 managed keys</p></li>
233    /// <li>
234    /// <p><code>KMS</code> - server-side encryption with KMS managed keys</p></li>
235    /// </ul>
236    pub fn get_s3_sse_algorithm(&self) -> &::std::option::Option<crate::types::S3SseAlgorithm> {
237        self.inner.get_s3_sse_algorithm()
238    }
239    /// <p>The ID of the KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).</p>
240    pub fn s3_sse_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241        self.inner = self.inner.s3_sse_kms_key_id(input.into());
242        self
243    }
244    /// <p>The ID of the KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).</p>
245    pub fn set_s3_sse_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.inner = self.inner.set_s3_sse_kms_key_id(input);
247        self
248    }
249    /// <p>The ID of the KMS managed key used to encrypt the S3 bucket where export data will be stored (if applicable).</p>
250    pub fn get_s3_sse_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
251        self.inner.get_s3_sse_kms_key_id()
252    }
253    /// <p>The format for the exported data. Valid values for <code>ExportFormat</code> are <code>DYNAMODB_JSON</code> or <code>ION</code>.</p>
254    pub fn export_format(mut self, input: crate::types::ExportFormat) -> Self {
255        self.inner = self.inner.export_format(input);
256        self
257    }
258    /// <p>The format for the exported data. Valid values for <code>ExportFormat</code> are <code>DYNAMODB_JSON</code> or <code>ION</code>.</p>
259    pub fn set_export_format(mut self, input: ::std::option::Option<crate::types::ExportFormat>) -> Self {
260        self.inner = self.inner.set_export_format(input);
261        self
262    }
263    /// <p>The format for the exported data. Valid values for <code>ExportFormat</code> are <code>DYNAMODB_JSON</code> or <code>ION</code>.</p>
264    pub fn get_export_format(&self) -> &::std::option::Option<crate::types::ExportFormat> {
265        self.inner.get_export_format()
266    }
267    /// <p>Choice of whether to execute as a full export or incremental export. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the IncrementalExportSpecification must also be used.</p>
268    pub fn export_type(mut self, input: crate::types::ExportType) -> Self {
269        self.inner = self.inner.export_type(input);
270        self
271    }
272    /// <p>Choice of whether to execute as a full export or incremental export. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the IncrementalExportSpecification must also be used.</p>
273    pub fn set_export_type(mut self, input: ::std::option::Option<crate::types::ExportType>) -> Self {
274        self.inner = self.inner.set_export_type(input);
275        self
276    }
277    /// <p>Choice of whether to execute as a full export or incremental export. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is FULL_EXPORT. If INCREMENTAL_EXPORT is provided, the IncrementalExportSpecification must also be used.</p>
278    pub fn get_export_type(&self) -> &::std::option::Option<crate::types::ExportType> {
279        self.inner.get_export_type()
280    }
281    /// <p>Optional object containing the parameters specific to an incremental export.</p>
282    pub fn incremental_export_specification(mut self, input: crate::types::IncrementalExportSpecification) -> Self {
283        self.inner = self.inner.incremental_export_specification(input);
284        self
285    }
286    /// <p>Optional object containing the parameters specific to an incremental export.</p>
287    pub fn set_incremental_export_specification(mut self, input: ::std::option::Option<crate::types::IncrementalExportSpecification>) -> Self {
288        self.inner = self.inner.set_incremental_export_specification(input);
289        self
290    }
291    /// <p>Optional object containing the parameters specific to an incremental export.</p>
292    pub fn get_incremental_export_specification(&self) -> &::std::option::Option<crate::types::IncrementalExportSpecification> {
293        self.inner.get_incremental_export_specification()
294    }
295}