-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
### Issue # (if applicable) Closes #30142 . ### Reason for this change Missing property in the L2 Construct. ### Description of changes Add jobStateTimeLimitActions property to the JobQueue Construct. ### Description of how you validated changes Add unit tests and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- v2.178.2
- v2.178.1
- v2.178.0
- v2.177.0
- v2.176.0
- v2.175.1
- v2.175.0
- v2.174.1
- v2.174.0
- v2.173.4
- v2.173.3
- v2.173.2
- v2.173.1
- v2.173.0
- v2.172.0
- v2.171.1
- v2.171.0
- v2.170.0
- v2.169.0
- v2.168.0
- v2.167.2
- v2.167.1
- v2.167.0
- v2.166.0
- v2.165.0
- v2.164.1
- v2.164.0
- v2.163.1
- v2.163.0
- v2.162.1
- v2.162.0
- v2.161.1
- v2.161.0
- v2.160.0
- v2.159.1
- v2.159.0
- v2.158.0
- v2.157.0
- v2.156.0
- v2.155.0
- v2.154.1
- v2.154.0
- v2.153.0
- v2.152.0
- v2.151.1
- v2.151.0
- v2.150.0
- v2.149.0
- v2.148.1
- v2.148.0
- v2.147.3
- v2.147.2
- v2.147.1
- v2.147.0
- v2.146.0
- v2.145.0
- v2.144.0
- v2.143.1
- v2.143.0
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Vpc } from 'aws-cdk-lib/aws-ec2'; | ||
import { App, Stack, Duration } from 'aws-cdk-lib/core'; | ||
import * as integ from '@aws-cdk/integ-tests-alpha'; | ||
import * as batch from 'aws-cdk-lib/aws-batch'; | ||
|
||
const app = new App(); | ||
const stack = new Stack(app, 'batch-stack-job-queue'); | ||
const vpc = new Vpc(stack, 'vpc'); | ||
|
||
// WHEN | ||
new batch.JobQueue(stack, 'joBBQ', { | ||
computeEnvironments: [{ | ||
computeEnvironment: new batch.ManagedEc2EcsComputeEnvironment(stack, 'CE', { | ||
vpc, | ||
}), | ||
order: 1, | ||
}], | ||
jobStateTimeLimitActions: [ | ||
{ | ||
action: batch.JobStateTimeLimitActionsAction.CANCEL, | ||
maxTime: Duration.minutes(10), | ||
reason: batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY, | ||
state: batch.JobStateTimeLimitActionsState.RUNNABLE, | ||
}, | ||
{ | ||
action: batch.JobStateTimeLimitActionsAction.CANCEL, | ||
maxTime: Duration.minutes(10), | ||
reason: batch.JobStateTimeLimitActionsReason.COMPUTE_ENVIRONMENT_MAX_RESOURCE, | ||
state: batch.JobStateTimeLimitActionsState.RUNNABLE, | ||
}, | ||
{ | ||
maxTime: Duration.minutes(10), | ||
reason: batch.JobStateTimeLimitActionsReason.JOB_RESOURCE_REQUIREMENT, | ||
}, | ||
], | ||
}); | ||
|
||
new integ.IntegTest(app, 'BatchEcsJobDefinitionTest', { | ||
testCases: [stack], | ||
}); | ||
|
||
app.synth(); |