aws_sdk_databasemigration/operation/start_replication/
_start_replication_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StartReplicationInput {
7    /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
8    pub replication_config_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The replication type.</p>
10    /// <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>
11    /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
12    /// <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>
13    /// <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>
14    pub start_replication_type: ::std::option::Option<::std::string::String>,
15    /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
16    /// <ul>
17    /// <li>
18    /// <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>
19    /// <li>
20    /// <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>
21    /// <li>
22    /// <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>
23    /// <li>
24    /// <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>
25    /// <li>
26    /// <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>
27    /// <li>
28    /// <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>
29    /// </ul>
30    pub premigration_assessment_settings: ::std::option::Option<::std::string::String>,
31    /// <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>
32    pub cdc_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
33    /// <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>
34    /// <p>The value can be in date, checkpoint, or LSN/SCN format.</p>
35    pub cdc_start_position: ::std::option::Option<::std::string::String>,
36    /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
37    pub cdc_stop_position: ::std::option::Option<::std::string::String>,
38}
39impl StartReplicationInput {
40    /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
41    pub fn replication_config_arn(&self) -> ::std::option::Option<&str> {
42        self.replication_config_arn.as_deref()
43    }
44    /// <p>The replication type.</p>
45    /// <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>
46    /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
47    /// <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>
48    /// <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>
49    pub fn start_replication_type(&self) -> ::std::option::Option<&str> {
50        self.start_replication_type.as_deref()
51    }
52    /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
53    /// <ul>
54    /// <li>
55    /// <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>
56    /// <li>
57    /// <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>
58    /// <li>
59    /// <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>
60    /// <li>
61    /// <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>
62    /// <li>
63    /// <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>
64    /// <li>
65    /// <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>
66    /// </ul>
67    pub fn premigration_assessment_settings(&self) -> ::std::option::Option<&str> {
68        self.premigration_assessment_settings.as_deref()
69    }
70    /// <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>
71    pub fn cdc_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
72        self.cdc_start_time.as_ref()
73    }
74    /// <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>
75    /// <p>The value can be in date, checkpoint, or LSN/SCN format.</p>
76    pub fn cdc_start_position(&self) -> ::std::option::Option<&str> {
77        self.cdc_start_position.as_deref()
78    }
79    /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
80    pub fn cdc_stop_position(&self) -> ::std::option::Option<&str> {
81        self.cdc_stop_position.as_deref()
82    }
83}
84impl StartReplicationInput {
85    /// Creates a new builder-style object to manufacture [`StartReplicationInput`](crate::operation::start_replication::StartReplicationInput).
86    pub fn builder() -> crate::operation::start_replication::builders::StartReplicationInputBuilder {
87        crate::operation::start_replication::builders::StartReplicationInputBuilder::default()
88    }
89}
90
91/// A builder for [`StartReplicationInput`](crate::operation::start_replication::StartReplicationInput).
92#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
93#[non_exhaustive]
94pub struct StartReplicationInputBuilder {
95    pub(crate) replication_config_arn: ::std::option::Option<::std::string::String>,
96    pub(crate) start_replication_type: ::std::option::Option<::std::string::String>,
97    pub(crate) premigration_assessment_settings: ::std::option::Option<::std::string::String>,
98    pub(crate) cdc_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
99    pub(crate) cdc_start_position: ::std::option::Option<::std::string::String>,
100    pub(crate) cdc_stop_position: ::std::option::Option<::std::string::String>,
101}
102impl StartReplicationInputBuilder {
103    /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
104    /// This field is required.
105    pub fn replication_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.replication_config_arn = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
110    pub fn set_replication_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.replication_config_arn = input;
112        self
113    }
114    /// <p>The Amazon Resource Name of the replication for which to start replication.</p>
115    pub fn get_replication_config_arn(&self) -> &::std::option::Option<::std::string::String> {
116        &self.replication_config_arn
117    }
118    /// <p>The replication type.</p>
119    /// <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>
120    /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
121    /// <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>
122    /// <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>
123    /// This field is required.
124    pub fn start_replication_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.start_replication_type = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The replication type.</p>
129    /// <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>
130    /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
131    /// <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>
132    /// <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>
133    pub fn set_start_replication_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.start_replication_type = input;
135        self
136    }
137    /// <p>The replication type.</p>
138    /// <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>
139    /// <p>You can also use <code>ReloadTables</code> to reload specific tables that failed during replication instead of restarting the replication.</p>
140    /// <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>
141    /// <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>
142    pub fn get_start_replication_type(&self) -> &::std::option::Option<::std::string::String> {
143        &self.start_replication_type
144    }
145    /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
146    /// <ul>
147    /// <li>
148    /// <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>
149    /// <li>
150    /// <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>
151    /// <li>
152    /// <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>
153    /// <li>
154    /// <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>
155    /// <li>
156    /// <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>
157    /// <li>
158    /// <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>
159    /// </ul>
160    pub fn premigration_assessment_settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.premigration_assessment_settings = ::std::option::Option::Some(input.into());
162        self
163    }
164    /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
165    /// <ul>
166    /// <li>
167    /// <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>
168    /// <li>
169    /// <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>
170    /// <li>
171    /// <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>
172    /// <li>
173    /// <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>
174    /// <li>
175    /// <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>
176    /// <li>
177    /// <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>
178    /// </ul>
179    pub fn set_premigration_assessment_settings(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.premigration_assessment_settings = input;
181        self
182    }
183    /// <p>User-defined settings for the premigration assessment. The possible values are:</p>
184    /// <ul>
185    /// <li>
186    /// <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>
187    /// <li>
188    /// <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>
189    /// <li>
190    /// <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>
191    /// <li>
192    /// <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>
193    /// <li>
194    /// <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>
195    /// <li>
196    /// <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>
197    /// </ul>
198    pub fn get_premigration_assessment_settings(&self) -> &::std::option::Option<::std::string::String> {
199        &self.premigration_assessment_settings
200    }
201    /// <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>
202    pub fn cdc_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
203        self.cdc_start_time = ::std::option::Option::Some(input);
204        self
205    }
206    /// <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>
207    pub fn set_cdc_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
208        self.cdc_start_time = input;
209        self
210    }
211    /// <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>
212    pub fn get_cdc_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
213        &self.cdc_start_time
214    }
215    /// <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>
216    /// <p>The value can be in date, checkpoint, or LSN/SCN format.</p>
217    pub fn cdc_start_position(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218        self.cdc_start_position = ::std::option::Option::Some(input.into());
219        self
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 set_cdc_start_position(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224        self.cdc_start_position = input;
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 get_cdc_start_position(&self) -> &::std::option::Option<::std::string::String> {
230        &self.cdc_start_position
231    }
232    /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
233    pub fn cdc_stop_position(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.cdc_stop_position = ::std::option::Option::Some(input.into());
235        self
236    }
237    /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
238    pub fn set_cdc_stop_position(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239        self.cdc_stop_position = input;
240        self
241    }
242    /// <p>Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or commit time.</p>
243    pub fn get_cdc_stop_position(&self) -> &::std::option::Option<::std::string::String> {
244        &self.cdc_stop_position
245    }
246    /// Consumes the builder and constructs a [`StartReplicationInput`](crate::operation::start_replication::StartReplicationInput).
247    pub fn build(
248        self,
249    ) -> ::std::result::Result<crate::operation::start_replication::StartReplicationInput, ::aws_smithy_types::error::operation::BuildError> {
250        ::std::result::Result::Ok(crate::operation::start_replication::StartReplicationInput {
251            replication_config_arn: self.replication_config_arn,
252            start_replication_type: self.start_replication_type,
253            premigration_assessment_settings: self.premigration_assessment_settings,
254            cdc_start_time: self.cdc_start_time,
255            cdc_start_position: self.cdc_start_position,
256            cdc_stop_position: self.cdc_stop_position,
257        })
258    }
259}