Class: AWSCDK::DMS::CfnEndpoint::GcpMySQLSettingsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dms/cfn_endpoint.rb

Overview

Provides information that defines a GCP MySQL endpoint.

This information includes the output format of records applied to the endpoint and details of transaction and control table data information. These settings are much the same as the settings for any MySQL-compatible endpoint. For more information, see Extra connection attributes when using MySQL as a source for AWS DMS in the AWS Database Migration Service User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(after_connect_script: nil, clean_source_metadata_on_mismatch: nil, database_name: nil, events_poll_interval: nil, max_file_size: nil, parallel_load_threads: nil, password: nil, port: nil, secrets_manager_access_role_arn: nil, secrets_manager_secret_id: nil, server_name: nil, server_timezone: nil, username: nil) ⇒ GcpMySQLSettingsProperty

Returns a new instance of GcpMySQLSettingsProperty.

Parameters:

  • after_connect_script (String, nil) (defaults to: nil)

    Specifies a script to run immediately after AWS DMS connects to the endpoint.

  • clean_source_metadata_on_mismatch (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Adjusts the behavior of AWS DMS when migrating from an SQL Server source database that is hosted as part of an Always On availability group cluster.

  • database_name (String, nil) (defaults to: nil)

    Database name for the endpoint.

  • events_poll_interval (Numeric, nil) (defaults to: nil)

    Specifies how often to check the binary log for new changes/events when the database is idle.

  • max_file_size (Numeric, nil) (defaults to: nil)

    Specifies the maximum size (in KB) of any .csv file used to transfer data to a MySQL-compatible database.

  • parallel_load_threads (Numeric, nil) (defaults to: nil)

    Improves performance when loading data into the MySQL-compatible target database.

  • password (String, nil) (defaults to: nil)

    Endpoint connection password.

  • port (Numeric, nil) (defaults to: nil)

    The port used by the endpoint database.

  • secrets_manager_access_role_arn (String, nil) (defaults to: nil)

    The full Amazon Resource Name (ARN) of the IAM role that specifies AWS DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret. The role must allow the iam:PassRole action. SecretsManagerSecret has the value of the AWS Secrets Manager secret that allows access to the MySQL endpoint.

  • secrets_manager_secret_id (String, nil) (defaults to: nil)

    The full ARN, partial ARN, or display name of the SecretsManagerSecret that contains the MySQL endpoint connection details.

  • server_name (String, nil) (defaults to: nil)

    The MySQL host name.

  • server_timezone (String, nil) (defaults to: nil)

    Specifies the time zone for the source MySQL database. Don't enclose time zones in single quotation marks.

  • username (String, nil) (defaults to: nil)

    Endpoint connection user name.



1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
# File 'dms/cfn_endpoint.rb', line 1158

def initialize(after_connect_script: nil, clean_source_metadata_on_mismatch: nil, database_name: nil, events_poll_interval: nil, max_file_size: nil, parallel_load_threads: nil, password: nil, port: nil, secrets_manager_access_role_arn: nil, secrets_manager_secret_id: nil, server_name: nil, server_timezone: nil, username: nil)
  @after_connect_script = after_connect_script
  Jsii::Type.check_type(@after_connect_script, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "afterConnectScript") unless @after_connect_script.nil?
  @clean_source_metadata_on_mismatch = 
  Jsii::Type.check_type(@clean_source_metadata_on_mismatch, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "cleanSourceMetadataOnMismatch") unless @clean_source_metadata_on_mismatch.nil?
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName") unless @database_name.nil?
  @events_poll_interval = events_poll_interval
  Jsii::Type.check_type(@events_poll_interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "eventsPollInterval") unless @events_poll_interval.nil?
  @max_file_size = max_file_size
  Jsii::Type.check_type(@max_file_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxFileSize") unless @max_file_size.nil?
  @parallel_load_threads = parallel_load_threads
  Jsii::Type.check_type(@parallel_load_threads, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "parallelLoadThreads") unless @parallel_load_threads.nil?
  @password = password
  Jsii::Type.check_type(@password, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "password") unless @password.nil?
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil?
  @secrets_manager_access_role_arn = secrets_manager_access_role_arn
  Jsii::Type.check_type(@secrets_manager_access_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretsManagerAccessRoleArn") unless @secrets_manager_access_role_arn.nil?
  @secrets_manager_secret_id = secrets_manager_secret_id
  Jsii::Type.check_type(@secrets_manager_secret_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretsManagerSecretId") unless @secrets_manager_secret_id.nil?
  @server_name = server_name
  Jsii::Type.check_type(@server_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverName") unless @server_name.nil?
  @server_timezone = server_timezone
  Jsii::Type.check_type(@server_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverTimezone") unless @server_timezone.nil?
  @username = username
  Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username") unless @username.nil?
end

Instance Attribute Details

#after_connect_scriptString? (readonly)

Specifies a script to run immediately after AWS DMS connects to the endpoint.

The migration task continues running regardless if the SQL statement succeeds or fails.

For this parameter, provide the code of the script itself, not the name of a file containing the script.



1195
1196
1197
# File 'dms/cfn_endpoint.rb', line 1195

def after_connect_script
  @after_connect_script
end

#clean_source_metadata_on_mismatchBoolean, ... (readonly)

Adjusts the behavior of AWS DMS when migrating from an SQL Server source database that is hosted as part of an Always On availability group cluster.

If you need AWS DMS to poll all the nodes in the Always On cluster for transaction backups, set this attribute to false .



1202
1203
1204
# File 'dms/cfn_endpoint.rb', line 1202

def 
  @clean_source_metadata_on_mismatch
end

#database_nameString? (readonly)

Database name for the endpoint.

For a MySQL source or target endpoint, don't explicitly specify the database using the DatabaseName request parameter on either the CreateEndpoint or ModifyEndpoint API call. Specifying DatabaseName when you create or modify a MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify the database only when you specify the schema in the table-mapping rules of the AWS DMS task.



1209
1210
1211
# File 'dms/cfn_endpoint.rb', line 1209

def database_name
  @database_name
end

#events_poll_intervalNumeric? (readonly)

Specifies how often to check the binary log for new changes/events when the database is idle.

The default is five seconds.

Example: eventsPollInterval=5;

In the example, AWS DMS checks for changes in the binary logs every five seconds.



1220
1221
1222
# File 'dms/cfn_endpoint.rb', line 1220

def events_poll_interval
  @events_poll_interval
end

#max_file_sizeNumeric? (readonly)

Specifies the maximum size (in KB) of any .csv file used to transfer data to a MySQL-compatible database.

Example: maxFileSize=512



1227
1228
1229
# File 'dms/cfn_endpoint.rb', line 1227

def max_file_size
  @max_file_size
end

#parallel_load_threadsNumeric? (readonly)

Improves performance when loading data into the MySQL-compatible target database.

Specifies how many threads to use to load the data into the MySQL-compatible target database. Setting a large number of threads can have an adverse effect on database performance, because a separate connection is required for each thread. The default is one.

Example: parallelLoadThreads=1



1236
1237
1238
# File 'dms/cfn_endpoint.rb', line 1236

def parallel_load_threads
  @parallel_load_threads
end

#passwordString? (readonly)

Endpoint connection password.



1241
1242
1243
# File 'dms/cfn_endpoint.rb', line 1241

def password
  @password
end

#portNumeric? (readonly)

The port used by the endpoint database.



1246
1247
1248
# File 'dms/cfn_endpoint.rb', line 1246

def port
  @port
end

#secrets_manager_access_role_arnString? (readonly)

The full Amazon Resource Name (ARN) of the IAM role that specifies AWS DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret. The role must allow the iam:PassRole action. SecretsManagerSecret has the value of the AWS Secrets Manager secret that allows access to the MySQL endpoint.

You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId . Or you can specify clear-text values for UserName , Password , ServerName , and Port . You can't specify both.

For more information on creating this SecretsManagerSecret , the corresponding SecretsManagerAccessRoleArn , and the SecretsManagerSecretId required to access it, see Using secrets to access AWS Database Migration Service resources in the AWS Database Migration Service User Guide .



1255
1256
1257
# File 'dms/cfn_endpoint.rb', line 1255

def secrets_manager_access_role_arn
  @secrets_manager_access_role_arn
end

#secrets_manager_secret_idString? (readonly)

The full ARN, partial ARN, or display name of the SecretsManagerSecret that contains the MySQL endpoint connection details.



1260
1261
1262
# File 'dms/cfn_endpoint.rb', line 1260

def secrets_manager_secret_id
  @secrets_manager_secret_id
end

#server_nameString? (readonly)

The MySQL host name.



1265
1266
1267
# File 'dms/cfn_endpoint.rb', line 1265

def server_name
  @server_name
end

#server_timezoneString? (readonly)

Specifies the time zone for the source MySQL database. Don't enclose time zones in single quotation marks.

Example: serverTimezone=US/Pacific;



1272
1273
1274
# File 'dms/cfn_endpoint.rb', line 1272

def server_timezone
  @server_timezone
end

#usernameString? (readonly)

Endpoint connection user name.



1277
1278
1279
# File 'dms/cfn_endpoint.rb', line 1277

def username
  @username
end

Class Method Details

.jsii_propertiesObject



1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
# File 'dms/cfn_endpoint.rb', line 1279

def self.jsii_properties
  {
    :after_connect_script => "afterConnectScript",
    :clean_source_metadata_on_mismatch => "cleanSourceMetadataOnMismatch",
    :database_name => "databaseName",
    :events_poll_interval => "eventsPollInterval",
    :max_file_size => "maxFileSize",
    :parallel_load_threads => "parallelLoadThreads",
    :password => "password",
    :port => "port",
    :secrets_manager_access_role_arn => "secretsManagerAccessRoleArn",
    :secrets_manager_secret_id => "secretsManagerSecretId",
    :server_name => "serverName",
    :server_timezone => "serverTimezone",
    :username => "username",
  }
end

Instance Method Details

#to_jsiiObject



1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
# File 'dms/cfn_endpoint.rb', line 1297

def to_jsii
  result = {}
  result.merge!({
    "afterConnectScript" => @after_connect_script,
    "cleanSourceMetadataOnMismatch" => @clean_source_metadata_on_mismatch,
    "databaseName" => @database_name,
    "eventsPollInterval" => @events_poll_interval,
    "maxFileSize" => @max_file_size,
    "parallelLoadThreads" => @parallel_load_threads,
    "password" => @password,
    "port" => @port,
    "secretsManagerAccessRoleArn" => @secrets_manager_access_role_arn,
    "secretsManagerSecretId" => @secrets_manager_secret_id,
    "serverName" => @server_name,
    "serverTimezone" => @server_timezone,
    "username" => @username,
  })
  result.compact
end