AWS::Batch::JobQueue
The AWS::Batch::JobQueue resource defines your AWS Batch job queue. For more
information, see Job
Queues in the AWS Batch User Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Batch::JobQueue", "Properties" : { "ComputeEnvironmentOrder" : [ ComputeEnvironmentOrder, ... ], "Priority" :Integer, "State" :String, "JobQueueName" :String} }
YAML
Type: AWS::Batch::JobQueue Properties: ComputeEnvironmentOrder: - ComputeEnvironmentOrder Priority:IntegerState:StringJobQueueName:String
Properties
ComputeEnvironmentOrder-
The compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.
Required: yes
Type: List of AWS Batch JobQueue ComputeEnvironmentOrder
Update requires: No Interruption
State-
The status of the job queue (for example,
CREATINGorVALID).Required: no
Type: String
Update requires: No Interruption
Priority-
The priority of the job queue.
Required: yes
Type: Integer
Update requires: No Interruption
JobQueueName-
The name of the job queue.
Required: no
Type: String
Update requires: Replacement
Return Values
Ref
When you pass the logical ID of an AWS::Batch::JobQueue resource to the
intrinsic Ref function, the function returns the job queue ARN, such as
arn:aws:batch:.
us-east-1:111122223333:job-queue/HighPriority
For more information about using the Ref function, see Ref.
Examples
Job queue with two compute environments
The following example defines a job queue called HighPriority that has
two compute environments mapped to it.
JSON
{ "JobQueue": { "Type": "AWS::Batch::JobQueue", "Properties": { "ComputeEnvironmentOrder": [ { "Order": 1, "ComputeEnvironment": "C4OnDemand" }, { "Order": 2, "ComputeEnvironment": "M4Spot" } ], "State": "ENABLED", "Priority": 1, "JobQueueName": "HighPriority" } } }
YAML
JobQueue: Type: AWS::Batch::JobQueue Properties: ComputeEnvironmentOrder: - Order:1ComputeEnvironment:C4OnDemand- Order:2ComputeEnvironment:M4SpotState:ENABLEDPriority:1JobQueueName:HighPriority
