Create Job Queue
| batch_create_job_queue | R Documentation |
Creates an Batch job queue¶
Description¶
Creates an Batch job queue. When you create a job queue, you associate one or more compute environments to the queue and assign an order of preference for the compute environments.
You also set a priority to the job queue that determines the order that the Batch scheduler places jobs onto its associated compute environments. For example, if a compute environment is associated with more than one job queue, the job queue with a higher priority is given preference for scheduling jobs to that compute environment.
Usage¶
batch_create_job_queue(jobQueueName, state, schedulingPolicyArn,
priority, computeEnvironmentOrder, serviceEnvironmentOrder,
jobQueueType, tags, jobStateTimeLimitActions)
Arguments¶
jobQueueName |
[required] The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_). |
state |
The state of the job queue. If the job queue state is
|
schedulingPolicyArn |
The Amazon Resource Name (ARN) of the fair-share scheduling policy. Job queues that don't have a fair-share scheduling policy are scheduled in a first-in, first-out (FIFO) model. After a job queue has a fair-share scheduling policy, it can be replaced but can't be removed. The format is
An example is
A job queue without a fair-share scheduling policy is scheduled as a FIFO job queue and can't have a fair-share scheduling policy added. Jobs queues with a fair-share scheduling policy can have a maximum of 500 active share identifiers. When the limit has been reached, submissions of any jobs that add a new share identifier fail. |
priority |
[required] The priority of the job queue. Job queues with a
higher priority (or a higher integer value for the |
computeEnvironmentOrder |
The set of compute environments mapped to a job queue and their
order relative to each other. The job scheduler uses this parameter to
determine which compute environment runs a specific job. Compute
environments must be in the 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. |
serviceEnvironmentOrder |
A list of service environments that this job queue can use to allocate jobs. All serviceEnvironments must have the same type. A job queue can't have both a serviceEnvironmentOrder and a computeEnvironmentOrder field. |
jobQueueType |
The type of job queue. For service jobs that run on SageMaker
Training, this value is |
tags |
The tags that you apply to the job queue to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources in Batch User Guide. |
jobStateTimeLimitActions |
The set of actions that Batch performs 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 |
Value¶
A list with the following syntax:
list(
jobQueueName = "string",
jobQueueArn = "string"
)
Request syntax¶
svc$create_job_queue(
jobQueueName = "string",
state = "ENABLED"|"DISABLED",
schedulingPolicyArn = "string",
priority = 123,
computeEnvironmentOrder = list(
list(
order = 123,
computeEnvironment = "string"
)
),
serviceEnvironmentOrder = list(
list(
order = 123,
serviceEnvironment = "string"
)
),
jobQueueType = "EKS"|"ECS"|"ECS_FARGATE"|"SAGEMAKER_TRAINING",
tags = list(
"string"
),
jobStateTimeLimitActions = list(
list(
reason = "string",
state = "RUNNABLE",
maxTimeSeconds = 123,
action = "CANCEL"|"TERMINATE"
)
)
)
Examples¶
## Not run:
# This example creates a job queue called LowPriority that uses the M4Spot
# compute environment.
svc$create_job_queue(
computeEnvironmentOrder = list(
list(
computeEnvironment = "M4Spot",
order = 1L
)
),
jobQueueName = "LowPriority",
priority = 1L,
state = "ENABLED"
)
# This example creates a job queue called HighPriority that uses the
# C4OnDemand compute environment with an order of 1 and the M4Spot compute
# environment with an order of 2.
svc$create_job_queue(
computeEnvironmentOrder = list(
list(
computeEnvironment = "C4OnDemand",
order = 1L
),
list(
computeEnvironment = "M4Spot",
order = 2L
)
),
jobQueueName = "HighPriority",
priority = 10L,
state = "ENABLED"
)
## End(Not run)