data_migrations
Creates, updates, deletes or gets a data_migration resource or lists data_migrations in a region
Overview
| Name | data_migrations |
| Type | Resource |
| Description | Resource schema for AWS::DMS::DataMigration. |
| Id | awscc.dms.data_migrations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
data_migration_name | string | The property describes a name to identify the data migration. |
data_migration_arn | string | The property describes an ARN of the data migration. |
data_migration_identifier | string | The property describes an ARN of the data migration. |
data_migration_create_time | string | The property describes the create time of the data migration. |
service_access_role_arn | string | The property describes Amazon Resource Name (ARN) of the service access role. |
migration_project_identifier | string | The property describes an identifier for the migration project. It is used for describing/deleting/modifying can be name/arn |
data_migration_type | string | The property describes the type of migration. |
data_migration_settings | object | The property describes the settings for the data migration. |
source_data_settings | array | The property describes the settings for the data migration. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
data_migration_arn | string | The property describes an ARN of the data migration. |
region | string | AWS region. |
For more information, see AWS::DMS::DataMigration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | data_migrations | INSERT | DataMigrationType, MigrationProjectIdentifier, ServiceAccessRoleArn, region |
delete_resource | data_migrations | DELETE | Identifier, region |
update_resource | data_migrations | UPDATE | Identifier, PatchDocument, region |
list_resources | data_migrations_list_only | SELECT | region |
get_resource | data_migrations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual data_migration.
SELECT
region,
data_migration_name,
data_migration_arn,
data_migration_identifier,
data_migration_create_time,
service_access_role_arn,
migration_project_identifier,
data_migration_type,
data_migration_settings,
source_data_settings,
tags
FROM awscc.dms.data_migrations
WHERE
region = 'us-east-1' AND
Identifier = '{{ data_migration_arn }}';
Lists all data_migrations in a region.
SELECT
region,
data_migration_arn
FROM awscc.dms.data_migrations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new data_migration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.dms.data_migrations (
ServiceAccessRoleArn,
MigrationProjectIdentifier,
DataMigrationType,
region
)
SELECT
'{{ service_access_role_arn }}',
'{{ migration_project_identifier }}',
'{{ data_migration_type }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.dms.data_migrations (
DataMigrationName,
DataMigrationIdentifier,
ServiceAccessRoleArn,
MigrationProjectIdentifier,
DataMigrationType,
DataMigrationSettings,
SourceDataSettings,
Tags,
region
)
SELECT
'{{ data_migration_name }}',
'{{ data_migration_identifier }}',
'{{ service_access_role_arn }}',
'{{ migration_project_identifier }}',
'{{ data_migration_type }}',
'{{ data_migration_settings }}',
'{{ source_data_settings }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: data_migration
props:
- name: data_migration_name
value: '{{ data_migration_name }}'
- name: data_migration_identifier
value: '{{ data_migration_identifier }}'
- name: service_access_role_arn
value: '{{ service_access_role_arn }}'
- name: migration_project_identifier
value: '{{ migration_project_identifier }}'
- name: data_migration_type
value: '{{ data_migration_type }}'
- name: data_migration_settings
value:
cloudwatch_logs_enabled: '{{ cloudwatch_logs_enabled }}'
number_of_jobs: '{{ number_of_jobs }}'
selection_rules: '{{ selection_rules }}'
- name: source_data_settings
value:
- c_dc_start_position: '{{ c_dc_start_position }}'
c_dc_start_time: '{{ c_dc_start_time }}'
c_dc_stop_time: '{{ c_dc_stop_time }}'
slot_name: '{{ slot_name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a data_migration resource, using stack-deploy.
/*+ update */
UPDATE awscc.dms.data_migrations
SET PatchDocument = string('{{ {
"DataMigrationName": data_migration_name,
"DataMigrationIdentifier": data_migration_identifier,
"ServiceAccessRoleArn": service_access_role_arn,
"MigrationProjectIdentifier": migration_project_identifier,
"DataMigrationType": data_migration_type,
"DataMigrationSettings": data_migration_settings,
"SourceDataSettings": source_data_settings,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ data_migration_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.dms.data_migrations
WHERE
Identifier = '{{ data_migration_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the data_migrations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
dms:CreateDataMigration,
dms:DescribeDataMigrations,
dms:AddTagsToResource,
dms:ListTagsForResource,
iam:PassRole
dms:DescribeDataMigrations,
dms:ListTagsForResource
dms:ModifyDataMigration,
dms:AddTagsToResource,
dms:RemoveTagsFromResource,
dms:ListTagsForResource,
iam:PassRole
dms:DeleteDataMigration,
dms:RemoveTagsFromResource
dms:DescribeDataMigrations,
dms:ListTagsForResource