aws_sdk_databasemigration/operation/create_replication_config/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_replication_config::_create_replication_config_output::CreateReplicationConfigOutputBuilder;
3
4pub use crate::operation::create_replication_config::_create_replication_config_input::CreateReplicationConfigInputBuilder;
5
6impl crate::operation::create_replication_config::builders::CreateReplicationConfigInputBuilder {
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::create_replication_config::CreateReplicationConfigOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_replication_config::CreateReplicationConfigError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_replication_config();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateReplicationConfig`.
24///
25/// <p>Creates a configuration that you can later provide to configure and start an DMS Serverless replication. You can also provide options to validate the configuration inputs before you start the replication.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateReplicationConfigFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_replication_config::builders::CreateReplicationConfigInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_replication_config::CreateReplicationConfigOutput,
35        crate::operation::create_replication_config::CreateReplicationConfigError,
36    > for CreateReplicationConfigFluentBuilder
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::create_replication_config::CreateReplicationConfigOutput,
44            crate::operation::create_replication_config::CreateReplicationConfigError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateReplicationConfigFluentBuilder {
51    /// Creates a new `CreateReplicationConfigFluentBuilder`.
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 CreateReplicationConfig as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_replication_config::builders::CreateReplicationConfigInputBuilder {
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::create_replication_config::CreateReplicationConfigOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_replication_config::CreateReplicationConfigError,
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::create_replication_config::CreateReplicationConfig::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_replication_config::CreateReplicationConfig::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::create_replication_config::CreateReplicationConfigOutput,
97        crate::operation::create_replication_config::CreateReplicationConfigError,
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>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
112    pub fn replication_config_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.replication_config_identifier(input.into());
114        self
115    }
116    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
117    pub fn set_replication_config_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_replication_config_identifier(input);
119        self
120    }
121    /// <p>A unique identifier that you want to use to create a <code>ReplicationConfigArn</code> that is returned as part of the output from this action. You can then pass this output <code>ReplicationConfigArn</code> as the value of the <code>ReplicationConfigArn</code> option for other actions to identify both DMS Serverless replications and replication configurations that you want those actions to operate on. For some actions, you can also use either this unique identifier or a corresponding ARN in action filters to identify the specific replication and replication configuration to operate on.</p>
122    pub fn get_replication_config_identifier(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_replication_config_identifier()
124    }
125    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
126    pub fn source_endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.source_endpoint_arn(input.into());
128        self
129    }
130    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
131    pub fn set_source_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_source_endpoint_arn(input);
133        self
134    }
135    /// <p>The Amazon Resource Name (ARN) of the source endpoint for this DMS Serverless replication configuration.</p>
136    pub fn get_source_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_source_endpoint_arn()
138    }
139    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
140    pub fn target_endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.target_endpoint_arn(input.into());
142        self
143    }
144    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
145    pub fn set_target_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_target_endpoint_arn(input);
147        self
148    }
149    /// <p>The Amazon Resource Name (ARN) of the target endpoint for this DMS serverless replication configuration.</p>
150    pub fn get_target_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_target_endpoint_arn()
152    }
153    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
154    pub fn compute_config(mut self, input: crate::types::ComputeConfig) -> Self {
155        self.inner = self.inner.compute_config(input);
156        self
157    }
158    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
159    pub fn set_compute_config(mut self, input: ::std::option::Option<crate::types::ComputeConfig>) -> Self {
160        self.inner = self.inner.set_compute_config(input);
161        self
162    }
163    /// <p>Configuration parameters for provisioning an DMS Serverless replication.</p>
164    pub fn get_compute_config(&self) -> &::std::option::Option<crate::types::ComputeConfig> {
165        self.inner.get_compute_config()
166    }
167    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
168    /// <p>Possible values:</p>
169    /// <ul>
170    /// <li>
171    /// <p><code>"full-load"</code></p></li>
172    /// <li>
173    /// <p><code>"cdc"</code></p></li>
174    /// <li>
175    /// <p><code>"full-load-and-cdc"</code></p></li>
176    /// </ul>
177    pub fn replication_type(mut self, input: crate::types::MigrationTypeValue) -> Self {
178        self.inner = self.inner.replication_type(input);
179        self
180    }
181    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
182    /// <p>Possible values:</p>
183    /// <ul>
184    /// <li>
185    /// <p><code>"full-load"</code></p></li>
186    /// <li>
187    /// <p><code>"cdc"</code></p></li>
188    /// <li>
189    /// <p><code>"full-load-and-cdc"</code></p></li>
190    /// </ul>
191    pub fn set_replication_type(mut self, input: ::std::option::Option<crate::types::MigrationTypeValue>) -> Self {
192        self.inner = self.inner.set_replication_type(input);
193        self
194    }
195    /// <p>The type of DMS Serverless replication to provision using this replication configuration.</p>
196    /// <p>Possible values:</p>
197    /// <ul>
198    /// <li>
199    /// <p><code>"full-load"</code></p></li>
200    /// <li>
201    /// <p><code>"cdc"</code></p></li>
202    /// <li>
203    /// <p><code>"full-load-and-cdc"</code></p></li>
204    /// </ul>
205    pub fn get_replication_type(&self) -> &::std::option::Option<crate::types::MigrationTypeValue> {
206        self.inner.get_replication_type()
207    }
208    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
209    pub fn table_mappings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.inner = self.inner.table_mappings(input.into());
211        self
212    }
213    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
214    pub fn set_table_mappings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215        self.inner = self.inner.set_table_mappings(input);
216        self
217    }
218    /// <p>JSON table mappings for DMS Serverless replications that are provisioned using this replication configuration. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.html"> Specifying table selection and transformations rules using JSON</a>.</p>
219    pub fn get_table_mappings(&self) -> &::std::option::Option<::std::string::String> {
220        self.inner.get_table_mappings()
221    }
222    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
223    pub fn replication_settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224        self.inner = self.inner.replication_settings(input.into());
225        self
226    }
227    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
228    pub fn set_replication_settings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229        self.inner = self.inner.set_replication_settings(input);
230        self
231    }
232    /// <p>Optional JSON settings for DMS Serverless replications that are provisioned using this replication configuration. For example, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.ChangeProcessingTuning.html"> Change processing tuning settings</a>.</p>
233    pub fn get_replication_settings(&self) -> &::std::option::Option<::std::string::String> {
234        self.inner.get_replication_settings()
235    }
236    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
237    pub fn supplemental_settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238        self.inner = self.inner.supplemental_settings(input.into());
239        self
240    }
241    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
242    pub fn set_supplemental_settings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243        self.inner = self.inner.set_supplemental_settings(input);
244        self
245    }
246    /// <p>Optional JSON settings for specifying supplemental data. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html"> Specifying supplemental data for task settings</a>.</p>
247    pub fn get_supplemental_settings(&self) -> &::std::option::Option<::std::string::String> {
248        self.inner.get_supplemental_settings()
249    }
250    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
251    pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252        self.inner = self.inner.resource_identifier(input.into());
253        self
254    }
255    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
256    pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257        self.inner = self.inner.set_resource_identifier(input);
258        self
259    }
260    /// <p>Optional unique value or name that you set for a given resource that can be used to construct an Amazon Resource Name (ARN) for that resource. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.FineGrainedAccess"> Fine-grained access control using resource names and tags</a>.</p>
261    pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> {
262        self.inner.get_resource_identifier()
263    }
264    ///
265    /// Appends an item to `Tags`.
266    ///
267    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
268    ///
269    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
270    pub fn tags(mut self, input: crate::types::Tag) -> Self {
271        self.inner = self.inner.tags(input);
272        self
273    }
274    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
275    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
276        self.inner = self.inner.set_tags(input);
277        self
278    }
279    /// <p>One or more optional tags associated with resources used by the DMS Serverless replication. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tagging.html"> Tagging resources in Database Migration Service</a>.</p>
280    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
281        self.inner.get_tags()
282    }
283}