startMigration method
Start the migration of data.
May throw InvalidParameterValueException.
May throw InvalidReplicationGroupStateFault.
May throw ReplicationGroupAlreadyUnderMigrationFault.
May throw ReplicationGroupNotFoundFault.
Parameter customerNodeEndpointList :
List of endpoints from which data should be migrated. For Valkey or Redis
OSS (cluster mode disabled), the list should have only one element.
Parameter replicationGroupId :
The ID of the replication group to which data should be migrated.
Implementation
Future<StartMigrationResponse> startMigration({
required List<CustomerNodeEndpoint> customerNodeEndpointList,
required String replicationGroupId,
}) async {
final $request = <String, String>{
if (customerNodeEndpointList.isEmpty)
'CustomerNodeEndpointList': ''
else
for (var i1 = 0; i1 < customerNodeEndpointList.length; i1++)
for (var e3 in customerNodeEndpointList[i1].toQueryMap().entries)
'CustomerNodeEndpointList.member.${i1 + 1}.${e3.key}': e3.value,
'ReplicationGroupId': replicationGroupId,
};
final $result = await _protocol.send(
$request,
action: 'StartMigration',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'StartMigrationResult',
);
return StartMigrationResponse.fromXml($result);
}