Enum ComponentOnFailure
java.lang.Object
java.lang.Enum<ComponentOnFailure>
software.amazon.awscdk.services.imagebuilder.alpha.ComponentOnFailure
- All Implemented Interfaces:
Serializable,Comparable<ComponentOnFailure>,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:34.443Z")
@Stability(Experimental)
public enum ComponentOnFailure
extends Enum<ComponentOnFailure>
(experimental) Specifies what the step should do in case of failure.
Example:
Component component = Component.Builder.create(this, "StructuredComponent")
.platform(Platform.LINUX)
.data(ComponentData.fromComponentDocumentJsonObject(ComponentDocument.builder()
.schemaVersion(ComponentSchemaVersion.V1_0)
.phases(List.of(ComponentDocumentPhase.builder()
.name(ComponentPhaseName.BUILD)
.steps(List.of(ComponentDocumentStep.builder()
.name("install-with-timeout")
.action(ComponentAction.EXECUTE_BASH)
.timeout(Duration.minutes(10))
.onFailure(ComponentOnFailure.CONTINUE)
.inputs(ComponentStepInputs.fromObject(Map.of(
"commands", List.of("./install-script.sh"))))
.build()))
.build()))
.build()))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentOnFailureReturns the enum constant of this type with the specified name.static ComponentOnFailure[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ABORT
(experimental) Fails the step and document execution. -
CONTINUE
(experimental) Fails the step and proceeds to execute the next step in the document. -
IGNORE
(experimental) Ignores the step and proceeds to execute the next step in the document.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-