Deletes the specified job queue. You must first disable submissions for a queue with the UpdateJobQueue operation. All jobs in the queue are eventually terminated when you delete a job queue.
It's not necessary to disassociate compute environments from a queue before submitting a DeleteJobQueue request.
Parameters:
-
job_queue
(Optional[String], default:
None
)
–
The short name or full Amazon Resource Name (ARN) of the queue to delete.
Raises:
-
ClientException
–
These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
-
ServerException
–
These errors are usually caused by a server issue.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To delete a job queue
This example deletes the GPGPU job queue.
>>> await client.delete_job_queue(job_queue='GPGPU')
Source code in docs_src/capo_batch/_services/async_batch.py
| async def delete_job_queue(
self,
*,
config_overrides: Optional[AsyncBatchClientConfig] = None,
job_queue: Optional["capo_batch.types.string.String"] = None,
) -> "capo_batch.types.delete_job_queue_response.DeleteJobQueueResponse":
"""<p>Deletes the specified job queue. You must first disable submissions for a queue with the <a>UpdateJobQueue</a> operation. All jobs in the queue are eventually terminated when you delete a job queue.</p> <p>It's not necessary to disassociate compute environments from a queue before submitting a <code>DeleteJobQueue</code> request.</p>
Args:
job_queue: <p>The short name or full Amazon Resource Name (ARN) of the queue to delete.</p>
Raises:
capo_batch.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
capo_batch.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
capo_batch.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a job queue
This example deletes the GPGPU job queue.
>>> await client.delete_job_queue(job_queue='GPGPU')
"""
async def _handler(
req: "AsyncOperationRequest[capo_batch.types.delete_job_queue_request.DeleteJobQueueRequest]",
) -> AsyncOperationResponse[
"capo_batch.types.delete_job_queue_response.DeleteJobQueueResponse"
]:
import capo_batch._operations.aws_batch_v20160810.delete_job_queue
(
output,
http_response,
) = await capo_batch._operations.aws_batch_v20160810.delete_job_queue.async_delete_job_queue(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteJobQueue")
)
input_: capo_batch.types.delete_job_queue_request.DeleteJobQueueRequest = {}
if job_queue is not None:
input_["job_queue"] = job_queue
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|