createQueueLimitAssociation method

Future<void> createQueueLimitAssociation({
  1. required String farmId,
  2. required String limitId,
  3. required String queueId,
})

Associates a limit with a particular queue. After the limit is associated, all workers for jobs that specify the limit associated with the queue are subject to the limit. You can't associate two limits with the same amountRequirementName to the same queue.

May throw AccessDeniedException. May throw InternalServerErrorException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter farmId : The unique identifier of the farm that contains the queue and limit to associate.

Parameter limitId : The unique identifier of the limit to associate with the queue.

Parameter queueId : The unique identifier of the queue to associate with the limit.

Implementation

Future<void> createQueueLimitAssociation({
  required String farmId,
  required String limitId,
  required String queueId,
}) async {
  final $payload = <String, dynamic>{
    'limitId': limitId,
    'queueId': queueId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/2023-10-12/farms/${Uri.encodeComponent(farmId)}/queue-limit-associations',
    exceptionFnMap: _exceptionFns,
  );
}