Batch / Client / update_job_queue
update_job_queue#
- Batch.Client.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' }, ] ) - Parameters:
- jobQueue (string) – - [REQUIRED] - The name or the Amazon Resource Name (ARN) of the job queue. 
- state (string) – Describes the queue’s ability to accept new jobs. If the job queue state is - 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.
- schedulingPolicyArn (string) – Amazon Resource Name (ARN) of the fair share scheduling policy. Once a job queue is created, the fair share scheduling policy can be replaced but not removed. The format is - aws:Partition:batch:Region:Account:scheduling-policy/Name ``. For example, ``aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.
- priority (integer) – The priority of the job queue. Job queues with a higher priority (or a higher integer value for the - priorityparameter) 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- 10is given scheduling preference over a job queue with a priority value of- 1. All of the compute environments must be either EC2 (- EC2or- SPOT) or Fargate (- FARGATEor- FARGATE_SPOT). EC2 and Fargate compute environments can’t be mixed.
- computeEnvironmentOrder (list) – - 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 - VALIDstate before you can associate them with a job queue. All of the compute environments must be either EC2 (- EC2or- SPOT) or Fargate (- FARGATEor- 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. - (dict) – - 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 - VALIDstate before you can associate them with a job queue. All of the compute environments must be either EC2 (- EC2or- SPOT) or Fargate (- FARGATEor- 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. - order (integer) – [REQUIRED] - 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 - orderinteger value is tried for job placement first.
- computeEnvironment (string) – [REQUIRED] - The Amazon Resource Name (ARN) of the compute environment. 
 
 
 
- Return type:
- dict 
- Returns:
- 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': { '...': '...', }, }