createMigrationProject method
- required String instanceProfileIdentifier,
- required List<
DataProviderDescriptorDefinition> sourceDataProviderDescriptors, - required List<
DataProviderDescriptorDefinition> targetDataProviderDescriptors, - String? description,
- String? migrationProjectName,
- SCApplicationAttributes? schemaConversionApplicationAttributes,
- List<
Tag> ? tags, - String? transformationRules,
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.
May throw AccessDeniedFault.
May throw FailedDependencyFault.
May throw ResourceAlreadyExistsFault.
May throw ResourceNotFoundFault.
May throw ResourceQuotaExceededFault.
May throw S3AccessDeniedFault.
May throw S3ResourceNotFoundFault.
Parameter instanceProfileIdentifier :
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.
Parameter sourceDataProviderDescriptors :
Information about the source data provider, including the name, ARN, and
Secrets Manager parameters.
Parameter targetDataProviderDescriptors :
Information about the target data provider, including the name, ARN, and
Amazon Web Services Secrets Manager parameters.
Parameter description :
A user-friendly description of the migration project.
Parameter migrationProjectName :
A user-friendly name for the migration project.
Parameter schemaConversionApplicationAttributes :
The schema conversion application attributes, including the Amazon S3
bucket name and Amazon S3 role ARN.
Parameter tags :
One or more tags to be assigned to the migration project.
Parameter transformationRules :
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.
Implementation
Future<CreateMigrationProjectResponse> createMigrationProject({
required String instanceProfileIdentifier,
required List<DataProviderDescriptorDefinition>
sourceDataProviderDescriptors,
required List<DataProviderDescriptorDefinition>
targetDataProviderDescriptors,
String? description,
String? migrationProjectName,
SCApplicationAttributes? schemaConversionApplicationAttributes,
List<Tag>? tags,
String? transformationRules,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.CreateMigrationProject'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'InstanceProfileIdentifier': instanceProfileIdentifier,
'SourceDataProviderDescriptors': sourceDataProviderDescriptors,
'TargetDataProviderDescriptors': targetDataProviderDescriptors,
if (description != null) 'Description': description,
if (migrationProjectName != null)
'MigrationProjectName': migrationProjectName,
if (schemaConversionApplicationAttributes != null)
'SchemaConversionApplicationAttributes':
schemaConversionApplicationAttributes,
if (tags != null) 'Tags': tags,
if (transformationRules != null)
'TransformationRules': transformationRules,
},
);
return CreateMigrationProjectResponse.fromJson(jsonResponse.body);
}