paws.compute (version 0.1.0)

batch_create_job_queue: Creates an AWS Batch job queue

Description

Creates an AWS 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.

Usage

batch_create_job_queue(jobQueueName, state, priority,
  computeEnvironmentOrder)

Arguments

jobQueueName

[required] The name of the job queue.

state

The state of the job queue. If the job queue state is ENABLED, it is able to accept jobs.

priority

[required] 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.

computeEnvironmentOrder

[required] 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 should execute a given job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue.

Request syntax

svc$create_job_queue(
  jobQueueName = "string",
  state = "ENABLED"|"DISABLED",
  priority = 123,
  computeEnvironmentOrder = list(
    list(
      order = 123,
      computeEnvironment = "string"
    )
  )
)

Details

You also set a priority to the job queue that determines the order in which the AWS 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.

Examples

Run this code
# NOT RUN {
# This example creates a job queue called LowPriority that uses the M4Spot
# compute environment.
# }
# NOT RUN {
svc$create_job_queue(
  computeEnvironmentOrder = list(
    list(
      computeEnvironment = "M4Spot",
      order = 1L
    )
  ),
  jobQueueName = "LowPriority",
  priority = 1L,
  state = "ENABLED"
)
# }
# NOT RUN {
# 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.
# }
# NOT RUN {
svc$create_job_queue(
  computeEnvironmentOrder = list(
    list(
      computeEnvironment = "C4OnDemand",
      order = 1L
    ),
    list(
      computeEnvironment = "M4Spot",
      order = 2L
    )
  ),
  jobQueueName = "HighPriority",
  priority = 10L,
  state = "ENABLED"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab