startMetadataModelExportAsScript method
Saves your converted code to a file as a SQL script, and stores this file on your Amazon S3 bucket.
May throw AccessDeniedFault.
May throw InvalidResourceStateFault.
May throw KMSKeyNotAccessibleFault.
May throw ResourceAlreadyExistsFault.
May throw ResourceNotFoundFault.
May throw ResourceQuotaExceededFault.
May throw S3AccessDeniedFault.
May throw S3ResourceNotFoundFault.
Parameter migrationProjectIdentifier :
The migration project name or Amazon Resource Name (ARN).
Parameter origin :
Whether to export the metadata model from the source or the target.
Parameter selectionRules :
A value that specifies the database objects to export.
Parameter fileName :
The name of the model file to create in the Amazon S3 bucket.
Implementation
Future<StartMetadataModelExportAsScriptResponse>
startMetadataModelExportAsScript({
required String migrationProjectIdentifier,
required OriginTypeValue origin,
required String selectionRules,
String? fileName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.StartMetadataModelExportAsScript'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MigrationProjectIdentifier': migrationProjectIdentifier,
'Origin': origin.value,
'SelectionRules': selectionRules,
if (fileName != null) 'FileName': fileName,
},
);
return StartMetadataModelExportAsScriptResponse.fromJson(jsonResponse.body);
}