DescribeMetadataModelChildren
Gets a list of child metadata models for the specified metadata model in the database hierarchy.
Request Syntax
{
"Marker": "string",
"MaxRecords": number,
"MigrationProjectIdentifier": "string",
"Origin": "string",
"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.
- Marker
-
Specifies the unique pagination token that indicates where the next page should start. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
Type: String
Required: No
- MaxRecords
-
The maximum number of metadata model children to include in the response. If more items exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.
Type: Integer
Required: No
- MigrationProjectIdentifier
-
The migration project name or Amazon Resource Name (ARN).
Type: String
Length Constraints: Maximum length of 255.
Required: Yes
- Origin
-
Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET
Type: String
Valid Values:
SOURCE | TARGETRequired: Yes
- SelectionRules
-
The JSON string that specifies which metadata model's children to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see Selection Rules in the DMS User Guide.
Type: String
Required: Yes
Response Syntax
{
"Marker": "string",
"MetadataModelChildren": [
{
"MetadataModelName": "string",
"SelectionRules": "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.
- Marker
-
Specifies the unique pagination token that makes it possible to display the next page of metadata model children. If a marker is returned, there are more metadata model children available.
Type: String
- MetadataModelChildren
-
A list of child metadata models.
Type: Array of MetadataModelReference objects
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
- ResourceNotFoundFault
-
The resource could not be found.
- message
HTTP Status Code: 400
Examples
Retrieve children of a schema
The following example retrieves the child metadata models of the
ExampleSchema schema from the source metadata tree. The response
includes a list of object categories within the schema, each with its own
selection rule that you can use in subsequent calls to navigate deeper into
the hierarchy.
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.DescribeMetadataModelChildren
{
"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\", \"schema-name\": \"ExampleSchema\"}, \"rule-action\": \"explicit\"}]}",
"Origin": "SOURCE"
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
"MetadataModelChildren": [
{
"MetadataModelName": "Tables",
"SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Tables\"}, \"rule-action\": \"explicit\"}]}"
},
{
"MetadataModelName": "Views",
"SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"2\", \"rule-name\": \"2\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Views\"}, \"rule-action\": \"explicit\"}]}"
},
{
"MetadataModelName": "Functions",
"SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"3\", \"rule-name\": \"3\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Functions\"}, \"rule-action\": \"explicit\"}]}"
},
{
"MetadataModelName": "Sequences",
"SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"4\", \"rule-name\": \"4\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Sequences\"}, \"rule-action\": \"explicit\"}]}"
}
]
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: