update_job_queue
(**kwargs)¶Updates a job queue.
See also: AWS API Documentation
Request Syntax
response = client.update_job_queue(
jobQueue='string',
state='ENABLED'|'DISABLED',
schedulingPolicyArn='string',
priority=123,
computeEnvironmentOrder=[
{
'order': 123,
'computeEnvironment': 'string'
},
]
)
[REQUIRED]
The name or the Amazon Resource Name (ARN) of the job queue.
ENABLED
, it can accept jobs. If the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can finish.aws:Partition:batch:Region:Account:scheduling-policy/Name
. For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.priority
parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of 10
is given scheduling preference over a job queue with a priority value of 1
. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
). EC2 and Fargate compute environments can't be mixed.Details the set of compute environments mapped to a job queue and their order relative to each other. This is one of the parameters used by the job scheduler to determine which compute environment runs a given job. Compute environments must be in the VALID
state before you can associate them with a job queue. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
). EC2 and Fargate compute environments can't be mixed.
Note
All compute environments that are associated with a job queue must share the same architecture. Batch doesn't support mixing compute environment architecture types in a single job queue.
The order that compute environments are tried in for job placement within a queue. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first. Compute environments must be in the VALID
state before you can associate them with a job queue. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
Note
All compute environments that are associated with a job queue must share the same architecture. Batch doesn't support mixing compute environment architecture types in a single job queue.
The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order
integer value is tried for job placement first.
The Amazon Resource Name (ARN) of the compute environment.
dict
Response Syntax
{
'jobQueueName': 'string',
'jobQueueArn': 'string'
}
Response Structure
(dict) --
jobQueueName (string) --
The name of the job queue.
jobQueueArn (string) --
The Amazon Resource Name (ARN) of the job queue.
Exceptions
Batch.Client.exceptions.ClientException
Batch.Client.exceptions.ServerException
Examples
This example disables a job queue so that it can be deleted.
response = client.update_job_queue(
jobQueue='GPGPU',
state='DISABLED',
)
print(response)
Expected Output:
{
'jobQueueArn': 'arn:aws:batch:us-east-1:012345678910:job-queue/GPGPU',
'jobQueueName': 'GPGPU',
'ResponseMetadata': {
'...': '...',
},
}