cancelInstanceRefresh method

Future<CancelInstanceRefreshAnswer> cancelInstanceRefresh({
  1. required String autoScalingGroupName,
})

Cancels an instance refresh operation in progress. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.

For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh.

May throw LimitExceededFault. May throw ResourceContentionFault. May throw ActiveInstanceRefreshNotFoundFault.

Parameter autoScalingGroupName : The name of the Auto Scaling group.

Implementation

Future<CancelInstanceRefreshAnswer> cancelInstanceRefresh({
  required String autoScalingGroupName,
}) async {
  ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
  _s.validateStringLength(
    'autoScalingGroupName',
    autoScalingGroupName,
    1,
    255,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['AutoScalingGroupName'] = autoScalingGroupName;
  final $result = await _protocol.send(
    $request,
    action: 'CancelInstanceRefresh',
    version: '2011-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CancelInstanceRefreshType'],
    shapes: shapes,
    resultWrapper: 'CancelInstanceRefreshResult',
  );
  return CancelInstanceRefreshAnswer.fromXml($result);
}