JobQueue

class aws_cdk.aws_batch.JobQueue(scope, id, *, compute_environments, enabled=None, job_queue_name=None, priority=None)

Bases: aws_cdk.core.Resource

(experimental) Batch Job Queue.

Defines a batch job queue to define how submitted batch jobs should be ran based on specified batch compute environments.

Stability

experimental

Parameters
  • scope (Construct) –

  • id (str) –

  • compute_environments (Sequence[JobQueueComputeEnvironment]) – (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

Methods

apply_removal_policy(policy)

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DELETE), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters

policy (RemovalPolicy) –

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

Return type

ResourceEnvironment

job_queue_arn

(experimental) The ARN of this batch job queue.

Stability

experimental

Return type

str

job_queue_name

(experimental) A name for the job queue.

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

Stability

experimental

Return type

str

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod from_job_queue_arn(scope, id, job_queue_arn)

(experimental) Fetches an existing batch job queue by its amazon resource name.

Parameters
  • scope (Construct) –

  • id (str) –

  • job_queue_arn (str) –

Stability

experimental

Return type

IJobQueue

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters

construct (IConstruct) –

Return type

bool