pauseQueue method

Future<Queue> pauseQueue(
  1. PauseQueueRequest request
)

Pauses the queue.

If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

Future<Queue> pauseQueue(PauseQueueRequest request) async {
  final url = _endPoint.replace(path: '/v2/${request.name}:pause');
  final response = await _client.post(url, body: request);
  return Queue.fromJson(response);
}