Class: AWSCDK::DMS::CfnEndpoint::MySqlSettingsProperty

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

Overview

Provides information that defines a MySQL endpoint.

This information includes the output format of records applied to the endpoint and details of transaction and control table data information. For information about other available settings, see Extra connection attributes when using MySQL as a source for AWS DMS and Extra connection attributes when using a MySQL-compatible database as a target 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, events_poll_interval: nil, max_file_size: nil, parallel_load_threads: nil, secrets_manager_access_role_arn: nil, secrets_manager_secret_id: nil, server_timezone: nil, target_db_type: nil) ⇒ MySqlSettingsProperty

Returns a new instance of MySqlSettingsProperty.

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)

    Cleans and recreates table metadata information on the replication instance when a mismatch occurs.

  • 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.

  • 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 .

  • 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_timezone (String, nil) (defaults to: nil)

    Specifies the time zone for the source MySQL database.

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

    Specifies where to migrate source tables on the target, either to a single database or multiple databases.



2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
# File 'dms/cfn_endpoint.rb', line 2226

def initialize(after_connect_script: nil, clean_source_metadata_on_mismatch: nil, events_poll_interval: nil, max_file_size: nil, parallel_load_threads: nil, secrets_manager_access_role_arn: nil, secrets_manager_secret_id: nil, server_timezone: nil, target_db_type: 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?
  @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?
  @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_timezone = server_timezone
  Jsii::Type.check_type(@server_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverTimezone") unless @server_timezone.nil?
  @target_db_type = target_db_type
  Jsii::Type.check_type(@target_db_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetDbType") unless @target_db_type.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.



2255
2256
2257
# File 'dms/cfn_endpoint.rb', line 2255

def after_connect_script
  @after_connect_script
end

#clean_source_metadata_on_mismatchBoolean, ... (readonly)

Cleans and recreates table metadata information on the replication instance when a mismatch occurs.

For example, in a situation where running an alter DDL on the table could result in different information about the table cached in the replication instance.



2262
2263
2264
# File 'dms/cfn_endpoint.rb', line 2262

def 
  @clean_source_metadata_on_mismatch
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.



2273
2274
2275
# File 'dms/cfn_endpoint.rb', line 2273

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



2280
2281
2282
# File 'dms/cfn_endpoint.rb', line 2280

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



2289
2290
2291
# File 'dms/cfn_endpoint.rb', line 2289

def parallel_load_threads
  @parallel_load_threads
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 that is required to access it, see Using secrets to access AWS Database Migration Service resources in the AWS Database Migration Service User Guide .



2300
2301
2302
# File 'dms/cfn_endpoint.rb', line 2300

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.



2305
2306
2307
# File 'dms/cfn_endpoint.rb', line 2305

def secrets_manager_secret_id
  @secrets_manager_secret_id
end

#server_timezoneString? (readonly)

Specifies the time zone for the source MySQL database.

Example: serverTimezone=US/Pacific;

Note: Do not enclose time zones in single quotes.



2314
2315
2316
# File 'dms/cfn_endpoint.rb', line 2314

def server_timezone
  @server_timezone
end

#target_db_typeString? (readonly)

Specifies where to migrate source tables on the target, either to a single database or multiple databases.

If you specify SPECIFIC_DATABASE , specify the database name using the DatabaseName parameter of the Endpoint object.

Example: targetDbType=MULTIPLE_DATABASES



2323
2324
2325
# File 'dms/cfn_endpoint.rb', line 2323

def target_db_type
  @target_db_type
end

Class Method Details

.jsii_propertiesObject



2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
# File 'dms/cfn_endpoint.rb', line 2325

def self.jsii_properties
  {
    :after_connect_script => "afterConnectScript",
    :clean_source_metadata_on_mismatch => "cleanSourceMetadataOnMismatch",
    :events_poll_interval => "eventsPollInterval",
    :max_file_size => "maxFileSize",
    :parallel_load_threads => "parallelLoadThreads",
    :secrets_manager_access_role_arn => "secretsManagerAccessRoleArn",
    :secrets_manager_secret_id => "secretsManagerSecretId",
    :server_timezone => "serverTimezone",
    :target_db_type => "targetDbType",
  }
end

Instance Method Details

#to_jsiiObject



2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
# File 'dms/cfn_endpoint.rb', line 2339

def to_jsii
  result = {}
  result.merge!({
    "afterConnectScript" => @after_connect_script,
    "cleanSourceMetadataOnMismatch" => @clean_source_metadata_on_mismatch,
    "eventsPollInterval" => @events_poll_interval,
    "maxFileSize" => @max_file_size,
    "parallelLoadThreads" => @parallel_load_threads,
    "secretsManagerAccessRoleArn" => @secrets_manager_access_role_arn,
    "secretsManagerSecretId" => @secrets_manager_secret_id,
    "serverTimezone" => @server_timezone,
    "targetDbType" => @target_db_type,
  })
  result.compact
end