enum WorkflowOnFailure
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.WorkflowOnFailure |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#WorkflowOnFailure |
Java | software.amazon.awscdk.services.imagebuilder.alpha.WorkflowOnFailure |
Python | aws_cdk.aws_imagebuilder_alpha.WorkflowOnFailure |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป WorkflowOnFailure |
The action to take if the workflow fails.
Example
const workflow = new imagebuilder.Workflow(this, 'MyWorkflow', {
workflowType: imagebuilder.WorkflowType.BUILD,
data: imagebuilder.WorkflowData.fromJsonObject({
schemaVersion: imagebuilder.WorkflowSchemaVersion.V1_0,
steps: [
{
name: 'LaunchBuildInstance',
action: imagebuilder.WorkflowAction.LAUNCH_INSTANCE,
onFailure: imagebuilder.WorkflowOnFailure.ABORT,
inputs: {
waitFor: 'ssmAgent',
},
},
{
name: 'ExecuteComponents',
action: imagebuilder.WorkflowAction.EXECUTE_COMPONENTS,
onFailure: imagebuilder.WorkflowOnFailure.ABORT,
inputs: {
'instanceId': 'i-123',
},
},
{
name: 'CreateImage',
action: imagebuilder.WorkflowAction.CREATE_IMAGE,
onFailure: imagebuilder.WorkflowOnFailure.ABORT,
inputs: {
'instanceId': 'i-123',
},
},
{
name: 'TerminateInstance',
action: imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
onFailure: imagebuilder.WorkflowOnFailure.CONTINUE,
inputs: {
'instanceId': 'i-123',
},
},
],
outputs: [
{
name: 'ImageId',
value: '$.stepOutputs.CreateImage.imageId',
},
],
}),
});
Members
| Name | Description |
|---|---|
| ABORT | Fails the image build if the workflow fails. |
| CONTINUE | Continues with the image build if the workflow fails. |
ABORT
Fails the image build if the workflow fails.
CONTINUE
Continues with the image build if the workflow fails.

.NET
Go
Java
Python
TypeScript (