Skip to content

delete_queue async

delete_queue(
    farm_id: FarmId,
    queue_id: QueueId,
    *,
    config_overrides: Optional[AsyncdeadlineClientConfig] = None,
) -> DeleteQueueResponse

Deletes a queue.

You can't recover the jobs in a queue if you delete the queue. Deleting the queue also deletes the jobs in that queue.

Parameters:

  • farm_id (FarmId) –

    The ID of the farm from which to remove the queue.

  • queue_id (QueueId) –

    The queue ID of the queue to delete.

Raises:

Source code in docs_src/capo_deadline/_services/async_deadline.py
async def delete_queue(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    queue_id: "capo_deadline.types.queue_id.QueueId",
    *,
    config_overrides: Optional[AsyncdeadlineClientConfig] = None,
) -> "capo_deadline.types.delete_queue_response.DeleteQueueResponse":
    """<p>Deletes a queue.</p> <important> <p>You can't recover the jobs in a queue if you delete the queue. Deleting the queue also deletes the jobs in that queue.</p> </important>

    Args:
        farm_id: <p>The ID of the farm from which to remove the queue.</p>
        queue_id: <p>The queue ID of the queue to delete.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.conflict_exception.ConflictException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</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.delete_queue_request.DeleteQueueRequest]",
    ) -> AsyncOperationResponse[
        "capo_deadline.types.delete_queue_response.DeleteQueueResponse"
    ]:
        import capo_deadline._operations.deadline.delete_queue

        (
            output,
            http_response,
        ) = await capo_deadline._operations.deadline.delete_queue.async_delete_queue(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteQueue")
    )
    input_: capo_deadline.types.delete_queue_request.DeleteQueueRequest = {
        "farm_id": farm_id,
        "queue_id": queue_id,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output