CfnJobQueueProps Struct
Properties for defining a CfnJobQueue.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const cfnJobQueueProps: batch.CfnJobQueueProps = {
priority: 123,
// the properties below are optional
computeEnvironmentOrder: [{
computeEnvironment: 'computeEnvironment',
order: 123,
}],
jobQueueName: 'jobQueueName',
jobQueueType: 'jobQueueType',
jobStateTimeLimitActions: [{
action: 'action',
maxTimeSeconds: 123,
reason: 'reason',
state: 'state',
}],
schedulingPolicyArn: 'schedulingPolicyArn',
serviceEnvironmentOrder: [{
order: 123,
serviceEnvironment: 'serviceEnvironment',
}],
state: 'state',
tags: {
tagsKey: 'tags',
},
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_batch as batch
cfn_job_queue_props = batch.CfnJobQueueProps(
priority=123,
# the properties below are optional
compute_environment_order=[batch.CfnJobQueue.ComputeEnvironmentOrderProperty(
compute_environment="computeEnvironment",
order=123
)],
job_queue_name="jobQueueName",
job_queue_type="jobQueueType",
job_state_time_limit_actions=[batch.CfnJobQueue.JobStateTimeLimitActionProperty(
action="action",
max_time_seconds=123,
reason="reason",
state="state"
)],
scheduling_policy_arn="schedulingPolicyArn",
service_environment_order=[batch.CfnJobQueue.ServiceEnvironmentOrderProperty(
order=123,
service_environment="serviceEnvironment"
)],
state="state",
tags={
"tags_key": "tags"
}
)
// 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.*;
CfnJobQueueProps cfnJobQueueProps = CfnJobQueueProps.builder()
.priority(123)
// the properties below are optional
.computeEnvironmentOrder(List.of(ComputeEnvironmentOrderProperty.builder()
.computeEnvironment("computeEnvironment")
.order(123)
.build()))
.jobQueueName("jobQueueName")
.jobQueueType("jobQueueType")
.jobStateTimeLimitActions(List.of(JobStateTimeLimitActionProperty.builder()
.action("action")
.maxTimeSeconds(123)
.reason("reason")
.state("state")
.build()))
.schedulingPolicyArn("schedulingPolicyArn")
.serviceEnvironmentOrder(List.of(ServiceEnvironmentOrderProperty.builder()
.order(123)
.serviceEnvironment("serviceEnvironment")
.build()))
.state("state")
.tags(Map.of(
"tagsKey", "tags"))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;
var cfnJobQueueProps = new CfnJobQueueProps {
Priority = 123,
// the properties below are optional
ComputeEnvironmentOrder = new [] { new ComputeEnvironmentOrderProperty {
ComputeEnvironment = "computeEnvironment",
Order = 123
} },
JobQueueName = "jobQueueName",
JobQueueType = "jobQueueType",
JobStateTimeLimitActions = new [] { new JobStateTimeLimitActionProperty {
Action = "action",
MaxTimeSeconds = 123,
Reason = "reason",
State = "state"
} },
SchedulingPolicyArn = "schedulingPolicyArn",
ServiceEnvironmentOrder = new [] { new ServiceEnvironmentOrderProperty {
Order = 123,
ServiceEnvironment = "serviceEnvironment"
} },
State = "state",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnJobQueueProps := &CfnJobQueueProps{
Priority: jsii.Number(123),
// the properties below are optional
ComputeEnvironmentOrder: []interface{}{
&ComputeEnvironmentOrderProperty{
ComputeEnvironment: jsii.String("computeEnvironment"),
Order: jsii.Number(123),
},
},
JobQueueName: jsii.String("jobQueueName"),
JobQueueType: jsii.String("jobQueueType"),
JobStateTimeLimitActions: []interface{}{
&JobStateTimeLimitActionProperty{
Action: jsii.String("action"),
MaxTimeSeconds: jsii.Number(123),
Reason: jsii.String("reason"),
State: jsii.String("state"),
},
},
SchedulingPolicyArn: jsii.String("schedulingPolicyArn"),
ServiceEnvironmentOrder: []interface{}{
&ServiceEnvironmentOrderProperty{
Order: jsii.Number(123),
ServiceEnvironment: jsii.String("serviceEnvironment"),
},
},
State: jsii.String("state"),
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
Properties
computeEnvironmentOrderoptionalIResolvable | IResolvable | CfnJobQueue.compute_environment_orderoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ComputeEnvironmentOrderProperty]]]computeEnvironmentOrderoptionalIResolvableComputeEnvironmentOrderoptionalIResolvableComputeEnvironmentOrderoptionalinterface{} #notes
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.
jobQueueNameoptionalstringjob_queue_nameoptionalstrjobQueueNameoptionalStringJobQueueNameoptionalstringJobQueueNameoptional*string #It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
jobQueueTypeoptionalstringjob_queue_typeoptionalstrjobQueueTypeoptionalStringJobQueueTypeoptionalstringJobQueueTypeoptional*string #For service jobs that run on SageMaker AI , this value is SAGEMAKER_TRAINING . For regular container jobs, this value is EKS , ECS , or ECS_FARGATE depending on the compute environment.
jobStateTimeLimitActionsoptionalIResolvable | IResolvable | CfnJobQueue.job_state_time_limit_actionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, JobStateTimeLimitActionProperty]]]jobStateTimeLimitActionsoptionalIResolvableJobStateTimeLimitActionsoptionalIResolvableJobStateTimeLimitActionsoptionalinterface{} #AWS Batch will perform each action after maxTimeSeconds has passed.
notes
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.
schedulingPolicyArnoptionalstring | ISchedulingPolicyRefscheduling_policy_arnoptionaltyping.Union[str, ISchedulingPolicyRef]schedulingPolicyArnoptionalStringSchedulingPolicyArnoptionalstringSchedulingPolicyArnoptionalinterface{} #The format is aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name* . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy .
serviceEnvironmentOrderoptionalIResolvable | IResolvable | CfnJobQueue.service_environment_orderoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ServiceEnvironmentOrderProperty]]]serviceEnvironmentOrderoptionalIResolvableServiceEnvironmentOrderoptionalIResolvableServiceEnvironmentOrderoptionalinterface{} #Job queues with a higher priority are evaluated first when associated with the same service environment.
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.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #For more information, see Tagging your AWS Batch resources in AWS Batch User Guide .