Skip to main content

data_migrations

Creates, updates, deletes, gets or lists a data_migrations resource.

Overview

Namedata_migrations
TypeResource
Idaws.dms.data_migrations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
data_migration_arnstringThe Amazon Resource Name (ARN) that identifies this replication.
data_migration_cidr_blocksarrayThe CIDR blocks of the endpoints for the data migration.
data_migration_create_timestring (date-time)The UTC time when DMS created the data migration.
data_migration_end_timestring (date-time)The UTC time when data migration ended.
data_migration_namestringThe user-friendly name for the data migration.
data_migration_settingsobjectSpecifies CloudWatch settings and selection rules for the data migration.
data_migration_start_timestring (date-time)The UTC time when DMS started the data migration.
data_migration_statisticsobjectProvides information about the data migration's run, including start and stop time, latency, and data migration progress.
data_migration_statusstringThe current status of the data migration.
data_migration_typestringSpecifies whether the data migration is full-load only, change data capture (CDC) only, or full-load and CDC. (full-load, cdc, full-load-and-cdc)
last_failure_messagestringInformation about the data migration's most recent error or failure.
migration_project_arnstringThe Amazon Resource Name (ARN) of the data migration's associated migration project.
public_ip_addressesarrayThe IP addresses of the endpoints for the data migration.
service_access_role_arnstringThe IAM role that the data migration uses to access Amazon Web Services resources.
source_data_settingsarraySpecifies information about the data migration's source data provider.
stop_reasonstringThe reason the data migration last stopped.
target_data_settingsarraySpecifies information about the data migration's target data provider.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_data_migrationsselectregionReturns information about data migrations.
create_data_migrationinsertregion, MigrationProjectIdentifier, DataMigrationType, ServiceAccessRoleArnCreates a data migration using the provided settings.
modify_data_migrationupdateregion, DataMigrationIdentifierModifies an existing DMS data migration.
delete_data_migrationdeleteregionDeletes the specified data migration.
start_data_migrationexecregion, DataMigrationIdentifier, StartTypeStarts the specified data migration.
stop_data_migrationexecregion, DataMigrationIdentifierStops the specified data migration.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about data migrations.

SELECT
data_migration_arn,
data_migration_cidr_blocks,
data_migration_create_time,
data_migration_end_time,
data_migration_name,
data_migration_settings,
data_migration_start_time,
data_migration_statistics,
data_migration_status,
data_migration_type,
last_failure_message,
migration_project_arn,
public_ip_addresses,
service_access_role_arn,
source_data_settings,
stop_reason,
target_data_settings
FROM aws.dms.data_migrations
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a data migration using the provided settings.

INSERT INTO aws.dms.data_migrations (
DataMigrationName,
MigrationProjectIdentifier,
DataMigrationType,
ServiceAccessRoleArn,
EnableCloudwatchLogs,
SourceDataSettings,
TargetDataSettings,
NumberOfJobs,
Tags,
SelectionRules,
region
)
SELECT
'{{ DataMigrationName }}',
'{{ MigrationProjectIdentifier }}' /* required */,
'{{ DataMigrationType }}' /* required */,
'{{ ServiceAccessRoleArn }}' /* required */,
{{ EnableCloudwatchLogs }},
'{{ SourceDataSettings }}',
'{{ TargetDataSettings }}',
{{ NumberOfJobs }},
'{{ Tags }}',
'{{ SelectionRules }}',
'{{ region }}'
RETURNING
data_migration
;

UPDATE examples

Modifies an existing DMS data migration.

UPDATE aws.dms.data_migrations
SET
DataMigrationIdentifier = '{{ DataMigrationIdentifier }}',
DataMigrationName = '{{ DataMigrationName }}',
EnableCloudwatchLogs = {{ EnableCloudwatchLogs }},
ServiceAccessRoleArn = '{{ ServiceAccessRoleArn }}',
DataMigrationType = '{{ DataMigrationType }}',
SourceDataSettings = '{{ SourceDataSettings }}',
TargetDataSettings = '{{ TargetDataSettings }}',
NumberOfJobs = {{ NumberOfJobs }},
SelectionRules = '{{ SelectionRules }}'
WHERE
region = '{{ region }}' --required
AND DataMigrationIdentifier = '{{ DataMigrationIdentifier }}' --required
RETURNING
data_migration;

DELETE examples

Deletes the specified data migration.

DELETE FROM aws.dms.data_migrations
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Starts the specified data migration.

EXEC aws.dms.data_migrations.start_data_migration
@region='{{ region }}' --required
@@json=
'{
"DataMigrationIdentifier": "{{ DataMigrationIdentifier }}",
"StartType": "{{ StartType }}"
}'
;