Skip to content

PostgreSQLSettings

Source code in docs_src/capo_database_migration_service/types/postgre_sql_settings.py
class PostgreSQLSettings(TypedDict, closed=True):
    after_connect_script: NotRequired[
        "capo_database_migration_service.types.string.String"
    ]
    """<p>For use with change data capture (CDC) only, this attribute has DMS bypass foreign keys and user triggers to reduce the time it takes to bulk load data.</p> <p>Example: <code>afterConnectScript=SET session_replication_role='replica'</code> </p>"""
    capture_ddls: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>To capture DDL events, DMS creates various artifacts in the PostgreSQL database when the task starts. You can later remove these artifacts.</p> <p>The default value is <code>true</code>.</p> <p>If this value is set to <code>N</code>, you don't have to create tables or triggers on the source database.</p>"""
    max_file_size: NotRequired[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ]
    """<p>Specifies the maximum size (in KB) of any .csv file used to transfer data to PostgreSQL.</p> <p>The default value is 32,768 KB (32 MB).</p> <p>Example: <code>maxFileSize=512</code> </p>"""
    database_name: NotRequired["capo_database_migration_service.types.string.String"]
    """<p>Database name for the endpoint.</p>"""
    ddl_artifacts_schema: NotRequired[
        "capo_database_migration_service.types.string.String"
    ]
    """<p>The schema in which the operational DDL database artifacts are created.</p> <p>The default value is <code>public</code>.</p> <p>Example: <code>ddlArtifactsSchema=xyzddlschema;</code> </p>"""
    execute_timeout: NotRequired[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ]
    """<p>Sets the client statement timeout for the PostgreSQL instance, in seconds. The default value is 60 seconds.</p> <p>Example: <code>executeTimeout=100;</code> </p>"""
    fail_tasks_on_lob_truncation: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>When set to <code>true</code>, this value causes a task to fail if the actual size of a LOB column is greater than the specified <code>LobMaxSize</code>.</p> <p>The default value is <code>false</code>.</p> <p>If task is set to Limited LOB mode and this option is set to true, the task fails instead of truncating the LOB data.</p>"""
    heartbeat_enable: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>The write-ahead log (WAL) heartbeat feature mimics a dummy transaction. By doing this, it prevents idle logical replication slots from holding onto old WAL logs, which can result in storage full situations on the source. This heartbeat keeps <code>restart_lsn</code> moving and prevents storage full scenarios.</p> <p>The default value is <code>false</code>.</p>"""
    heartbeat_schema: NotRequired["capo_database_migration_service.types.string.String"]
    """<p>Sets the schema in which the heartbeat artifacts are created.</p> <p>The default value is <code>public</code>.</p>"""
    heartbeat_frequency: NotRequired[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ]
    """<p>Sets the WAL heartbeat frequency (in minutes).</p> <p>The default value is 5 minutes.</p>"""
    password: NotRequired[
        "capo_database_migration_service.types.secret_string.SecretString"
    ]
    """<p>Endpoint connection password.</p>"""
    port: NotRequired[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ]
    """<p>Endpoint TCP port. The default is 5432.</p>"""
    server_name: NotRequired["capo_database_migration_service.types.string.String"]
    """<p>The host name of the endpoint database. </p> <p>For an Amazon RDS PostgreSQL instance, this is the output of <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBInstances.html">DescribeDBInstances</a>, in the <code> <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Endpoint.html">Endpoint</a>.Address</code> field.</p> <p>For an Aurora PostgreSQL instance, this is the output of <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBClusters.html">DescribeDBClusters</a>, in the <code>Endpoint</code> field.</p>"""
    username: NotRequired["capo_database_migration_service.types.string.String"]
    """<p>Endpoint connection user name.</p>"""
    slot_name: NotRequired["capo_database_migration_service.types.string.String"]
    """<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>"""
    plugin_name: NotRequired[
        "capo_database_migration_service.types.plugin_name_value.PluginNameValue"
    ]
    """<p>Specifies the plugin to use to create a replication slot.</p> <p>The default value is <code>pglogical</code>.</p>"""
    secrets_manager_access_role_arn: NotRequired[
        "capo_database_migration_service.types.string.String"
    ]
    """<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>"""
    secrets_manager_secret_id: NotRequired[
        "capo_database_migration_service.types.string.String"
    ]
    """<p>The full ARN, partial ARN, or friendly name of the <code>SecretsManagerSecret</code> that contains the PostgreSQL endpoint connection details.</p>"""
    trim_space_in_char: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>Use the <code>TrimSpaceInChar</code> source endpoint setting to trim data on CHAR and NCHAR data types during migration. The default value is <code>true</code>.</p>"""
    map_boolean_as_boolean: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>When true, lets PostgreSQL migrate the boolean type as boolean. By default, PostgreSQL migrates booleans as <code>varchar(5)</code>. You must set this setting on both the source and target endpoints for it to take effect.</p> <p>The default value is <code>false</code>.</p>"""
    map_jsonb_as_clob: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>When true, DMS migrates JSONB values as CLOB.</p> <p>The default value is <code>false</code>.</p>"""
    map_long_varchar_as: NotRequired[
        "capo_database_migration_service.types.long_varchar_mapping_type.LongVarcharMappingType"
    ]
    """<p>Sets what datatype to map LONG values as.</p> <p>The default value is <code>wstring</code>.</p>"""
    database_mode: NotRequired[
        "capo_database_migration_service.types.database_mode.DatabaseMode"
    ]
    """<p>Specifies the default behavior of the replication's handling of PostgreSQL- compatible endpoints that require some additional configuration, such as Babelfish endpoints.</p>"""
    babelfish_database_name: NotRequired[
        "capo_database_migration_service.types.string.String"
    ]
    """<p>The Babelfish for Aurora PostgreSQL database name for the endpoint.</p>"""
    disable_unicode_source_filter: NotRequired[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ]
    """<p>Disables the Unicode source filter with PostgreSQL, for values passed into the Selection rule filter on Source Endpoint column values. By default DMS performs source filter comparisons using a Unicode string which can cause look ups to ignore the indexes in the text columns and slow down migrations.</p> <p>Unicode support should only be disabled when using a selection rule filter is on a text column in the Source database that is indexed.</p>"""
    service_access_role_arn: NotRequired[
        "capo_database_migration_service.types.string.String"
    ]
    """<p>The IAM role arn you can use to authenticate the connection to your endpoint. Ensure to include <code>iam:PassRole</code> and <code>rds-db:connect</code> actions in permission policy.</p>"""
    authentication_method: NotRequired[
        "capo_database_migration_service.types.postgre_sql_authentication_method.PostgreSQLAuthenticationMethod"
    ]
    """<p>This attribute allows you to specify the authentication method as "iam auth".</p>"""

after_connect_script instance-attribute

after_connect_script: NotRequired[String]

For use with change data capture (CDC) only, this attribute has DMS bypass foreign keys and user triggers to reduce the time it takes to bulk load data.

Example: afterConnectScript=SET session_replication_role='replica'

authentication_method instance-attribute

authentication_method: NotRequired[PostgreSQLAuthenticationMethod]

This attribute allows you to specify the authentication method as "iam auth".

babelfish_database_name instance-attribute

babelfish_database_name: NotRequired[String]

The Babelfish for Aurora PostgreSQL database name for the endpoint.

capture_ddls instance-attribute

capture_ddls: NotRequired[BooleanOptional]

To capture DDL events, DMS creates various artifacts in the PostgreSQL database when the task starts. You can later remove these artifacts.

The default value is true.

If this value is set to N, you don't have to create tables or triggers on the source database.

database_mode instance-attribute

database_mode: NotRequired[DatabaseMode]

Specifies the default behavior of the replication's handling of PostgreSQL- compatible endpoints that require some additional configuration, such as Babelfish endpoints.

database_name instance-attribute

database_name: NotRequired[String]

Database name for the endpoint.

ddl_artifacts_schema instance-attribute

ddl_artifacts_schema: NotRequired[String]

The schema in which the operational DDL database artifacts are created.

The default value is public.

Example: ddlArtifactsSchema=xyzddlschema;

disable_unicode_source_filter instance-attribute

disable_unicode_source_filter: NotRequired[BooleanOptional]

Disables the Unicode source filter with PostgreSQL, for values passed into the Selection rule filter on Source Endpoint column values. By default DMS performs source filter comparisons using a Unicode string which can cause look ups to ignore the indexes in the text columns and slow down migrations.

Unicode support should only be disabled when using a selection rule filter is on a text column in the Source database that is indexed.

execute_timeout instance-attribute

execute_timeout: NotRequired[IntegerOptional]

Sets the client statement timeout for the PostgreSQL instance, in seconds. The default value is 60 seconds.

Example: executeTimeout=100;

fail_tasks_on_lob_truncation instance-attribute

fail_tasks_on_lob_truncation: NotRequired[BooleanOptional]

When set to true, this value causes a task to fail if the actual size of a LOB column is greater than the specified LobMaxSize.

The default value is false.

If task is set to Limited LOB mode and this option is set to true, the task fails instead of truncating the LOB data.

heartbeat_enable instance-attribute

heartbeat_enable: NotRequired[BooleanOptional]

The write-ahead log (WAL) heartbeat feature mimics a dummy transaction. By doing this, it prevents idle logical replication slots from holding onto old WAL logs, which can result in storage full situations on the source. This heartbeat keeps restart_lsn moving and prevents storage full scenarios.

The default value is false.

heartbeat_frequency instance-attribute

heartbeat_frequency: NotRequired[IntegerOptional]

Sets the WAL heartbeat frequency (in minutes).

The default value is 5 minutes.

heartbeat_schema instance-attribute

heartbeat_schema: NotRequired[String]

Sets the schema in which the heartbeat artifacts are created.

The default value is public.

map_boolean_as_boolean instance-attribute

map_boolean_as_boolean: NotRequired[BooleanOptional]

When true, lets PostgreSQL migrate the boolean type as boolean. By default, PostgreSQL migrates booleans as varchar(5). You must set this setting on both the source and target endpoints for it to take effect.

The default value is false.

map_jsonb_as_clob instance-attribute

map_jsonb_as_clob: NotRequired[BooleanOptional]

When true, DMS migrates JSONB values as CLOB.

The default value is false.

map_long_varchar_as instance-attribute

map_long_varchar_as: NotRequired[LongVarcharMappingType]

Sets what datatype to map LONG values as.

The default value is wstring.

max_file_size instance-attribute

max_file_size: NotRequired[IntegerOptional]

Specifies the maximum size (in KB) of any .csv file used to transfer data to PostgreSQL.

The default value is 32,768 KB (32 MB).

Example: maxFileSize=512

password instance-attribute

password: NotRequired[SecretString]

Endpoint connection password.

plugin_name instance-attribute

plugin_name: NotRequired[PluginNameValue]

Specifies the plugin to use to create a replication slot.

The default value is pglogical.

port instance-attribute

port: NotRequired[IntegerOptional]

Endpoint TCP port. The default is 5432.

secrets_manager_access_role_arn instance-attribute

secrets_manager_access_role_arn: NotRequired[String]

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 SecretsManagerSecret. The role must allow the iam:PassRole action. SecretsManagerSecret has the value of the Amazon Web Services Secrets Manager secret that allows access to the PostgreSQL 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 and the SecretsManagerAccessRoleArn and SecretsManagerSecretId required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.

secrets_manager_secret_id instance-attribute

secrets_manager_secret_id: NotRequired[String]

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

server_name instance-attribute

server_name: NotRequired[String]

The host name of the endpoint database.

For an Amazon RDS PostgreSQL instance, this is the output of DescribeDBInstances, in the Endpoint.Address field.

For an Aurora PostgreSQL instance, this is the output of DescribeDBClusters, in the Endpoint field.

service_access_role_arn instance-attribute

service_access_role_arn: NotRequired[String]

The IAM role arn you can use to authenticate the connection to your endpoint. Ensure to include iam:PassRole and rds-db:connect actions in permission policy.

slot_name instance-attribute

slot_name: NotRequired[String]

Sets the name of a previously created logical replication slot for a change data capture (CDC) load of the PostgreSQL source instance.

When used with the CdcStartPosition 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 CdcStartPosition. If the specified slot doesn't exist or the task doesn't have a valid CdcStartPosition setting, DMS raises an error.

For more information about setting the CdcStartPosition request parameter, see Determining a CDC native start point in the Database Migration Service User Guide. For more information about using CdcStartPosition, see CreateReplicationTask, StartReplicationTask, and ModifyReplicationTask.

trim_space_in_char instance-attribute

trim_space_in_char: NotRequired[BooleanOptional]

Use the TrimSpaceInChar source endpoint setting to trim data on CHAR and NCHAR data types during migration. The default value is true.

username instance-attribute

username: NotRequired[String]

Endpoint connection user name.