batchPutScheduledUpdateGroupAction method

Future<BatchPutScheduledUpdateGroupActionAnswer> batchPutScheduledUpdateGroupAction({
  1. required String autoScalingGroupName,
  2. required List<ScheduledUpdateGroupActionRequest> scheduledUpdateGroupActions,
})

Creates or updates one or more scheduled scaling actions for an Auto Scaling group. If you leave a parameter unspecified when updating a scheduled scaling action, the corresponding value remains unchanged.

May throw AlreadyExistsFault. May throw LimitExceededFault. May throw ResourceContentionFault.

Parameter autoScalingGroupName : The name of the Auto Scaling group.

Parameter scheduledUpdateGroupActions : One or more scheduled actions. The maximum number allowed is 50.

Implementation

Future<BatchPutScheduledUpdateGroupActionAnswer>
    batchPutScheduledUpdateGroupAction({
  required String autoScalingGroupName,
  required List<ScheduledUpdateGroupActionRequest>
      scheduledUpdateGroupActions,
}) async {
  ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
  _s.validateStringLength(
    'autoScalingGroupName',
    autoScalingGroupName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      scheduledUpdateGroupActions, 'scheduledUpdateGroupActions');
  final $request = <String, dynamic>{};
  $request['AutoScalingGroupName'] = autoScalingGroupName;
  $request['ScheduledUpdateGroupActions'] = scheduledUpdateGroupActions;
  final $result = await _protocol.send(
    $request,
    action: 'BatchPutScheduledUpdateGroupAction',
    version: '2011-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['BatchPutScheduledUpdateGroupActionType'],
    shapes: shapes,
    resultWrapper: 'BatchPutScheduledUpdateGroupActionResult',
  );
  return BatchPutScheduledUpdateGroupActionAnswer.fromXml($result);
}