@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:20:05.669Z") public class CfnJobQueue extends CfnResource implements IInspectable
The AWS::Batch::JobQueue
resource specifies the parameters for an AWS Batch job queue definition. For more information, see Job Queues in the ** .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.batch.*; CfnJobQueue cfnJobQueue = CfnJobQueue.Builder.create(this, "MyCfnJobQueue") .computeEnvironmentOrder(List.of(ComputeEnvironmentOrderProperty.builder() .computeEnvironment("computeEnvironment") .order(123) .build())) .priority(123) // the properties below are optional .jobQueueName("jobQueueName") .schedulingPolicyArn("schedulingPolicyArn") .state("state") .tags(Map.of( "tagsKey", "tags")) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnJobQueue.Builder
A fluent builder for
CfnJobQueue . |
static interface |
CfnJobQueue.ComputeEnvironmentOrderProperty
The order in which compute environments are tried for job placement within a queue.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnJobQueue(Construct scope,
java.lang.String id,
CfnJobQueueProps props)
Create a new `AWS::Batch::JobQueue`.
|
protected |
CfnJobQueue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnJobQueue(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrJobQueueArn()
Returns the job queue ARN, such as `batch: *us-east-1* : *111122223333* :job-queue/ *JobQueueName*` .
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getComputeEnvironmentOrder()
The set of compute environments mapped to a job queue and their order relative to each other.
|
java.lang.String |
getJobQueueName()
The name of the job queue.
|
java.lang.Number |
getPriority()
The priority of the job queue.
|
java.lang.String |
getSchedulingPolicyArn()
The Amazon Resource Name (ARN) of the scheduling policy.
|
java.lang.String |
getState()
The state of the job queue.
|
TagManager |
getTags()
The tags applied to the job queue.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setComputeEnvironmentOrder(IResolvable value)
The set of compute environments mapped to a job queue and their order relative to each other.
|
void |
setComputeEnvironmentOrder(java.util.List<java.lang.Object> value)
The set of compute environments mapped to a job queue and their order relative to each other.
|
void |
setJobQueueName(java.lang.String value)
The name of the job queue.
|
void |
setPriority(java.lang.Number value)
The priority of the job queue.
|
void |
setSchedulingPolicyArn(java.lang.String value)
The Amazon Resource Name (ARN) of the scheduling policy.
|
void |
setState(java.lang.String value)
The state of the job queue.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnJobQueue(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnJobQueue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnJobQueue(Construct scope, java.lang.String id, CfnJobQueueProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrJobQueueArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tagging your AWS Batch resources in AWS Batch User Guide .
public java.lang.Object getComputeEnvironmentOrder()
The job scheduler uses this parameter to determine which compute environment runs a specific 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. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
public void setComputeEnvironmentOrder(IResolvable value)
The job scheduler uses this parameter to determine which compute environment runs a specific 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. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
public void setComputeEnvironmentOrder(java.util.List<java.lang.Object> value)
The job scheduler uses this parameter to determine which compute environment runs a specific 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. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
public java.lang.Number getPriority()
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
. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
public void setPriority(java.lang.Number value)
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
. All of the compute environments must be either EC2 ( EC2
or SPOT
) or Fargate ( FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
public java.lang.String getJobQueueName()
It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
public void setJobQueueName(java.lang.String value)
It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
public java.lang.String getSchedulingPolicyArn()
The format is aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*
. For example, aws:aws:batch:us-west-2:012345678910:scheduling-policy/MySchedulingPolicy
.
public void setSchedulingPolicyArn(java.lang.String value)
The format is aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*
. For example, aws:aws:batch:us-west-2:012345678910:scheduling-policy/MySchedulingPolicy
.
public java.lang.String getState()
If the job queue state is ENABLED
, it is able to accept jobs. If the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can finish.
public void setState(java.lang.String value)
If the job queue state is ENABLED
, it is able to accept jobs. If the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can finish.