suspendProcesses method
Suspends the specified auto scaling processes, or all processes, for the specified Auto Scaling group.
If you suspend either the Launch or Terminate
process types, it can prevent other process types from functioning
properly. For more information, see Suspend
and resume Amazon EC2 Auto Scaling processes in the Amazon EC2 Auto
Scaling User Guide.
To resume processes that have been suspended, call the ResumeProcesses API.
May throw ResourceContentionFault.
May throw ResourceInUseFault.
Parameter autoScalingGroupName :
The name of the Auto Scaling group.
Parameter scalingProcesses :
One or more of the following processes:
-
Launch -
Terminate -
AddToLoadBalancer -
AlarmNotification -
AZRebalance -
HealthCheck -
InstanceRefresh -
ReplaceUnhealthy -
ScheduledActions
Implementation
Future<void> suspendProcesses({
required String autoScalingGroupName,
List<String>? scalingProcesses,
}) async {
final $request = <String, String>{
'AutoScalingGroupName': autoScalingGroupName,
if (scalingProcesses != null)
if (scalingProcesses.isEmpty)
'ScalingProcesses': ''
else
for (var i1 = 0; i1 < scalingProcesses.length; i1++)
'ScalingProcesses.member.${i1 + 1}': scalingProcesses[i1],
};
await _protocol.send(
$request,
action: 'SuspendProcesses',
version: '2011-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}