Enum WorkflowOnFailure

java.lang.Object
java.lang.Enum<WorkflowOnFailure>
software.amazon.awscdk.services.imagebuilder.alpha.WorkflowOnFailure
All Implemented Interfaces:
Serializable, Comparable<WorkflowOnFailure>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)", date="2025-12-05T22:26:50.105Z") @Stability(Experimental) public enum WorkflowOnFailure extends Enum<WorkflowOnFailure>
(experimental) The action to take if the workflow fails.

Example:

 Workflow workflow = Workflow.Builder.create(this, "MyWorkflow")
         .workflowType(WorkflowType.BUILD)
         .data(WorkflowData.fromJsonObject(Map.of(
                 "schemaVersion", WorkflowSchemaVersion.V1_0,
                 "steps", List.of(Map.of(
                         "name", "LaunchBuildInstance",
                         "action", WorkflowAction.LAUNCH_INSTANCE,
                         "onFailure", WorkflowOnFailure.ABORT,
                         "inputs", Map.of(
                                 "waitFor", "ssmAgent")), Map.of(
                         "name", "ExecuteComponents",
                         "action", WorkflowAction.EXECUTE_COMPONENTS,
                         "onFailure", WorkflowOnFailure.ABORT,
                         "inputs", Map.of(
                                 "instanceId", "i-123")), Map.of(
                         "name", "CreateImage",
                         "action", WorkflowAction.CREATE_IMAGE,
                         "onFailure", WorkflowOnFailure.ABORT,
                         "inputs", Map.of(
                                 "instanceId", "i-123")), Map.of(
                         "name", "TerminateInstance",
                         "action", WorkflowAction.TERMINATE_INSTANCE,
                         "onFailure", WorkflowOnFailure.CONTINUE,
                         "inputs", Map.of(
                                 "instanceId", "i-123"))),
                 "outputs", List.of(Map.of(
                         "name", "ImageId",
                         "value", "$.stepOutputs.CreateImage.imageId")))))
         .build();
 
  • Enum Constant Details

    • ABORT

      @Stability(Experimental) public static final WorkflowOnFailure ABORT
      (experimental) Fails the image build if the workflow fails.
    • CONTINUE

      @Stability(Experimental) public static final WorkflowOnFailure CONTINUE
      (experimental) Continues with the image build if the workflow fails.
  • Method Details

    • values

      public static WorkflowOnFailure[] 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

      public static WorkflowOnFailure valueOf(String name)
      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 name
      NullPointerException - if the argument is null