Skip to content

Commit

Permalink
Introduces TargetDataSettings with the TablePreparationMode option av…
Browse files Browse the repository at this point in the history
…ailable for data migrations.
  • Loading branch information
aws-sdk-dotnet-automation committed Feb 4, 2025
1 parent d4aa2c1 commit cb158be
Show file tree
Hide file tree
Showing 16 changed files with 462 additions and 19 deletions.
21 changes: 21 additions & 0 deletions generator/ServiceModels/dms/dms-2016-01-01.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,7 @@
"ServiceAccessRoleArn":{"shape":"String"},
"EnableCloudwatchLogs":{"shape":"BooleanOptional"},
"SourceDataSettings":{"shape":"SourceDataSettings"},
"TargetDataSettings":{"shape":"TargetDataSettings"},
"NumberOfJobs":{"shape":"IntegerOptional"},
"Tags":{"shape":"TagList"},
"SelectionRules":{"shape":"SecretString"}
Expand Down Expand Up @@ -2180,6 +2181,7 @@
"DataMigrationType":{"shape":"MigrationTypeValue"},
"DataMigrationSettings":{"shape":"DataMigrationSettings"},
"SourceDataSettings":{"shape":"SourceDataSettings"},
"TargetDataSettings":{"shape":"TargetDataSettings"},
"DataMigrationStatistics":{"shape":"DataMigrationStatistics"},
"DataMigrationStatus":{"shape":"String"},
"PublicIpAddresses":{"shape":"PublicIpAddressList"},
Expand Down Expand Up @@ -3947,6 +3949,7 @@
"ServiceAccessRoleArn":{"shape":"String"},
"DataMigrationType":{"shape":"MigrationTypeValue"},
"SourceDataSettings":{"shape":"SourceDataSettings"},
"TargetDataSettings":{"shape":"TargetDataSettings"},
"NumberOfJobs":{"shape":"IntegerOptional"},
"SelectionRules":{"shape":"SecretString"}
}
Expand Down Expand Up @@ -5557,6 +5560,14 @@
"type":"list",
"member":{"shape":"TableToReload"}
},
"TablePreparationMode":{
"type":"string",
"enum":[
"do-nothing",
"truncate",
"drop-tables-on-target"
]
},
"TableStatistics":{
"type":"structure",
"members":{
Expand Down Expand Up @@ -5612,6 +5623,16 @@
"type":"list",
"member":{"shape":"Tag"}
},
"TargetDataSetting":{
"type":"structure",
"members":{
"TablePreparationMode":{"shape":"TablePreparationMode"}
}
},
"TargetDataSettings":{
"type":"list",
"member":{"shape":"TargetDataSetting"}
},
"TargetDbType":{
"type":"string",
"enum":[
Expand Down
32 changes: 26 additions & 6 deletions generator/ServiceModels/dms/dms-2016-01-01.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@
}
},
"KerberosAuthenticationSettings": {
"base": "<p>Specifies using Kerberos authentication settings for use with DMS.</p>",
"base": "<p>Specifies the settings required for kerberos authentication when creating the replication instance.</p>",
"refs": {
"CreateReplicationInstanceMessage$KerberosAuthenticationSettings": "<p>Specifies the ID of the secret that stores the key cache file required for kerberos authentication, when creating a replication instance.</p>",
"ModifyReplicationInstanceMessage$KerberosAuthenticationSettings": "<p>Specifies the ID of the secret that stores the key cache file required for kerberos authentication, when modifying a replication instance.</p>",
Expand Down Expand Up @@ -2278,7 +2278,7 @@
"OracleAuthenticationMethod": {
"base": null,
"refs": {
"OracleSettings$AuthenticationMethod": "<p>Specifies using Kerberos authentication with Oracle.</p>"
"OracleSettings$AuthenticationMethod": "<p>Specifies the authentication method to be used with Oracle.</p>"
}
},
"OracleDataProviderSettings": {
Expand Down Expand Up @@ -2902,7 +2902,7 @@
"SqlServerAuthenticationMethod": {
"base": null,
"refs": {
"MicrosoftSQLServerSettings$AuthenticationMethod": "<p>Specifies using Kerberos authentication with Microsoft SQL Server.</p>"
"MicrosoftSQLServerSettings$AuthenticationMethod": "<p>Specifies the authentication method to be used with Microsoft SQL Server.</p>"
}
},
"SslSecurityProtocolValue": {
Expand Down Expand Up @@ -3439,9 +3439,9 @@
"KafkaSettings$SslClientKeyArn": "<p>The Amazon Resource Name (ARN) for the client private key used to securely connect to a Kafka target endpoint.</p>",
"KafkaSettings$SslCaCertificateArn": "<p> The Amazon Resource Name (ARN) for the private certificate authority (CA) cert that DMS uses to securely connect to your Kafka target endpoint.</p>",
"KafkaSettings$SaslUsername": "<p> The secure user name you created when you first set up your MSK cluster to validate a client identity and make an encrypted connection between server and client using SASL-SSL authentication.</p>",
"KerberosAuthenticationSettings$KeyCacheSecretId": "<p>Specifies the secret ID of the key cache for the replication instance.</p>",
"KerberosAuthenticationSettings$KeyCacheSecretIamArn": "<p>Specifies the Amazon Resource Name (ARN) of the IAM role that grants Amazon Web Services DMS access to the secret containing key cache file for the replication instance.</p>",
"KerberosAuthenticationSettings$Krb5FileContents": "<p>Specifies the ID of the secret that stores the key cache file required for kerberos authentication of the replication instance.</p>",
"KerberosAuthenticationSettings$KeyCacheSecretId": "<p>Specifies the ID of the secret that stores the key cache file required for kerberos authentication.</p>",
"KerberosAuthenticationSettings$KeyCacheSecretIamArn": "<p>Specifies the Amazon Resource Name (ARN) of the IAM role that grants Amazon Web Services DMS access to the secret containing key cache file for the kerberos authentication.</p>",
"KerberosAuthenticationSettings$Krb5FileContents": "<p>Specifies the contents of krb5 configuration file required for kerberos authentication.</p>",
"KeyList$member": null,
"KinesisSettings$StreamArn": "<p>The Amazon Resource Name (ARN) for the Amazon Kinesis Data Streams endpoint.</p>",
"KinesisSettings$ServiceAccessRoleArn": "<p>The Amazon Resource Name (ARN) for the IAM role that DMS uses to write to the Kinesis data stream. The role must allow the <code>iam:PassRole</code> action.</p>",
Expand Down Expand Up @@ -3934,6 +3934,12 @@
"ReloadTablesMessage$TablesToReload": "<p>The name and schema of the table to be reloaded. </p>"
}
},
"TablePreparationMode": {
"base": null,
"refs": {
"TargetDataSetting$TablePreparationMode": "<p>This setting determines how DMS handles the target tables before starting a data migration, either by leaving them untouched, dropping and recreating them, or truncating the existing data in the target tables.</p>"
}
},
"TableStatistics": {
"base": "<p>Provides a collection of table statistics in response to a request by the <code>DescribeTableStatistics</code> operation.</p>",
"refs": {
Expand Down Expand Up @@ -3978,6 +3984,20 @@
"StartReplicationTaskAssessmentRunMessage$Tags": "<p>One or more tags to be assigned to the premigration assessment run that you want to start.</p>"
}
},
"TargetDataSetting": {
"base": "<p>Defines settings for a target data provider for a data migration.</p>",
"refs": {
"TargetDataSettings$member": null
}
},
"TargetDataSettings": {
"base": null,
"refs": {
"CreateDataMigrationMessage$TargetDataSettings": "<p>Specifies information about the target data provider.</p>",
"DataMigration$TargetDataSettings": "<p>Specifies information about the data migration's target data provider.</p>",
"ModifyDataMigrationMessage$TargetDataSettings": "<p>The new information about the target data provider for the data migration.</p>"
}
},
"TargetDbType": {
"base": null,
"refs": {
Expand Down
46 changes: 40 additions & 6 deletions generator/ServiceModels/dms/dms-2016-01-01.normal.json
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,10 @@
"shape":"SourceDataSettings",
"documentation":"<p>Specifies information about the source data provider.</p>"
},
"TargetDataSettings":{
"shape":"TargetDataSettings",
"documentation":"<p>Specifies information about the target data provider.</p>"
},
"NumberOfJobs":{
"shape":"IntegerOptional",
"documentation":"<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>"
Expand Down Expand Up @@ -2933,6 +2937,10 @@
"shape":"SourceDataSettings",
"documentation":"<p>Specifies information about the data migration's source data provider.</p>"
},
"TargetDataSettings":{
"shape":"TargetDataSettings",
"documentation":"<p>Specifies information about the data migration's target data provider.</p>"
},
"DataMigrationStatistics":{
"shape":"DataMigrationStatistics",
"documentation":"<p>Provides information about the data migration's run, including start and stop time, latency, and data migration progress.</p>"
Expand Down Expand Up @@ -6135,18 +6143,18 @@
"members":{
"KeyCacheSecretId":{
"shape":"String",
"documentation":"<p>Specifies the secret ID of the key cache for the replication instance.</p>"
"documentation":"<p>Specifies the ID of the secret that stores the key cache file required for kerberos authentication.</p>"
},
"KeyCacheSecretIamArn":{
"shape":"String",
"documentation":"<p>Specifies the Amazon Resource Name (ARN) of the IAM role that grants Amazon Web Services DMS access to the secret containing key cache file for the replication instance.</p>"
"documentation":"<p>Specifies the Amazon Resource Name (ARN) of the IAM role that grants Amazon Web Services DMS access to the secret containing key cache file for the kerberos authentication.</p>"
},
"Krb5FileContents":{
"shape":"String",
"documentation":"<p>Specifies the ID of the secret that stores the key cache file required for kerberos authentication of the replication instance.</p>"
"documentation":"<p>Specifies the contents of krb5 configuration file required for kerberos authentication.</p>"
}
},
"documentation":"<p>Specifies using Kerberos authentication settings for use with DMS.</p>"
"documentation":"<p>Specifies the settings required for kerberos authentication when creating the replication instance.</p>"
},
"KeyList":{
"type":"list",
Expand Down Expand Up @@ -6376,7 +6384,7 @@
},
"AuthenticationMethod":{
"shape":"SqlServerAuthenticationMethod",
"documentation":"<p>Specifies using Kerberos authentication with Microsoft SQL Server.</p>"
"documentation":"<p>Specifies the authentication method to be used with Microsoft SQL Server.</p>"
}
},
"documentation":"<p>Provides information that defines a Microsoft SQL Server endpoint.</p>"
Expand Down Expand Up @@ -6519,6 +6527,10 @@
"shape":"SourceDataSettings",
"documentation":"<p>The new information about the source data provider for the data migration.</p>"
},
"TargetDataSettings":{
"shape":"TargetDataSettings",
"documentation":"<p>The new information about the target data provider for the data migration.</p>"
},
"NumberOfJobs":{
"shape":"IntegerOptional",
"documentation":"<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>"
Expand Down Expand Up @@ -7567,7 +7579,7 @@
},
"AuthenticationMethod":{
"shape":"OracleAuthenticationMethod",
"documentation":"<p>Specifies using Kerberos authentication with Oracle.</p>"
"documentation":"<p>Specifies the authentication method to be used with Oracle.</p>"
}
},
"documentation":"<p>Provides information that defines an Oracle endpoint.</p>"
Expand Down Expand Up @@ -10175,6 +10187,14 @@
"type":"list",
"member":{"shape":"TableToReload"}
},
"TablePreparationMode":{
"type":"string",
"enum":[
"do-nothing",
"truncate",
"drop-tables-on-target"
]
},
"TableStatistics":{
"type":"structure",
"members":{
Expand Down Expand Up @@ -10317,6 +10337,20 @@
"type":"list",
"member":{"shape":"Tag"}
},
"TargetDataSetting":{
"type":"structure",
"members":{
"TablePreparationMode":{
"shape":"TablePreparationMode",
"documentation":"<p>This setting determines how DMS handles the target tables before starting a data migration, either by leaving them untouched, dropping and recreating them, or truncating the existing data in the target tables.</p>"
}
},
"documentation":"<p>Defines settings for a target data provider for a data migration.</p>"
},
"TargetDataSettings":{
"type":"list",
"member":{"shape":"TargetDataSetting"}
},
"TargetDbType":{
"type":"string",
"enum":[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public partial class CreateDataMigrationRequest : AmazonDatabaseMigrationService
private string _serviceAccessRoleArn;
private List<SourceDataSetting> _sourceDataSettings = AWSConfigs.InitializeCollections ? new List<SourceDataSetting>() : null;
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
private List<TargetDataSetting> _targetDataSettings = AWSConfigs.InitializeCollections ? new List<TargetDataSetting>() : null;

/// <summary>
/// Gets and sets the property DataMigrationName.
Expand Down Expand Up @@ -230,5 +231,23 @@ internal bool IsSetTags()
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
}

/// <summary>
/// Gets and sets the property TargetDataSettings.
/// <para>
/// Specifies information about the target data provider.
/// </para>
/// </summary>
public List<TargetDataSetting> TargetDataSettings
{
get { return this._targetDataSettings; }
set { this._targetDataSettings = value; }
}

// Check to see if TargetDataSettings property is set
internal bool IsSetTargetDataSettings()
{
return this._targetDataSettings != null && (this._targetDataSettings.Count > 0 || !AWSConfigs.InitializeCollections);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public partial class DataMigration
private string _serviceAccessRoleArn;
private List<SourceDataSetting> _sourceDataSettings = AWSConfigs.InitializeCollections ? new List<SourceDataSetting>() : null;
private string _stopReason;
private List<TargetDataSetting> _targetDataSettings = AWSConfigs.InitializeCollections ? new List<TargetDataSetting>() : null;

/// <summary>
/// Gets and sets the property DataMigrationArn.
Expand Down Expand Up @@ -342,5 +343,23 @@ internal bool IsSetStopReason()
return this._stopReason != null;
}

/// <summary>
/// Gets and sets the property TargetDataSettings.
/// <para>
/// Specifies information about the data migration's target data provider.
/// </para>
/// </summary>
public List<TargetDataSetting> TargetDataSettings
{
get { return this._targetDataSettings; }
set { this._targetDataSettings = value; }
}

// Check to see if TargetDataSettings property is set
internal bool IsSetTargetDataSettings()
{
return this._targetDataSettings != null && (this._targetDataSettings.Count > 0 || !AWSConfigs.InitializeCollections);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ public IRequest Marshall(CreateDataMigrationRequest publicRequest)
context.Writer.WriteArrayEnd();
}

if(publicRequest.IsSetTargetDataSettings())
{
context.Writer.WritePropertyName("TargetDataSettings");
context.Writer.WriteArrayStart();
foreach(var publicRequestTargetDataSettingsListValue in publicRequest.TargetDataSettings)
{
context.Writer.WriteObjectStart();

var marshaller = TargetDataSettingMarshaller.Instance;
marshaller.Marshall(publicRequestTargetDataSettingsListValue, context);

context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}

writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ public DataMigration Unmarshall(JsonUnmarshallerContext context)
unmarshalledObject.StopReason = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TargetDataSettings", targetDepth))
{
var unmarshaller = new ListUnmarshaller<TargetDataSetting, TargetDataSettingUnmarshaller>(TargetDataSettingUnmarshaller.Instance);
unmarshalledObject.TargetDataSettings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,22 @@ public IRequest Marshall(ModifyDataMigrationRequest publicRequest)
context.Writer.WriteArrayEnd();
}

if(publicRequest.IsSetTargetDataSettings())
{
context.Writer.WritePropertyName("TargetDataSettings");
context.Writer.WriteArrayStart();
foreach(var publicRequestTargetDataSettingsListValue in publicRequest.TargetDataSettings)
{
context.Writer.WriteObjectStart();

var marshaller = TargetDataSettingMarshaller.Instance;
marshaller.Marshall(publicRequestTargetDataSettingsListValue, context);

context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}

writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
Expand Down
Loading

0 comments on commit cb158be

Please sign in to comment.