> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# WorkflowType

The type of the workflow.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/workflow.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/workflow.ts#L313)

## Example

```ts
const workflow = new imagebuilder.Workflow(this, 'EncryptedWorkflow', {
  workflowType: imagebuilder.WorkflowType.BUILD,
  kmsKey: new kms.Key(this, 'WorkflowKey'),
  data: imagebuilder.WorkflowData.fromJsonObject({
    schemaVersion: imagebuilder.WorkflowSchemaVersion.V1_0,
    steps: [
      {
        name: 'LaunchBuildInstance',
        action: imagebuilder.WorkflowAction.LAUNCH_INSTANCE,
        onFailure: imagebuilder.WorkflowOnFailure.ABORT,
        inputs: {
          waitFor: 'ssmAgent',
        },
      },
      {
        name: 'CreateImage',
        action: imagebuilder.WorkflowAction.CREATE_IMAGE,
        onFailure: imagebuilder.WorkflowOnFailure.ABORT,
        inputs: {
          'instanceId': 'i-123',
        },
      },
      {
        name: 'TerminateInstance',
        action: imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
        onFailure: imagebuilder.WorkflowOnFailure.CONTINUE,
        inputs: {
          'instanceId': 'i-123',
        },
      },
    ],
    outputs: [
      {
        name: 'ImageId',
        value: '$.stepOutputs.CreateImage.imageId',
      },
    ],
  }),
});
```

## Members

| Member | Description |
| --- | --- |
| `BUILD` | Indicates the workflow is for building images. |
| `TEST` | Indicates the workflow is for testing images. |
| `DISTRIBUTION` | Indicates the workflow is for distributing images. |

## Referenced by

- [`AmazonManagedWorkflowAttributes`](/v2/docs/@aws-cdk_aws-imagebuilder-alpha.AmazonManagedWorkflowAttributes).workflowType
- [`WorkflowAttributes`](/v2/docs/@aws-cdk_aws-imagebuilder-alpha.WorkflowAttributes).workflowType
- [`WorkflowProps`](/v2/docs/@aws-cdk_aws-imagebuilder-alpha.WorkflowProps).workflowType
