modifyDataMigration method
Modifies an existing DMS data migration.
May throw FailedDependencyFault.
May throw InvalidResourceStateFault.
May throw ResourceNotFoundFault.
Parameter dataMigrationIdentifier :
The identifier (name or ARN) of the data migration to modify.
Parameter dataMigrationName :
The new name for the data migration.
Parameter dataMigrationType :
The new migration type for the data migration.
Parameter enableCloudwatchLogs :
Whether to enable Cloudwatch logs for the data migration.
Parameter numberOfJobs :
The number of parallel jobs that trigger parallel threads to unload the
tables from the source, and then load them to the target.
Parameter selectionRules :
A JSON-formatted string that defines what objects to include and exclude
from the migration.
Parameter serviceAccessRoleArn :
The new service access role ARN for the data migration.
Parameter sourceDataSettings :
The new information about the source data provider for the data migration.
Parameter targetDataSettings :
The new information about the target data provider for the data migration.
Implementation
Future<ModifyDataMigrationResponse> modifyDataMigration({
required String dataMigrationIdentifier,
String? dataMigrationName,
MigrationTypeValue? dataMigrationType,
bool? enableCloudwatchLogs,
int? numberOfJobs,
String? selectionRules,
String? serviceAccessRoleArn,
List<SourceDataSetting>? sourceDataSettings,
List<TargetDataSetting>? targetDataSettings,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.ModifyDataMigration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DataMigrationIdentifier': dataMigrationIdentifier,
if (dataMigrationName != null) 'DataMigrationName': dataMigrationName,
if (dataMigrationType != null)
'DataMigrationType': dataMigrationType.value,
if (enableCloudwatchLogs != null)
'EnableCloudwatchLogs': enableCloudwatchLogs,
if (numberOfJobs != null) 'NumberOfJobs': numberOfJobs,
if (selectionRules != null) 'SelectionRules': selectionRules,
if (serviceAccessRoleArn != null)
'ServiceAccessRoleArn': serviceAccessRoleArn,
if (sourceDataSettings != null)
'SourceDataSettings': sourceDataSettings,
if (targetDataSettings != null)
'TargetDataSettings': targetDataSettings,
},
);
return ModifyDataMigrationResponse.fromJson(jsonResponse.body);
}