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 | aws.dms.data_migrations |
Fields
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. |
For more information, see AWS::DMS::DataMigration
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DataMigrationType, MigrationProjectIdentifier, ServiceAccessRoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all data_migrations
in a region.
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 aws.dms.data_migrations
WHERE region = 'us-east-1';
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 aws.dms.data_migrations
WHERE region = 'us-east-1' AND data__Identifier = '<DataMigrationArn>';
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 aws.dms.data_migrations (
ServiceAccessRoleArn,
MigrationProjectIdentifier,
DataMigrationType,
region
)
SELECT
'{{ ServiceAccessRoleArn }}',
'{{ MigrationProjectIdentifier }}',
'{{ DataMigrationType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.dms.data_migrations (
DataMigrationName,
DataMigrationIdentifier,
ServiceAccessRoleArn,
MigrationProjectIdentifier,
DataMigrationType,
DataMigrationSettings,
SourceDataSettings,
Tags,
region
)
SELECT
'{{ DataMigrationName }}',
'{{ DataMigrationIdentifier }}',
'{{ ServiceAccessRoleArn }}',
'{{ MigrationProjectIdentifier }}',
'{{ DataMigrationType }}',
'{{ DataMigrationSettings }}',
'{{ SourceDataSettings }}',
'{{ 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: DataMigrationName
value: '{{ DataMigrationName }}'
- name: DataMigrationIdentifier
value: '{{ DataMigrationIdentifier }}'
- name: ServiceAccessRoleArn
value: '{{ ServiceAccessRoleArn }}'
- name: MigrationProjectIdentifier
value: '{{ MigrationProjectIdentifier }}'
- name: DataMigrationType
value: '{{ DataMigrationType }}'
- name: DataMigrationSettings
value:
CloudwatchLogsEnabled: '{{ CloudwatchLogsEnabled }}'
NumberOfJobs: '{{ NumberOfJobs }}'
SelectionRules: '{{ SelectionRules }}'
- name: SourceDataSettings
value:
- CDCStartPosition: '{{ CDCStartPosition }}'
CDCStartTime: '{{ CDCStartTime }}'
CDCStopTime: '{{ CDCStopTime }}'
SlotName: '{{ SlotName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.dms.data_migrations
WHERE data__Identifier = '<DataMigrationArn>'
AND region = 'us-east-1';
Permissions
To operate on the data_migrations
resource, the following permissions are required:
Create
dms:CreateDataMigration,
dms:DescribeDataMigrations,
dms:AddTagsToResource,
dms:ListTagsForResource,
iam:PassRole
Read
dms:DescribeDataMigrations,
dms:ListTagsForResource
Update
dms:ModifyDataMigration,
dms:AddTagsToResource,
dms:RemoveTagsFromResource,
dms:ListTagsForResource,
iam:PassRole
Delete
dms:DeleteDataMigration,
dms:RemoveTagsFromResource
List
dms:DescribeDataMigrations,
dms:ListTagsForResource