enum ComponentOnFailure
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.ComponentOnFailure |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#ComponentOnFailure |
Java | software.amazon.awscdk.services.imagebuilder.alpha.ComponentOnFailure |
Python | aws_cdk.aws_imagebuilder_alpha.ComponentOnFailure |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป ComponentOnFailure |
Specifies what the step should do in case of failure.
Example
const component = new imagebuilder.Component(this, 'StructuredComponent', {
platform: imagebuilder.Platform.LINUX,
data: imagebuilder.ComponentData.fromComponentDocumentJsonObject({
schemaVersion: imagebuilder.ComponentSchemaVersion.V1_0,
phases: [
{
name: imagebuilder.ComponentPhaseName.BUILD,
steps: [
{
name: 'install-with-timeout',
action: imagebuilder.ComponentAction.EXECUTE_BASH,
timeout: Duration.minutes(10),
onFailure: imagebuilder.ComponentOnFailure.CONTINUE,
inputs: imagebuilder.ComponentStepInputs.fromObject({
commands: ['./install-script.sh']
})
}
]
}
]
})
});
Members
| Name | Description |
|---|---|
| ABORT | Fails the step and document execution. |
| CONTINUE | Fails the step and proceeds to execute the next step in the document. |
| IGNORE | Ignores the step and proceeds to execute the next step in the document. |
ABORT
Fails the step and document execution.
CONTINUE
Fails the step and proceeds to execute the next step in the document.
IGNORE
Ignores the step and proceeds to execute the next step in the document.

.NET
Go
Java
Python
TypeScript (