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.
Parameters:
-
farm_id
(FarmId)
–
The unique identifier of the farm that contains the queue and limit to associate.
-
queue_id
(QueueId)
–
The unique identifier of the queue to associate with the limit.
-
limit_id
(LimitId)
–
The unique identifier of the limit to associate with the queue.
Raises:
Source code in docs_src/capo_deadline/_services/async_deadline.py
| async def create_queue_limit_association(
self,
farm_id: "capo_deadline.types.farm_id.FarmId",
queue_id: "capo_deadline.types.queue_id.QueueId",
limit_id: "capo_deadline.types.limit_id.LimitId",
*,
config_overrides: Optional[AsyncdeadlineClientConfig] = None,
) -> "capo_deadline.types.create_queue_limit_association_response.CreateQueueLimitAssociationResponse":
"""<p>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 <code>amountRequirementName</code> to the same queue.</p>
Args:
farm_id: <p>The unique identifier of the farm that contains the queue and limit to associate.</p>
queue_id: <p>The unique identifier of the queue to associate with the limit.</p>
limit_id: <p>The unique identifier of the limit to associate with the queue.</p>
Raises:
capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_deadline.types.create_queue_limit_association_request.CreateQueueLimitAssociationRequest]",
) -> AsyncOperationResponse[
"capo_deadline.types.create_queue_limit_association_response.CreateQueueLimitAssociationResponse"
]:
import capo_deadline._operations.deadline.create_queue_limit_association
(
output,
http_response,
) = await capo_deadline._operations.deadline.create_queue_limit_association.async_create_queue_limit_association(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateQueueLimitAssociation")
)
input_: capo_deadline.types.create_queue_limit_association_request.CreateQueueLimitAssociationRequest = {
"farm_id": farm_id,
"queue_id": queue_id,
"limit_id": limit_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|