create_migration_project
async
¶
create_migration_project(
source_data_provider_descriptors: DataProviderDescriptorDefinitionList,
target_data_provider_descriptors: DataProviderDescriptorDefinitionList,
instance_profile_identifier: String,
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
migration_project_name: Optional[String] = None,
transformation_rules: Optional[String] = None,
description: Optional[String] = None,
tags: Optional[TagList] = None,
schema_conversion_application_attributes: Optional[SCApplicationAttributes] = None,
) -> CreateMigrationProjectResponse
Creates the migration project using the specified parameters.
You can run this action only after you create an instance profile and data providers using CreateInstanceProfile and CreateDataProvider.
Required permissions: dms:CreateMigrationProject. For more information, see Actions, resources, and condition keys for Database Migration Service.
Parameters:
-
migration_project_name(Optional[String], default:None) –A user-friendly name for the migration project.
-
source_data_provider_descriptors(DataProviderDescriptorDefinitionList) –Information about the source data provider, including the name, ARN, and Secrets Manager parameters.
-
target_data_provider_descriptors(DataProviderDescriptorDefinitionList) –Information about the target data provider, including the name, ARN, and Amazon Web Services Secrets Manager parameters.
-
instance_profile_identifier(String) –The identifier of the associated instance profile. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.
-
transformation_rules(Optional[String], default:None) –A JSON string that specifies the transformation rules for the migration project. Transformation rules let you customize how DMS Schema Conversion converts your source database objects, including renaming, adding prefixes or suffixes, and changing data types. For the transformation rule format and examples, see Transformation rules in DMS Schema Conversion.
Homogeneous data migrations do not support transformation rules.
-
description(Optional[String], default:None) –A user-friendly description of the migration project.
-
tags(Optional[TagList], default:None) –One or more tags to be assigned to the migration project.
-
schema_conversion_application_attributes(Optional[SCApplicationAttributes], default:None) –The schema conversion application attributes, including the Amazon S3 bucket name and Amazon S3 role ARN.
Raises:
-
AccessDeniedFault–DMS was denied access to the endpoint. Check that the role is correctly configured.
-
FailedDependencyFault–A dependency threw an exception.
-
ResourceAlreadyExistsFault–The resource you are attempting to create already exists.
-
ResourceNotFoundFault–The resource could not be found.
-
ResourceQuotaExceededFault–The quota for this resource quota has been exceeded.
-
S3AccessDeniedFault–Insufficient privileges are preventing access to an Amazon S3 object.
-
S3ResourceNotFoundFault–A specified Amazon S3 bucket, bucket folder, or other object can't be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create a migration project The following example creates a migration project.
>>> await client.create_migration_project(migration_project_name='example-migration-project', description='Example migration project for documentation', source_data_provider_descriptors=[{'DataProviderIdentifier': 'arn:aws:dms:us-east-1:111122223333:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS', 'SecretsManagerSecretId': 'arn:aws:secretsmanager:us-east-1:111122223333:secret:example-source-secret-A1B2C3', 'SecretsManagerAccessRoleArn': 'arn:aws:iam::111122223333:role/example-secrets-manager-role'}], target_data_provider_descriptors=[{'DataProviderIdentifier': 'arn:aws:dms:us-east-1:111122223333:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS', 'SecretsManagerSecretId': 'arn:aws:secretsmanager:us-east-1:111122223333:secret:example-target-secret-A1B2C3', 'SecretsManagerAccessRoleArn': 'arn:aws:iam::111122223333:role/example-secrets-manager-role'}], instance_profile_identifier='arn:aws:dms:us-east-1:111122223333:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS', transformation_rules='{"rules":[{"rule-type":"transformation","rule-id":"1","rule-name":"1","rule-target":"schema","rule-action":"rename","object-locator":{"schema-name":"ExampleSchema"},"value":"TargetSchema"}]}', schema_conversion_application_attributes={'S3BucketPath': 's3://amzn-s3-demo-bucket', 'S3BucketRoleArn': 'arn:aws:iam::111122223333:role/example-s3-access-role'})
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 | |