data_migrations
Creates, updates, deletes, gets or lists a data_migrations resource.
Overview
| Name | data_migrations |
| Type | Resource |
| Id | aws.dms.data_migrations |
Fields
The following fields are returned by SELECT queries:
- describe_data_migrations
| Name | Datatype | Description |
|---|---|---|
data_migration_arn | string | The Amazon Resource Name (ARN) that identifies this replication. |
data_migration_cidr_blocks | array | The CIDR blocks of the endpoints for the data migration. |
data_migration_create_time | string (date-time) | The UTC time when DMS created the data migration. |
data_migration_end_time | string (date-time) | The UTC time when data migration ended. |
data_migration_name | string | The user-friendly name for the data migration. |
data_migration_settings | object | Specifies CloudWatch settings and selection rules for the data migration. |
data_migration_start_time | string (date-time) | The UTC time when DMS started the data migration. |
data_migration_statistics | object | Provides information about the data migration's run, including start and stop time, latency, and data migration progress. |
data_migration_status | string | The current status of the data migration. |
data_migration_type | string | Specifies 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_message | string | Information about the data migration's most recent error or failure. |
migration_project_arn | string | The Amazon Resource Name (ARN) of the data migration's associated migration project. |
public_ip_addresses | array | The IP addresses of the endpoints for the data migration. |
service_access_role_arn | string | The IAM role that the data migration uses to access Amazon Web Services resources. |
source_data_settings | array | Specifies information about the data migration's source data provider. |
stop_reason | string | The reason the data migration last stopped. |
target_data_settings | array | Specifies information about the data migration's target data provider. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_data_migrations | select | region | Returns information about data migrations. | |
create_data_migration | insert | region, MigrationProjectIdentifier, DataMigrationType, ServiceAccessRoleArn | Creates a data migration using the provided settings. | |
modify_data_migration | update | region, DataMigrationIdentifier | Modifies an existing DMS data migration. | |
delete_data_migration | delete | region | Deletes the specified data migration. | |
start_data_migration | exec | region, DataMigrationIdentifier, StartType | Starts the specified data migration. | |
stop_data_migration | exec | region, DataMigrationIdentifier | Stops 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_data_migrations
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
- create_data_migration
- Manifest
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
;
# Description fields are for documentation purposes
- name: data_migrations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the data_migrations resource.
- name: DataMigrationName
value: "{{ DataMigrationName }}"
description: |
A user-friendly name for the data migration. Data migration names have the following constraints: Must begin with a letter, and can only contain ASCII letters, digits, and hyphens. Can't end with a hyphen or contain two consecutive hyphens. Length must be from 1 to 255 characters.
- name: MigrationProjectIdentifier
value: "{{ MigrationProjectIdentifier }}"
description: |
An identifier for the migration project.
- name: DataMigrationType
value: "{{ DataMigrationType }}"
description: |
Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.
valid_values: ['full-load', 'cdc', 'full-load-and-cdc']
- name: ServiceAccessRoleArn
value: "{{ ServiceAccessRoleArn }}"
description: |
The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.
- name: EnableCloudwatchLogs
value: {{ EnableCloudwatchLogs }}
description: |
Specifies whether to enable CloudWatch logs for the data migration.
- name: SourceDataSettings
description: |
Specifies information about the source data provider.
value:
- CDCStartPosition: "{{ CDCStartPosition }}"
CDCStartTime: "{{ CDCStartTime }}"
CDCStopTime: "{{ CDCStopTime }}"
SlotName: "{{ SlotName }}"
- name: TargetDataSettings
description: |
Specifies information about the target data provider.
value:
- TablePreparationMode: "{{ TablePreparationMode }}"
- name: NumberOfJobs
value: {{ NumberOfJobs }}
description: |
The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.
- name: Tags
description: |
One or more tags to be assigned to the data migration.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
ResourceArn: "{{ ResourceArn }}"
- name: SelectionRules
value: "{{ SelectionRules }}"
description: |
An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.
UPDATE examples
- modify_data_migration
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
- delete_data_migration
Deletes the specified data migration.
DELETE FROM aws.dms.data_migrations
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- start_data_migration
- stop_data_migration
Starts the specified data migration.
EXEC aws.dms.data_migrations.start_data_migration
@region='{{ region }}' --required
@@json=
'{
"DataMigrationIdentifier": "{{ DataMigrationIdentifier }}",
"StartType": "{{ StartType }}"
}'
;
Stops the specified data migration.
EXEC aws.dms.data_migrations.stop_data_migration
@region='{{ region }}' --required
@@json=
'{
"DataMigrationIdentifier": "{{ DataMigrationIdentifier }}"
}'
;