StartMetadataModelCreation
Queues the creation of a metadata model in the source metadata tree. If other requests
created by Start* operations are already in the migration project's queue, the
creation begins after they complete.
Note
This operation supports only Microsoft SQL Server to Aurora PostgreSQL and Microsoft SQL Server to Amazon RDS for PostgreSQL conversion paths.
To check the status of the creation request, call
DescribeMetadataModelCreations using the returned
RequestIdentifier as a filter.
To cancel a queued or in-progress request, call
CancelMetadataModelCreation with the returned
RequestIdentifier.
Important
Calling
StartMetadataModelImport with Refresh deletes metadata models
created by this operation.
After the creation completes successfully:
-
To evaluate conversion complexity, call StartMetadataModelAssessment.
-
To convert to the target database format, call StartMetadataModelConversion.
Required permissions:
dms:StartMetadataModelCreation. For more information, see
Actions, resources, and condition keys for AWS Database Migration Service.
Request Syntax
{
"MetadataModelName": "string",
"MigrationProjectIdentifier": "string",
"Properties": { ... },
"SelectionRules": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- MetadataModelName
-
The name for the metadata model to use in subsequent operations.
Type: String
Required: Yes
- MigrationProjectIdentifier
-
The migration project name or Amazon Resource Name (ARN).
Type: String
Length Constraints: Maximum length of 255.
Required: Yes
- Properties
-
The properties of the metadata model.
Type: MetadataModelProperties object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: Yes
- SelectionRules
-
A JSON string that identifies the source schema for the metadata model. For the selection rule format and examples, see Selection rules in DMS Schema Conversion.
Usage:
-
Accepts only source selection rules, where
server-namein the object locator matches the source data provider. -
Supports only
explicitrule actions. -
Exactly one rule is allowed.
Type: String
Required: Yes
-
Response Syntax
{
"RequestIdentifier": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- RequestIdentifier
-
The identifier for the creation request.
Type: String
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedFault
-
AWS DMS was denied access to the endpoint. Check that the role is correctly configured.
- message
HTTP Status Code: 400
- ResourceAlreadyExistsFault
-
The resource you are attempting to create already exists.
- message
- resourceArn
HTTP Status Code: 400
- ResourceNotFoundFault
-
The resource could not be found.
- message
HTTP Status Code: 400
- ResourceQuotaExceededFault
-
The quota for this resource quota has been exceeded.
- message
HTTP Status Code: 400
Examples
Create a metadata model for a SQL statement
The following example queues the creation of a metadata model for a SQL statement.
The selection rule specifies the schema where the metadata model is placed, and
MetadataModelName provides a unique identifier for use in subsequent
operations.
Sample Request
POST / HTTP/1.1
Host: dms.<region>.<domain>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<SignedHeaders>, Signature=<Signature>
X-Amz-Date: <Date>
X-Amz-Target: AmazonDMSv20160101.StartMetadataModelCreation
{
"MigrationProjectIdentifier": "arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS",
"SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"database-name\": \"ExampleDatabase\", \"schema-name\": \"ExampleSchema\"}, \"rule-action\": \"explicit\"}]}",
"MetadataModelName": "ExampleStatement",
"Properties": {
"StatementProperties": {
"Definition": "SELECT * FROM ExampleTable;"
}
}
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
"RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: