/AWS1/IF_DMG=>CREATEMIGRATIONPROJECT()¶
About CreateMigrationProject¶
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.
Method Signature¶
METHODS /AWS1/IF_DMG~CREATEMIGRATIONPROJECT
IMPORTING
!IV_MIGRATIONPROJECTNAME TYPE /AWS1/DMGSTRING OPTIONAL
!IT_SOURCEDATAPVDRDESCRIPTORS TYPE /AWS1/CL_DMGDATAPVDRDESCRIPT00=>TT_DATAPVDRDESCRIPTORDEFNLIST OPTIONAL
!IT_TARGETDATAPVDRDESCRIPTORS TYPE /AWS1/CL_DMGDATAPVDRDESCRIPT00=>TT_DATAPVDRDESCRIPTORDEFNLIST OPTIONAL
!IV_INSTANCEPROFILEIDENTIFIER TYPE /AWS1/DMGSTRING OPTIONAL
!IV_TRANSFORMATIONRULES TYPE /AWS1/DMGSTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/DMGSTRING OPTIONAL
!IT_TAGS TYPE /AWS1/CL_DMGTAG=>TT_TAGLIST OPTIONAL
!IO_SCHCONVRSAPPLICATIONATTRS TYPE REF TO /AWS1/CL_DMGSCAPPLICATIONATTRS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dmgcremigrationproj01
RAISING
/AWS1/CX_DMGACCESSDENIEDFAULT
/AWS1/CX_DMGFAILEDDEPENDENCY00
/AWS1/CX_DMGRESRCALRDYEXFAULT
/AWS1/CX_DMGRESRCNOTFOUNDFAULT
/AWS1/CX_DMGRESRCQUOTAEXCDFA00
/AWS1/CX_DMGS3ACCDENIEDFAULT
/AWS1/CX_DMGS3RESRCNOTFNDFAULT
/AWS1/CX_DMGCLIENTEXC
/AWS1/CX_DMGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_sourcedatapvdrdescriptors TYPE /AWS1/CL_DMGDATAPVDRDESCRIPT00=>TT_DATAPVDRDESCRIPTORDEFNLIST TT_DATAPVDRDESCRIPTORDEFNLIST¶
Information about the source data provider, including the name, ARN, and Secrets Manager parameters.
it_targetdatapvdrdescriptors TYPE /AWS1/CL_DMGDATAPVDRDESCRIPT00=>TT_DATAPVDRDESCRIPTORDEFNLIST TT_DATAPVDRDESCRIPTORDEFNLIST¶
Information about the target data provider, including the name, ARN, and Amazon Web Services Secrets Manager parameters.
iv_instanceprofileidentifier TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
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.
Optional arguments:¶
iv_migrationprojectname TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
A user-friendly name for the migration project.
iv_transformationrules TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
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.
iv_description TYPE /AWS1/DMGSTRING /AWS1/DMGSTRING¶
A user-friendly description of the migration project.
it_tags TYPE /AWS1/CL_DMGTAG=>TT_TAGLIST TT_TAGLIST¶
One or more tags to be assigned to the migration project.
io_schconvrsapplicationattrs TYPE REF TO /AWS1/CL_DMGSCAPPLICATIONATTRS /AWS1/CL_DMGSCAPPLICATIONATTRS¶
The schema conversion application attributes, including the Amazon S3 bucket name and Amazon S3 role ARN.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dmgcremigrationproj01 /AWS1/CL_DMGCREMIGRATIONPROJ01¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createmigrationproject(
io_schconvrsapplicationattrs = new /aws1/cl_dmgscapplicationattrs(
iv_s3bucketpath = |string|
iv_s3bucketrolearn = |string|
)
it_sourcedatapvdrdescriptors = VALUE /aws1/cl_dmgdatapvdrdescript00=>tt_datapvdrdescriptordefnlist(
(
new /aws1/cl_dmgdatapvdrdescript00(
iv_dataprovideridentifier = |string|
iv_secretsmanageraccrolearn = |string|
iv_secretsmanagersecretid = |string|
)
)
)
it_tags = VALUE /aws1/cl_dmgtag=>tt_taglist(
(
new /aws1/cl_dmgtag(
iv_key = |string|
iv_resourcearn = |string|
iv_value = |string|
)
)
)
it_targetdatapvdrdescriptors = VALUE /aws1/cl_dmgdatapvdrdescript00=>tt_datapvdrdescriptordefnlist(
(
new /aws1/cl_dmgdatapvdrdescript00(
iv_dataprovideridentifier = |string|
iv_secretsmanageraccrolearn = |string|
iv_secretsmanagersecretid = |string|
)
)
)
iv_description = |string|
iv_instanceprofileidentifier = |string|
iv_migrationprojectname = |string|
iv_transformationrules = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_migrationproject = lo_result->get_migrationproject( ).
IF lo_migrationproject IS NOT INITIAL.
lv_string = lo_migrationproject->get_migrationprojectname( ).
lv_string = lo_migrationproject->get_migrationprojectarn( ).
lv_iso8601datetime = lo_migrationproject->get_migrationprojectcreati00( ).
LOOP AT lo_migrationproject->get_srcdatapvdrdescriptors( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_secretsmanagersecretid( ).
lv_string = lo_row_1->get_secretsmanageraccrolearn( ).
lv_string = lo_row_1->get_dataprovidername( ).
lv_string = lo_row_1->get_dataproviderarn( ).
ENDIF.
ENDLOOP.
LOOP AT lo_migrationproject->get_tgtdatapvdrdescriptors( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_secretsmanagersecretid( ).
lv_string = lo_row_1->get_secretsmanageraccrolearn( ).
lv_string = lo_row_1->get_dataprovidername( ).
lv_string = lo_row_1->get_dataproviderarn( ).
ENDIF.
ENDLOOP.
lv_string = lo_migrationproject->get_instanceprofilearn( ).
lv_string = lo_migrationproject->get_instanceprofilename( ).
lv_string = lo_migrationproject->get_transformationrules( ).
lv_string = lo_migrationproject->get_description( ).
lo_scapplicationattributes = lo_migrationproject->get_schconvrsapplicationat00( ).
IF lo_scapplicationattributes IS NOT INITIAL.
lv_string = lo_scapplicationattributes->get_s3bucketpath( ).
lv_string = lo_scapplicationattributes->get_s3bucketrolearn( ).
ENDIF.
ENDIF.
ENDIF.
Create a migration project¶
The following example creates a migration project.
DATA(lo_result) = lo_client->createmigrationproject(
io_schconvrsapplicationattrs = new /aws1/cl_dmgscapplicationattrs(
iv_s3bucketpath = |s3://amzn-s3-demo-bucket|
iv_s3bucketrolearn = |arn:aws:iam::111122223333:role/example-s3-access-role|
)
it_sourcedatapvdrdescriptors = VALUE /aws1/cl_dmgdatapvdrdescript00=>tt_datapvdrdescriptordefnlist(
(
new /aws1/cl_dmgdatapvdrdescript00(
iv_dataprovideridentifier = |arn:aws:dms:us-east-1:111122223333:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS|
iv_secretsmanageraccrolearn = |arn:aws:iam::111122223333:role/example-secrets-manager-role|
iv_secretsmanagersecretid = |arn:aws:secretsmanager:us-east-1:111122223333:secret:example-source-secret-A1B2C3|
)
)
)
it_targetdatapvdrdescriptors = VALUE /aws1/cl_dmgdatapvdrdescript00=>tt_datapvdrdescriptordefnlist(
(
new /aws1/cl_dmgdatapvdrdescript00(
iv_dataprovideridentifier = |arn:aws:dms:us-east-1:111122223333:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS|
iv_secretsmanageraccrolearn = |arn:aws:iam::111122223333:role/example-secrets-manager-role|
iv_secretsmanagersecretid = |arn:aws:secretsmanager:us-east-1:111122223333:secret:example-target-secret-A1B2C3|
)
)
)
iv_description = |Example migration project for documentation|
iv_instanceprofileidentifier = |arn:aws:dms:us-east-1:111122223333:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS|
iv_migrationprojectname = |example-migration-project|
iv_transformationrules = |{"rules":[{"rule-type":"transformation","rule-id":"1","rule-name":"1","rule-target":"schema","rule-action":"rename","object-locator":{"schema-name":"ExampleSchema"},"value":"TargetSchema"}]}|
).