JobQueueProps

class aws_cdk.aws_batch.JobQueueProps(*, compute_environments, enabled=None, job_queue_name=None, priority=None)

Bases: object

(experimental) Properties of a batch job queue.

Parameters:
  • compute_environments (Sequence[Union[JobQueueComputeEnvironment, Dict[str, Any]]]) – (experimental) 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.

  • enabled (Optional[bool]) – (experimental) The state of the job queue. If set to true, it is able to accept jobs. Default: true

  • job_queue_name (Optional[str]) – (experimental) A name for the job queue. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Default: - Cloudformation-generated name

  • priority (Union[int, float, None]) – (experimental) 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. Default: 1

Stability:

experimental

ExampleMetadata:

infused

Example:

# shared_compute_envs: batch.ComputeEnvironment

high_prio_queue = batch.JobQueue(self, "JobQueue",
    compute_environments=[batch.JobQueueComputeEnvironment(
        compute_environment=shared_compute_envs,
        order=1
    )],
    priority=2
)

low_prio_queue = batch.JobQueue(self, "JobQueue",
    compute_environments=[batch.JobQueueComputeEnvironment(
        compute_environment=shared_compute_envs,
        order=1
    )],
    priority=1
)

Attributes

compute_environments

(experimental) 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.

Stability:

experimental

enabled

(experimental) The state of the job queue.

If set to true, it is able to accept jobs.

Default:

true

Stability:

experimental

job_queue_name

(experimental) A name for the job queue.

Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.

Default:
  • Cloudformation-generated name

Stability:

experimental

priority

(experimental) 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.

Default:

1

Stability:

experimental