ComponentOnFailure
- class aws_cdk.aws_imagebuilder_alpha.ComponentOnFailure(*values)
Bases:
Enum(experimental) Specifies what the step should do in case of failure.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
component = imagebuilder.Component(self, "StructuredComponent", platform=imagebuilder.Platform.LINUX, data=imagebuilder.ComponentData.from_component_document_json_object( schema_version=imagebuilder.ComponentSchemaVersion.V1_0, phases=[imagebuilder.ComponentDocumentPhase( name=imagebuilder.ComponentPhaseName.BUILD, steps=[imagebuilder.ComponentDocumentStep( name="install-with-timeout", action=imagebuilder.ComponentAction.EXECUTE_BASH, timeout=Duration.minutes(10), on_failure=imagebuilder.ComponentOnFailure.CONTINUE, inputs=imagebuilder.ComponentStepInputs.from_object({ "commands": ["./install-script.sh"] }) ) ] ) ] ) )
Attributes
- ABORT
(experimental) Fails the step and document execution.
- Stability:
experimental
- CONTINUE
(experimental) Fails the step and proceeds to execute the next step in the document.
- Stability:
experimental
- IGNORE
(experimental) Ignores the step and proceeds to execute the next step in the document.
- Stability:
experimental