terminateTargetInstances method
Starts a job that terminates specific launched EC2 Test and Cutover instances. This command will not work for any Source Server with a lifecycle.state of TESTING, CUTTING_OVER, or CUTOVER.
May throw ConflictException.
May throw UninitializedAccountException.
May throw ValidationException.
Parameter sourceServerIDs :
Terminate Target instance by Source Server IDs.
Parameter accountID :
Terminate Target instance by Account ID
Parameter tags :
Terminate Target instance by Tags.
Implementation
Future<TerminateTargetInstancesResponse> terminateTargetInstances({
required List<String> sourceServerIDs,
String? accountID,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'sourceServerIDs': sourceServerIDs,
if (accountID != null) 'accountID': accountID,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/TerminateTargetInstances',
exceptionFnMap: _exceptionFns,
);
return TerminateTargetInstancesResponse.fromJson(response);
}