StartMetadataModelCreation - AWS Database Migration Service

StartMetadataModelCreation

Creates source metadata model of the given type with the specified properties for schema conversion operations.

Note

This action supports only these directions: from SQL Server to Aurora PostgreSQL, or from SQL Server to RDS for PostgreSQL.

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 of the metadata model.

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 metadata model in JSON format. This object is a Union. Only one member of this object can be specified or returned.

Type: MetadataModelProperties object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

SelectionRules

The JSON string that specifies the location where the metadata model will be created. Selection rules must specify a single schema. For more information, see Selection Rules in the DMS User Guide.

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 metadata model creation operation.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

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

Sample Request

This example illustrates creation of a metadata model for a SQL statement. The provided selection rule serves as context to resolve and place the metadata model within the database schema hierarchy. The metadata model name acts as a unique identifier that can be referenced in subsequent operations.

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:012345678901:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"source-database-server.us-east-1.rds.amazonaws.com\", \"database-name\": \"database1\", \"schema-name\": \"schema1\"}, \"rule-action\": \"explicit\"} ]}", "MetadataModelName": "Statement1", "Properties": { "StatementProperties": { "Definition": "SELECT * FROM table1;" } } }

Sample Response

This example illustrates one usage of StartMetadataModelCreation.

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "RequestIdentifier": "00000000-0000-0000-0000-000000000000" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: