AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
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.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateMigrationProjectAsync.
Namespace: Amazon.DatabaseMigrationService
Assembly: AWSSDK.DatabaseMigrationService.dll
Version: 3.x.y.z
public virtual CreateMigrationProjectResponse CreateMigrationProject( CreateMigrationProjectRequest request )
Container for the necessary parameters to execute the CreateMigrationProject service method.
| Exception | Condition |
|---|---|
| AccessDeniedException | DMS was denied access to the endpoint. Check that the role is correctly configured. |
| FailedDependencyException | A dependency threw an exception. |
| ResourceAlreadyExistsException | The resource you are attempting to create already exists. |
| ResourceNotFoundException | The resource could not be found. |
| ResourceQuotaExceededException | The quota for this resource quota has been exceeded. |
| S3AccessDeniedException | Insufficient privileges are preventing access to an Amazon S3 object. |
| S3ResourceNotFoundException | A specified Amazon S3 bucket, bucket folder, or other object can't be found. |
Creates the migration project with the specified parameters.
var client = new AmazonDatabaseMigrationServiceClient();
var response = client.CreateMigrationProject(new CreateMigrationProjectRequest
{
Description = "description",
InstanceProfileIdentifier = "ip-au-17",
MigrationProjectName = "my-migration-project",
SchemaConversionApplicationAttributes = new SCApplicationAttributes {
S3BucketPath = "arn:aws:s3:::mylogin-bucket",
S3BucketRoleArn = "arn:aws:iam::012345678901:role/Admin"
},
SourceDataProviderDescriptors = new List<DataProviderDescriptorDefinition> {
new DataProviderDescriptorDefinition {
DataProviderIdentifier = "arn:aws:dms:us-east-1:012345678901:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRSTUVWXYZ012345",
SecretsManagerAccessRoleArn = "arn:aws:iam::012345678901:role/myuser-admin-access",
SecretsManagerSecretId = "arn:aws:secretsmanager:us-east-1:012345678901:secret:myorg/example1/ALL.SOURCE.ORACLE_12-A1B2C3"
}
},
Tags = new List<Tag> {
new Tag {
Key = "access",
Value = "authorizedusers"
}
},
TargetDataProviderDescriptors = new List<DataProviderDescriptorDefinition> {
new DataProviderDescriptorDefinition {
DataProviderIdentifier = "arn:aws:dms:us-east-1:012345678901:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRSTUVWXYZ012345",
SecretsManagerAccessRoleArn = "arn:aws:iam::012345678901:role/myuser-admin-access",
SecretsManagerSecretId = "arn:aws:secretsmanager:us-east-1:012345678901:secret:myorg/example1/TARGET.postgresql-A1B2C3"
}
},
TransformationRules = "{\"key0\":\"value0\",\"key1\":\"value1\",\"key2\":\"value2\"}"
});
MigrationProject migrationProject = response.MigrationProject;
.NET Framework:
Supported in: 4.7.2 and newer