Skip to content

Commit 9869064

Browse files
Enhanced PostgreSQL target endpoint settings for providing Babelfish support.
1 parent 365b932 commit 9869064

File tree

7 files changed

+146
-1
lines changed

7 files changed

+146
-1
lines changed

generator/ServiceModels/dms/dms-2016-01-01.api.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,13 @@
15581558
"type":"list",
15591559
"member":{"shape":"DatabaseResponse"}
15601560
},
1561+
"DatabaseMode":{
1562+
"type":"string",
1563+
"enum":[
1564+
"default",
1565+
"babelfish"
1566+
]
1567+
},
15611568
"DatabaseResponse":{
15621569
"type":"structure",
15631570
"members":{
@@ -3128,7 +3135,9 @@
31283135
"TrimSpaceInChar":{"shape":"BooleanOptional"},
31293136
"MapBooleanAsBoolean":{"shape":"BooleanOptional"},
31303137
"MapJsonbAsClob":{"shape":"BooleanOptional"},
3131-
"MapLongVarcharAs":{"shape":"LongVarcharMappingType"}
3138+
"MapLongVarcharAs":{"shape":"LongVarcharMappingType"},
3139+
"DatabaseMode":{"shape":"DatabaseMode"},
3140+
"BabelfishDatabaseName":{"shape":"String"}
31323141
}
31333142
},
31343143
"ProvisionData":{

generator/ServiceModels/dms/dms-2016-01-01.docs.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,12 @@
485485
"DescribeFleetAdvisorDatabasesResponse$Databases": "<p>Provides descriptions of the Fleet Advisor collector databases, including the database's collector, ID, and name.</p>"
486486
}
487487
},
488+
"DatabaseMode": {
489+
"base": null,
490+
"refs": {
491+
"PostgreSQLSettings$DatabaseMode": "<p>Specifies whether to use default or custom replication behavior for PostgreSQL-compatible endpoints. You can use this setting to specify replication behavior for endpoints that require additional configuration, such as Babelfish endpoints.</p>"
492+
}
493+
},
488494
"DatabaseResponse": {
489495
"base": "<p>Describes a database in a Fleet Advisor collector inventory.</p>",
490496
"refs": {
@@ -2649,6 +2655,7 @@
26492655
"PostgreSQLSettings$SlotName": "<p>Sets the name of a previously created logical replication slot for a change data capture (CDC) load of the PostgreSQL source instance. </p> <p>When used with the <code>CdcStartPosition</code> request parameter for the DMS API , this attribute also makes it possible to use native CDC start points. DMS verifies that the specified logical replication slot exists before starting the CDC load task. It also verifies that the task was created with a valid setting of <code>CdcStartPosition</code>. If the specified slot doesn't exist or the task doesn't have a valid <code>CdcStartPosition</code> setting, DMS raises an error.</p> <p>For more information about setting the <code>CdcStartPosition</code> request parameter, see <a href=\"https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Task.CDC.html#CHAP_Task.CDC.StartPoint.Native\">Determining a CDC native start point</a> in the <i>Database Migration Service User Guide</i>. For more information about using <code>CdcStartPosition</code>, see <a href=\"https://docs.aws.amazon.com/dms/latest/APIReference/API_CreateReplicationTask.html\">CreateReplicationTask</a>, <a href=\"https://docs.aws.amazon.com/dms/latest/APIReference/API_StartReplicationTask.html\">StartReplicationTask</a>, and <a href=\"https://docs.aws.amazon.com/dms/latest/APIReference/API_ModifyReplicationTask.html\">ModifyReplicationTask</a>.</p>",
26502656
"PostgreSQLSettings$SecretsManagerAccessRoleArn": "<p>The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in <code>SecretsManagerSecret</code>. The role must allow the <code>iam:PassRole</code> action. <code>SecretsManagerSecret</code> has the value of the Amazon Web Services Secrets Manager secret that allows access to the PostgreSQL endpoint.</p> <note> <p>You can specify one of two sets of values for these permissions. You can specify the values for this setting and <code>SecretsManagerSecretId</code>. Or you can specify clear-text values for <code>UserName</code>, <code>Password</code>, <code>ServerName</code>, and <code>Port</code>. You can't specify both. For more information on creating this <code>SecretsManagerSecret</code> and the <code>SecretsManagerAccessRoleArn</code> and <code>SecretsManagerSecretId</code> required to access it, see <a href=\"https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#security-iam-secretsmanager\">Using secrets to access Database Migration Service resources</a> in the <i>Database Migration Service User Guide</i>.</p> </note>",
26512657
"PostgreSQLSettings$SecretsManagerSecretId": "<p>The full ARN, partial ARN, or friendly name of the <code>SecretsManagerSecret</code> that contains the PostgreSQL endpoint connection details.</p>",
2658+
"PostgreSQLSettings$BabelfishDatabaseName": "<p>The Babelfish for Aurora PostgreSQL database name for the endpoint.</p>",
26522659
"ProvisionData$ProvisionState": "<p>The current provisioning state </p>",
26532660
"ProvisionData$ReasonForNewProvisioningData": "<p>A message describing the reason that DMS provisioned new resources for the serverless replication.</p>",
26542661
"RdsConfiguration$EngineEdition": "<p>Describes the recommended target Amazon RDS engine edition.</p>",

generator/ServiceModels/dms/dms-2016-01-01.normal.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,6 +2161,13 @@
21612161
"type":"list",
21622162
"member":{"shape":"DatabaseResponse"}
21632163
},
2164+
"DatabaseMode":{
2165+
"type":"string",
2166+
"enum":[
2167+
"default",
2168+
"babelfish"
2169+
]
2170+
},
21642171
"DatabaseResponse":{
21652172
"type":"structure",
21662173
"members":{
@@ -5582,6 +5589,14 @@
55825589
"MapLongVarcharAs":{
55835590
"shape":"LongVarcharMappingType",
55845591
"documentation":"<p>When true, DMS migrates LONG values as VARCHAR.</p>"
5592+
},
5593+
"DatabaseMode":{
5594+
"shape":"DatabaseMode",
5595+
"documentation":"<p>Specifies whether to use default or custom replication behavior for PostgreSQL-compatible endpoints. You can use this setting to specify replication behavior for endpoints that require additional configuration, such as Babelfish endpoints.</p>"
5596+
},
5597+
"BabelfishDatabaseName":{
5598+
"shape":"String",
5599+
"documentation":"<p>The Babelfish for Aurora PostgreSQL database name for the endpoint.</p>"
55855600
}
55865601
},
55875602
"documentation":"<p>Provides information that defines a PostgreSQL endpoint.</p>"

sdk/src/Services/DatabaseMigrationService/Generated/Model/Internal/MarshallTransformations/PostgreSQLSettingsMarshaller.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,24 @@ public void Marshall(PostgreSQLSettings requestObject, JsonMarshallerContext con
5151
context.Writer.Write(requestObject.AfterConnectScript);
5252
}
5353

54+
if(requestObject.IsSetBabelfishDatabaseName())
55+
{
56+
context.Writer.WritePropertyName("BabelfishDatabaseName");
57+
context.Writer.Write(requestObject.BabelfishDatabaseName);
58+
}
59+
5460
if(requestObject.IsSetCaptureDdls())
5561
{
5662
context.Writer.WritePropertyName("CaptureDdls");
5763
context.Writer.Write(requestObject.CaptureDdls);
5864
}
5965

66+
if(requestObject.IsSetDatabaseMode())
67+
{
68+
context.Writer.WritePropertyName("DatabaseMode");
69+
context.Writer.Write(requestObject.DatabaseMode);
70+
}
71+
6072
if(requestObject.IsSetDatabaseName())
6173
{
6274
context.Writer.WritePropertyName("DatabaseName");

sdk/src/Services/DatabaseMigrationService/Generated/Model/Internal/MarshallTransformations/PostgreSQLSettingsUnmarshaller.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,24 @@ public PostgreSQLSettings Unmarshall(JsonUnmarshallerContext context)
7070
unmarshalledObject.AfterConnectScript = unmarshaller.Unmarshall(context);
7171
continue;
7272
}
73+
if (context.TestExpression("BabelfishDatabaseName", targetDepth))
74+
{
75+
var unmarshaller = StringUnmarshaller.Instance;
76+
unmarshalledObject.BabelfishDatabaseName = unmarshaller.Unmarshall(context);
77+
continue;
78+
}
7379
if (context.TestExpression("CaptureDdls", targetDepth))
7480
{
7581
var unmarshaller = BoolUnmarshaller.Instance;
7682
unmarshalledObject.CaptureDdls = unmarshaller.Unmarshall(context);
7783
continue;
7884
}
85+
if (context.TestExpression("DatabaseMode", targetDepth))
86+
{
87+
var unmarshaller = StringUnmarshaller.Instance;
88+
unmarshalledObject.DatabaseMode = unmarshaller.Unmarshall(context);
89+
continue;
90+
}
7991
if (context.TestExpression("DatabaseName", targetDepth))
8092
{
8193
var unmarshaller = StringUnmarshaller.Instance;

sdk/src/Services/DatabaseMigrationService/Generated/Model/PostgreSQLSettings.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ namespace Amazon.DatabaseMigrationService.Model
3434
public partial class PostgreSQLSettings
3535
{
3636
private string _afterConnectScript;
37+
private string _babelfishDatabaseName;
3738
private bool? _captureDdls;
39+
private DatabaseMode _databaseMode;
3840
private string _databaseName;
3941
private string _ddlArtifactsSchema;
4042
private int? _executeTimeout;
@@ -79,6 +81,24 @@ internal bool IsSetAfterConnectScript()
7981
return this._afterConnectScript != null;
8082
}
8183

84+
/// <summary>
85+
/// Gets and sets the property BabelfishDatabaseName.
86+
/// <para>
87+
/// The Babelfish for Aurora PostgreSQL database name for the endpoint.
88+
/// </para>
89+
/// </summary>
90+
public string BabelfishDatabaseName
91+
{
92+
get { return this._babelfishDatabaseName; }
93+
set { this._babelfishDatabaseName = value; }
94+
}
95+
96+
// Check to see if BabelfishDatabaseName property is set
97+
internal bool IsSetBabelfishDatabaseName()
98+
{
99+
return this._babelfishDatabaseName != null;
100+
}
101+
82102
/// <summary>
83103
/// Gets and sets the property CaptureDdls.
84104
/// <para>
@@ -103,6 +123,26 @@ internal bool IsSetCaptureDdls()
103123
return this._captureDdls.HasValue;
104124
}
105125

126+
/// <summary>
127+
/// Gets and sets the property DatabaseMode.
128+
/// <para>
129+
/// Specifies whether to use default or custom replication behavior for PostgreSQL-compatible
130+
/// endpoints. You can use this setting to specify replication behavior for endpoints
131+
/// that require additional configuration, such as Babelfish endpoints.
132+
/// </para>
133+
/// </summary>
134+
public DatabaseMode DatabaseMode
135+
{
136+
get { return this._databaseMode; }
137+
set { this._databaseMode = value; }
138+
}
139+
140+
// Check to see if DatabaseMode property is set
141+
internal bool IsSetDatabaseMode()
142+
{
143+
return this._databaseMode != null;
144+
}
145+
106146
/// <summary>
107147
/// Gets and sets the property DatabaseName.
108148
/// <para>

sdk/src/Services/DatabaseMigrationService/Generated/ServiceEnumerations.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,56 @@ public static implicit operator CompressionTypeValue(string value)
356356
}
357357

358358

359+
/// <summary>
360+
/// Constants used for properties of type DatabaseMode.
361+
/// </summary>
362+
public class DatabaseMode : ConstantClass
363+
{
364+
365+
/// <summary>
366+
/// Constant Babelfish for DatabaseMode
367+
/// </summary>
368+
public static readonly DatabaseMode Babelfish = new DatabaseMode("babelfish");
369+
/// <summary>
370+
/// Constant Default for DatabaseMode
371+
/// </summary>
372+
public static readonly DatabaseMode Default = new DatabaseMode("default");
373+
374+
/// <summary>
375+
/// This constant constructor does not need to be called if the constant
376+
/// you are attempting to use is already defined as a static instance of
377+
/// this class.
378+
/// This constructor should be used to construct constants that are not
379+
/// defined as statics, for instance if attempting to use a feature that is
380+
/// newer than the current version of the SDK.
381+
/// </summary>
382+
public DatabaseMode(string value)
383+
: base(value)
384+
{
385+
}
386+
387+
/// <summary>
388+
/// Finds the constant for the unique value.
389+
/// </summary>
390+
/// <param name="value">The unique value for the constant</param>
391+
/// <returns>The constant for the unique value</returns>
392+
public static DatabaseMode FindValue(string value)
393+
{
394+
return FindValue<DatabaseMode>(value);
395+
}
396+
397+
/// <summary>
398+
/// Utility method to convert strings to the constant class.
399+
/// </summary>
400+
/// <param name="value">The string value to convert to the constant class.</param>
401+
/// <returns></returns>
402+
public static implicit operator DatabaseMode(string value)
403+
{
404+
return FindValue(value);
405+
}
406+
}
407+
408+
359409
/// <summary>
360410
/// Constants used for properties of type DataFormatValue.
361411
/// </summary>

0 commit comments

Comments
 (0)