java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.imagebuilder.alpha.WorkflowData
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
S3WorkflowData

@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)", date="2025-12-05T22:26:50.103Z") @Stability(Experimental) public abstract class WorkflowData extends software.amazon.jsii.JsiiObject
(experimental) Helper class for referencing and uploading workflow data.

Example:

 Workflow workflow = Workflow.Builder.create(this, "EncryptedWorkflow")
         .workflowType(WorkflowType.BUILD)
         .kmsKey(new Key(this, "WorkflowKey"))
         .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", "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();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    WorkflowData(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    WorkflowData(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromAsset(software.constructs.Construct scope, String id, String path)
    (experimental) Uploads workflow data from a local file to S3 to use as the workflow data.
    fromAsset(software.constructs.Construct scope, String id, String path, AssetOptions options)
    (experimental) Uploads workflow data from a local file to S3 to use as the workflow data.
    (experimental) Uses an inline JSON or YAML string as the workflow data.
    fromJsonObject(Map<String,? extends Object> data)
    (experimental) Uses an inline JSON object as the workflow data.
    fromS3(IBucket bucket, String key)
    (experimental) References workflow data from a pre-existing S3 object.
    (experimental) The rendered workflow data value, for use in CloudFormation.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • WorkflowData

      protected WorkflowData(software.amazon.jsii.JsiiObjectRef objRef)
    • WorkflowData

      protected WorkflowData(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • WorkflowData

      @Stability(Experimental) protected WorkflowData()
  • Method Details

    • fromAsset

      @Stability(Experimental) @NotNull public static S3WorkflowData fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String path, @Nullable AssetOptions options)
      (experimental) Uploads workflow data from a local file to S3 to use as the workflow data.

      Parameters:
      scope - The construct scope. This parameter is required.
      id - Identifier of the construct. This parameter is required.
      path - The local path to the workflow data file. This parameter is required.
      options - S3 asset upload options.
    • fromAsset

      @Stability(Experimental) @NotNull public static S3WorkflowData fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String path)
      (experimental) Uploads workflow data from a local file to S3 to use as the workflow data.

      Parameters:
      scope - The construct scope. This parameter is required.
      id - Identifier of the construct. This parameter is required.
      path - The local path to the workflow data file. This parameter is required.
    • fromInline

      @Stability(Experimental) @NotNull public static WorkflowData fromInline(@NotNull String data)
      (experimental) Uses an inline JSON or YAML string as the workflow data.

      Parameters:
      data - An inline JSON or YAML string representing the workflow data. This parameter is required.
    • fromJsonObject

      @Stability(Experimental) @NotNull public static WorkflowData fromJsonObject(@NotNull Map<String,? extends Object> data)
      (experimental) Uses an inline JSON object as the workflow data.

      Parameters:
      data - An inline JSON object representing the workflow data. This parameter is required.
    • fromS3

      @Stability(Experimental) @NotNull public static S3WorkflowData fromS3(@NotNull IBucket bucket, @NotNull String key)
      (experimental) References workflow data from a pre-existing S3 object.

      Parameters:
      bucket - The S3 bucket where the workflow data is stored. This parameter is required.
      key - The S3 key of the workflow data file. This parameter is required.
    • render

      @Stability(Experimental) @NotNull public abstract WorkflowDataConfig render()
      (experimental) The rendered workflow data value, for use in CloudFormation.

      • For inline workflows, data is the workflow text
      • For S3-backed workflows, uri is the S3 URL