aws_sdk_databasemigration/operation/start_replication/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_replication::_start_replication_output::StartReplicationOutputBuilder;
3
4pub use crate::operation::start_replication::_start_replication_input::StartReplicationInputBuilder;
5
6impl crate::operation::start_replication::builders::StartReplicationInputBuilder {
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::start_replication::StartReplicationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::start_replication::StartReplicationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.start_replication();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `StartReplication`.
24///
25/// <p>For a given DMS Serverless replication configuration, DMS connects to the source endpoint and collects the metadata to analyze the replication workload. Using this metadata, DMS then computes and provisions the required capacity and starts replicating to the target endpoint using the server resources that DMS has provisioned for the DMS Serverless replication.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct StartReplicationFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::start_replication::builders::StartReplicationInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::start_replication::StartReplicationOutput,
35 crate::operation::start_replication::StartReplicationError,
36 > for StartReplicationFluentBuilder
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::start_replication::StartReplicationOutput,
44 crate::operation::start_replication::StartReplicationError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl StartReplicationFluentBuilder {
51 /// Creates a new `StartReplicationFluentBuilder`.
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 StartReplication as a reference.
60 pub fn as_input(&self) -> &crate::operation::start_replication::builders::StartReplicationInputBuilder {
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::start_replication::StartReplicationOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::start_replication::StartReplicationError,
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::start_replication::StartReplication::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::start_replication::StartReplication::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::start_replication::StartReplicationOutput,
97 crate::operation::start_replication::StartReplicationError,
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 of the replication for which to start replication.</p>
112 pub fn replication_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.replication_config_arn(input.into());
114 self
115 }
116 /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
117 pub fn set_replication_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_replication_config_arn(input);
119 self
120 }
121 /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
122 pub fn get_replication_config_arn(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_replication_config_arn()
124 }
125 /// <p>The replication type.</p>
126 /// <p>When the replication type is <code>full-load</code> or <code>full-load-and-cdc</code>, the only valid value for the first run of the replication is <code>start-replication</code>. This option will start the replication.</p>
127 /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
128 /// <p>The <code>resume-processing</code> option isn't applicable for a full-load replication, because you can't resume partially loaded tables during the full load phase.</p>
129 /// <p>For a <code>full-load-and-cdc</code> replication, DMS migrates table data, and then applies data changes that occur on the source. To load all the tables again, and start capturing source changes, use <code>reload-target</code>. Otherwise use <code>resume-processing</code>, to replicate the changes from the last stop position.</p>
130 pub fn start_replication_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.inner = self.inner.start_replication_type(input.into());
132 self
133 }
134 /// <p>The replication type.</p>
135 /// <p>When the replication type is <code>full-load</code> or <code>full-load-and-cdc</code>, the only valid value for the first run of the replication is <code>start-replication</code>. This option will start the replication.</p>
136 /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
137 /// <p>The <code>resume-processing</code> option isn't applicable for a full-load replication, because you can't resume partially loaded tables during the full load phase.</p>
138 /// <p>For a <code>full-load-and-cdc</code> replication, DMS migrates table data, and then applies data changes that occur on the source. To load all the tables again, and start capturing source changes, use <code>reload-target</code>. Otherwise use <code>resume-processing</code>, to replicate the changes from the last stop position.</p>
139 pub fn set_start_replication_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_start_replication_type(input);
141 self
142 }
143 /// <p>The replication type.</p>
144 /// <p>When the replication type is <code>full-load</code> or <code>full-load-and-cdc</code>, the only valid value for the first run of the replication is <code>start-replication</code>. This option will start the replication.</p>
145 /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
146 /// <p>The <code>resume-processing</code> option isn't applicable for a full-load replication, because you can't resume partially loaded tables during the full load phase.</p>
147 /// <p>For a <code>full-load-and-cdc</code> replication, DMS migrates table data, and then applies data changes that occur on the source. To load all the tables again, and start capturing source changes, use <code>reload-target</code>. Otherwise use <code>resume-processing</code>, to replicate the changes from the last stop position.</p>
148 pub fn get_start_replication_type(&self) -> &::std::option::Option<::std::string::String> {
149 self.inner.get_start_replication_type()
150 }
151 /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
152 /// <ul>
153 /// <li>
154 /// <p><code>ResultLocationFolder</code>: The folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p></li>
155 /// <li>
156 /// <p><code>ResultEncryptionMode</code>: The supported values are <code>SSE_KMS</code> and <code>SSE_S3</code>. If these values are not provided, then the files are not encrypted at rest. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.KMSKeys">Creating Amazon Web Services KMS keys to encrypt Amazon S3 target objects</a>.</p></li>
157 /// <li>
158 /// <p><code>ResultKmsKeyArn</code>: The ARN of a customer KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>SSE_KMS</code>.</p></li>
159 /// <li>
160 /// <p><code>IncludeOnly</code>: A space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that Database Migration Service supports for the associated migration.</p></li>
161 /// <li>
162 /// <p><code>Exclude</code>: A space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that Database Migration Service supports for the associated migration.</p></li>
163 /// <li>
164 /// <p><code>FailOnAssessmentFailure</code>: A configurable setting you can set to <code>true</code> (the default setting) or <code>false</code>. Use this setting to to stop the replication from starting automatically if the assessment fails. This can help you evaluate the issue that is preventing the replication from running successfully.</p></li>
165 /// </ul>
166 pub fn premigration_assessment_settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.inner = self.inner.premigration_assessment_settings(input.into());
168 self
169 }
170 /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
171 /// <ul>
172 /// <li>
173 /// <p><code>ResultLocationFolder</code>: The folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p></li>
174 /// <li>
175 /// <p><code>ResultEncryptionMode</code>: The supported values are <code>SSE_KMS</code> and <code>SSE_S3</code>. If these values are not provided, then the files are not encrypted at rest. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.KMSKeys">Creating Amazon Web Services KMS keys to encrypt Amazon S3 target objects</a>.</p></li>
176 /// <li>
177 /// <p><code>ResultKmsKeyArn</code>: The ARN of a customer KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>SSE_KMS</code>.</p></li>
178 /// <li>
179 /// <p><code>IncludeOnly</code>: A space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that Database Migration Service supports for the associated migration.</p></li>
180 /// <li>
181 /// <p><code>Exclude</code>: A space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that Database Migration Service supports for the associated migration.</p></li>
182 /// <li>
183 /// <p><code>FailOnAssessmentFailure</code>: A configurable setting you can set to <code>true</code> (the default setting) or <code>false</code>. Use this setting to to stop the replication from starting automatically if the assessment fails. This can help you evaluate the issue that is preventing the replication from running successfully.</p></li>
184 /// </ul>
185 pub fn set_premigration_assessment_settings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_premigration_assessment_settings(input);
187 self
188 }
189 /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
190 /// <ul>
191 /// <li>
192 /// <p><code>ResultLocationFolder</code>: The folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p></li>
193 /// <li>
194 /// <p><code>ResultEncryptionMode</code>: The supported values are <code>SSE_KMS</code> and <code>SSE_S3</code>. If these values are not provided, then the files are not encrypted at rest. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.KMSKeys">Creating Amazon Web Services KMS keys to encrypt Amazon S3 target objects</a>.</p></li>
195 /// <li>
196 /// <p><code>ResultKmsKeyArn</code>: The ARN of a customer KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>SSE_KMS</code>.</p></li>
197 /// <li>
198 /// <p><code>IncludeOnly</code>: A space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that Database Migration Service supports for the associated migration.</p></li>
199 /// <li>
200 /// <p><code>Exclude</code>: A space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that Database Migration Service supports for the associated migration.</p></li>
201 /// <li>
202 /// <p><code>FailOnAssessmentFailure</code>: A configurable setting you can set to <code>true</code> (the default setting) or <code>false</code>. Use this setting to to stop the replication from starting automatically if the assessment fails. This can help you evaluate the issue that is preventing the replication from running successfully.</p></li>
203 /// </ul>
204 pub fn get_premigration_assessment_settings(&self) -> &::std::option::Option<::std::string::String> {
205 self.inner.get_premigration_assessment_settings()
206 }
207 /// <p>Indicates the start time for a change data capture (CDC) operation. Use either <code>CdcStartTime</code> or <code>CdcStartPosition</code> to specify when you want a CDC operation to start. Specifying both values results in an error.</p>
208 pub fn cdc_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
209 self.inner = self.inner.cdc_start_time(input);
210 self
211 }
212 /// <p>Indicates the start time for a change data capture (CDC) operation. Use either <code>CdcStartTime</code> or <code>CdcStartPosition</code> to specify when you want a CDC operation to start. Specifying both values results in an error.</p>
213 pub fn set_cdc_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
214 self.inner = self.inner.set_cdc_start_time(input);
215 self
216 }
217 /// <p>Indicates the start time for a change data capture (CDC) operation. Use either <code>CdcStartTime</code> or <code>CdcStartPosition</code> to specify when you want a CDC operation to start. Specifying both values results in an error.</p>
218 pub fn get_cdc_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
219 self.inner.get_cdc_start_time()
220 }
221 /// <p>Indicates when you want a change data capture (CDC) operation to start. Use either <code>CdcStartPosition</code> or <code>CdcStartTime</code> to specify when you want a CDC operation to start. Specifying both values results in an error.</p>
222 /// <p>The value can be in date, checkpoint, or LSN/SCN format.</p>
223 pub fn cdc_start_position(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224 self.inner = self.inner.cdc_start_position(input.into());
225 self
226 }
227 /// <p>Indicates when you want a change data capture (CDC) operation to start. Use either <code>CdcStartPosition</code> or <code>CdcStartTime</code> to specify when you want a CDC operation to start. Specifying both values results in an error.</p>
228 /// <p>The value can be in date, checkpoint, or LSN/SCN format.</p>
229 pub fn set_cdc_start_position(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.inner = self.inner.set_cdc_start_position(input);
231 self
232 }
233 /// <p>Indicates when you want a change data capture (CDC) operation to start. Use either <code>CdcStartPosition</code> or <code>CdcStartTime</code> to specify when you want a CDC operation to start. Specifying both values results in an error.</p>
234 /// <p>The value can be in date, checkpoint, or LSN/SCN format.</p>
235 pub fn get_cdc_start_position(&self) -> &::std::option::Option<::std::string::String> {
236 self.inner.get_cdc_start_position()
237 }
238 /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
239 pub fn cdc_stop_position(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.inner = self.inner.cdc_stop_position(input.into());
241 self
242 }
243 /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
244 pub fn set_cdc_stop_position(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.inner = self.inner.set_cdc_stop_position(input);
246 self
247 }
248 /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
249 pub fn get_cdc_stop_position(&self) -> &::std::option::Option<::std::string::String> {
250 self.inner.get_cdc_stop_position()
251 }
252}