startMetadataModelCreation method
Creates source metadata model of the given type with the specified properties for schema conversion operations.
May throw AccessDeniedFault.
May throw ResourceAlreadyExistsFault.
May throw ResourceNotFoundFault.
May throw ResourceQuotaExceededFault.
Parameter metadataModelName :
The name of the metadata model.
Parameter migrationProjectIdentifier :
The migration project name or Amazon Resource Name (ARN).
Parameter 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.
Parameter 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.
Implementation
Future<StartMetadataModelCreationResponse> startMetadataModelCreation({
required String metadataModelName,
required String migrationProjectIdentifier,
required MetadataModelProperties properties,
required String selectionRules,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.StartMetadataModelCreation'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MetadataModelName': metadataModelName,
'MigrationProjectIdentifier': migrationProjectIdentifier,
'Properties': properties,
'SelectionRules': selectionRules,
},
);
return StartMetadataModelCreationResponse.fromJson(jsonResponse.body);
}