updateJobQueue method
Updates a job queue.
May throw ClientException.
May throw ServerException.
Parameter jobQueue :
The name or the Amazon Resource Name (ARN) of the job queue.
Parameter computeEnvironmentOrder :
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.
Parameter jobStateTimeLimitActions :
The set of actions that Batch perform on jobs that remain at the head of
the job queue in the specified state longer than specified times. Batch
will perform each action after maxTimeSeconds has passed.
(Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and
its maximum value is 86,400 (24 hours).)
Parameter priority :
The priority of the job queue. Job queues with a higher priority (or a
higher integer value for the 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.
Parameter schedulingPolicyArn :
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.
Parameter serviceEnvironmentOrder :
The order of the service environment associated with the job queue. Job
queues with a higher priority are evaluated first when associated with the
same service environment.
Parameter state :
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.
Implementation
Future<UpdateJobQueueResponse> updateJobQueue({
required String jobQueue,
List<ComputeEnvironmentOrder>? computeEnvironmentOrder,
List<JobStateTimeLimitAction>? jobStateTimeLimitActions,
int? priority,
String? schedulingPolicyArn,
List<ServiceEnvironmentOrder>? serviceEnvironmentOrder,
JQState? state,
}) async {
final $payload = <String, dynamic>{
'jobQueue': jobQueue,
if (computeEnvironmentOrder != null)
'computeEnvironmentOrder': computeEnvironmentOrder,
if (jobStateTimeLimitActions != null)
'jobStateTimeLimitActions': jobStateTimeLimitActions,
if (priority != null) 'priority': priority,
if (schedulingPolicyArn != null)
'schedulingPolicyArn': schedulingPolicyArn,
if (serviceEnvironmentOrder != null)
'serviceEnvironmentOrder': serviceEnvironmentOrder,
if (state != null) 'state': state.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/updatejobqueue',
exceptionFnMap: _exceptionFns,
);
return UpdateJobQueueResponse.fromJson(response);
}