1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateDataMigrationInput {
/// <p>A user-friendly name for the data migration. Data migration names have the following constraints:</p>
/// <ul>
/// <li>
/// <p>Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.</p></li>
/// <li>
/// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
/// <li>
/// <p>Length must be from 1 to 255 characters.</p></li>
/// </ul>
pub data_migration_name: ::std::option::Option<::std::string::String>,
/// <p>An identifier for the migration project.</p>
pub migration_project_identifier: ::std::option::Option<::std::string::String>,
/// <p>Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.</p>
pub data_migration_type: ::std::option::Option<crate::types::MigrationTypeValue>,
/// <p>The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.</p>
pub service_access_role_arn: ::std::option::Option<::std::string::String>,
/// <p>Specifies whether to enable CloudWatch logs for the data migration.</p>
pub enable_cloudwatch_logs: ::std::option::Option<bool>,
/// <p>Specifies information about the source data provider.</p>
pub source_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>>,
/// <p>Specifies information about the target data provider.</p>
pub target_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>>,
/// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
pub number_of_jobs: ::std::option::Option<i32>,
/// <p>One or more tags to be assigned to the data migration.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.</p>
pub selection_rules: ::std::option::Option<::std::string::String>,
}
impl CreateDataMigrationInput {
/// <p>A user-friendly name for the data migration. Data migration names have the following constraints:</p>
/// <ul>
/// <li>
/// <p>Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.</p></li>
/// <li>
/// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
/// <li>
/// <p>Length must be from 1 to 255 characters.</p></li>
/// </ul>
pub fn data_migration_name(&self) -> ::std::option::Option<&str> {
self.data_migration_name.as_deref()
}
/// <p>An identifier for the migration project.</p>
pub fn migration_project_identifier(&self) -> ::std::option::Option<&str> {
self.migration_project_identifier.as_deref()
}
/// <p>Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.</p>
pub fn data_migration_type(&self) -> ::std::option::Option<&crate::types::MigrationTypeValue> {
self.data_migration_type.as_ref()
}
/// <p>The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.</p>
pub fn service_access_role_arn(&self) -> ::std::option::Option<&str> {
self.service_access_role_arn.as_deref()
}
/// <p>Specifies whether to enable CloudWatch logs for the data migration.</p>
pub fn enable_cloudwatch_logs(&self) -> ::std::option::Option<bool> {
self.enable_cloudwatch_logs
}
/// <p>Specifies information about the source data provider.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.source_data_settings.is_none()`.
pub fn source_data_settings(&self) -> &[crate::types::SourceDataSetting] {
self.source_data_settings.as_deref().unwrap_or_default()
}
/// <p>Specifies information about the target data provider.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_data_settings.is_none()`.
pub fn target_data_settings(&self) -> &[crate::types::TargetDataSetting] {
self.target_data_settings.as_deref().unwrap_or_default()
}
/// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
pub fn number_of_jobs(&self) -> ::std::option::Option<i32> {
self.number_of_jobs
}
/// <p>One or more tags to be assigned to the data migration.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.</p>
pub fn selection_rules(&self) -> ::std::option::Option<&str> {
self.selection_rules.as_deref()
}
}
impl ::std::fmt::Debug for CreateDataMigrationInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateDataMigrationInput");
formatter.field("data_migration_name", &self.data_migration_name);
formatter.field("migration_project_identifier", &self.migration_project_identifier);
formatter.field("data_migration_type", &self.data_migration_type);
formatter.field("service_access_role_arn", &self.service_access_role_arn);
formatter.field("enable_cloudwatch_logs", &self.enable_cloudwatch_logs);
formatter.field("source_data_settings", &self.source_data_settings);
formatter.field("target_data_settings", &self.target_data_settings);
formatter.field("number_of_jobs", &self.number_of_jobs);
formatter.field("tags", &self.tags);
formatter.field("selection_rules", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl CreateDataMigrationInput {
/// Creates a new builder-style object to manufacture [`CreateDataMigrationInput`](crate::operation::create_data_migration::CreateDataMigrationInput).
pub fn builder() -> crate::operation::create_data_migration::builders::CreateDataMigrationInputBuilder {
crate::operation::create_data_migration::builders::CreateDataMigrationInputBuilder::default()
}
}
/// A builder for [`CreateDataMigrationInput`](crate::operation::create_data_migration::CreateDataMigrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateDataMigrationInputBuilder {
pub(crate) data_migration_name: ::std::option::Option<::std::string::String>,
pub(crate) migration_project_identifier: ::std::option::Option<::std::string::String>,
pub(crate) data_migration_type: ::std::option::Option<crate::types::MigrationTypeValue>,
pub(crate) service_access_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) enable_cloudwatch_logs: ::std::option::Option<bool>,
pub(crate) source_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>>,
pub(crate) target_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>>,
pub(crate) number_of_jobs: ::std::option::Option<i32>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) selection_rules: ::std::option::Option<::std::string::String>,
}
impl CreateDataMigrationInputBuilder {
/// <p>A user-friendly name for the data migration. Data migration names have the following constraints:</p>
/// <ul>
/// <li>
/// <p>Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.</p></li>
/// <li>
/// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
/// <li>
/// <p>Length must be from 1 to 255 characters.</p></li>
/// </ul>
pub fn data_migration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_migration_name = ::std::option::Option::Some(input.into());
self
}
/// <p>A user-friendly name for the data migration. Data migration names have the following constraints:</p>
/// <ul>
/// <li>
/// <p>Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.</p></li>
/// <li>
/// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
/// <li>
/// <p>Length must be from 1 to 255 characters.</p></li>
/// </ul>
pub fn set_data_migration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_migration_name = input;
self
}
/// <p>A user-friendly name for the data migration. Data migration names have the following constraints:</p>
/// <ul>
/// <li>
/// <p>Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.</p></li>
/// <li>
/// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
/// <li>
/// <p>Length must be from 1 to 255 characters.</p></li>
/// </ul>
pub fn get_data_migration_name(&self) -> &::std::option::Option<::std::string::String> {
&self.data_migration_name
}
/// <p>An identifier for the migration project.</p>
/// This field is required.
pub fn migration_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.migration_project_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>An identifier for the migration project.</p>
pub fn set_migration_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.migration_project_identifier = input;
self
}
/// <p>An identifier for the migration project.</p>
pub fn get_migration_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.migration_project_identifier
}
/// <p>Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.</p>
/// This field is required.
pub fn data_migration_type(mut self, input: crate::types::MigrationTypeValue) -> Self {
self.data_migration_type = ::std::option::Option::Some(input);
self
}
/// <p>Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.</p>
pub fn set_data_migration_type(mut self, input: ::std::option::Option<crate::types::MigrationTypeValue>) -> Self {
self.data_migration_type = input;
self
}
/// <p>Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.</p>
pub fn get_data_migration_type(&self) -> &::std::option::Option<crate::types::MigrationTypeValue> {
&self.data_migration_type
}
/// <p>The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.</p>
/// This field is required.
pub fn service_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service_access_role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.</p>
pub fn set_service_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service_access_role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.</p>
pub fn get_service_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.service_access_role_arn
}
/// <p>Specifies whether to enable CloudWatch logs for the data migration.</p>
pub fn enable_cloudwatch_logs(mut self, input: bool) -> Self {
self.enable_cloudwatch_logs = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether to enable CloudWatch logs for the data migration.</p>
pub fn set_enable_cloudwatch_logs(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_cloudwatch_logs = input;
self
}
/// <p>Specifies whether to enable CloudWatch logs for the data migration.</p>
pub fn get_enable_cloudwatch_logs(&self) -> &::std::option::Option<bool> {
&self.enable_cloudwatch_logs
}
/// Appends an item to `source_data_settings`.
///
/// To override the contents of this collection use [`set_source_data_settings`](Self::set_source_data_settings).
///
/// <p>Specifies information about the source data provider.</p>
pub fn source_data_settings(mut self, input: crate::types::SourceDataSetting) -> Self {
let mut v = self.source_data_settings.unwrap_or_default();
v.push(input);
self.source_data_settings = ::std::option::Option::Some(v);
self
}
/// <p>Specifies information about the source data provider.</p>
pub fn set_source_data_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>>) -> Self {
self.source_data_settings = input;
self
}
/// <p>Specifies information about the source data provider.</p>
pub fn get_source_data_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>> {
&self.source_data_settings
}
/// Appends an item to `target_data_settings`.
///
/// To override the contents of this collection use [`set_target_data_settings`](Self::set_target_data_settings).
///
/// <p>Specifies information about the target data provider.</p>
pub fn target_data_settings(mut self, input: crate::types::TargetDataSetting) -> Self {
let mut v = self.target_data_settings.unwrap_or_default();
v.push(input);
self.target_data_settings = ::std::option::Option::Some(v);
self
}
/// <p>Specifies information about the target data provider.</p>
pub fn set_target_data_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>>) -> Self {
self.target_data_settings = input;
self
}
/// <p>Specifies information about the target data provider.</p>
pub fn get_target_data_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>> {
&self.target_data_settings
}
/// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
pub fn number_of_jobs(mut self, input: i32) -> Self {
self.number_of_jobs = ::std::option::Option::Some(input);
self
}
/// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
pub fn set_number_of_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
self.number_of_jobs = input;
self
}
/// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
pub fn get_number_of_jobs(&self) -> &::std::option::Option<i32> {
&self.number_of_jobs
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>One or more tags to be assigned to the data migration.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>One or more tags to be assigned to the data migration.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>One or more tags to be assigned to the data migration.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.</p>
pub fn selection_rules(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.selection_rules = ::std::option::Option::Some(input.into());
self
}
/// <p>An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.</p>
pub fn set_selection_rules(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.selection_rules = input;
self
}
/// <p>An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.</p>
pub fn get_selection_rules(&self) -> &::std::option::Option<::std::string::String> {
&self.selection_rules
}
/// Consumes the builder and constructs a [`CreateDataMigrationInput`](crate::operation::create_data_migration::CreateDataMigrationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_data_migration::CreateDataMigrationInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_data_migration::CreateDataMigrationInput {
data_migration_name: self.data_migration_name,
migration_project_identifier: self.migration_project_identifier,
data_migration_type: self.data_migration_type,
service_access_role_arn: self.service_access_role_arn,
enable_cloudwatch_logs: self.enable_cloudwatch_logs,
source_data_settings: self.source_data_settings,
target_data_settings: self.target_data_settings,
number_of_jobs: self.number_of_jobs,
tags: self.tags,
selection_rules: self.selection_rules,
})
}
}
impl ::std::fmt::Debug for CreateDataMigrationInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateDataMigrationInputBuilder");
formatter.field("data_migration_name", &self.data_migration_name);
formatter.field("migration_project_identifier", &self.migration_project_identifier);
formatter.field("data_migration_type", &self.data_migration_type);
formatter.field("service_access_role_arn", &self.service_access_role_arn);
formatter.field("enable_cloudwatch_logs", &self.enable_cloudwatch_logs);
formatter.field("source_data_settings", &self.source_data_settings);
formatter.field("target_data_settings", &self.target_data_settings);
formatter.field("number_of_jobs", &self.number_of_jobs);
formatter.field("tags", &self.tags);
formatter.field("selection_rules", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}