updateQueue method

Future<UpdateQueueResponse> updateQueue({
  1. required String name,
  2. String? description,
  3. ReservationPlanSettings? reservationPlanSettings,
  4. QueueStatus? status,
})

Modify one of your existing queues.

May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException.

Parameter name : The name of the queue that you are modifying.

Parameter description : The new description for the queue, if you are changing it.

Parameter reservationPlanSettings : The new details of your pricing plan for your reserved queue. When you set up a new pricing plan to replace an expired one, you enter into another 12-month commitment. When you add capacity to your queue by increasing the number of RTS, you extend the term of your commitment to 12 months from when you add capacity. After you make these commitments, you can't cancel them.

Parameter status : Pause or activate a queue by changing its status between ACTIVE and PAUSED. If you pause a queue, jobs in that queue won't begin. Jobs that are running when you pause the queue continue to run until they finish or result in an error.

Implementation

Future<UpdateQueueResponse> updateQueue({
  required String name,
  String? description,
  ReservationPlanSettings? reservationPlanSettings,
  QueueStatus? status,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (reservationPlanSettings != null)
      'reservationPlanSettings': reservationPlanSettings,
    if (status != null) 'status': status.toValue(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/2017-08-29/queues/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateQueueResponse.fromJson(response);
}