WorkflowAction

class aws_cdk.aws_imagebuilder_alpha.WorkflowAction(*values)

Bases: Enum

(experimental) The action for a step within the workflow document.

Stability:

experimental

ExampleMetadata:

infused

Example:

workflow = imagebuilder.Workflow(self, "MyWorkflow",
    workflow_type=imagebuilder.WorkflowType.BUILD,
    data=imagebuilder.WorkflowData.from_json_object({
        "schema_version": imagebuilder.WorkflowSchemaVersion.V1_0,
        "steps": [{
            "name": "LaunchBuildInstance",
            "action": imagebuilder.WorkflowAction.LAUNCH_INSTANCE,
            "on_failure": imagebuilder.WorkflowOnFailure.ABORT,
            "inputs": {
                "wait_for": "ssmAgent"
            }
        }, {
            "name": "ExecuteComponents",
            "action": imagebuilder.WorkflowAction.EXECUTE_COMPONENTS,
            "on_failure": imagebuilder.WorkflowOnFailure.ABORT,
            "inputs": {
                "instance_id": "i-123"
            }
        }, {
            "name": "CreateImage",
            "action": imagebuilder.WorkflowAction.CREATE_IMAGE,
            "on_failure": imagebuilder.WorkflowOnFailure.ABORT,
            "inputs": {
                "instance_id": "i-123"
            }
        }, {
            "name": "TerminateInstance",
            "action": imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
            "on_failure": imagebuilder.WorkflowOnFailure.CONTINUE,
            "inputs": {
                "instance_id": "i-123"
            }
        }
        ],
        "outputs": [{
            "name": "ImageId",
            "value": "$.stepOutputs.CreateImage.imageId"
        }
        ]
    })
)

Attributes

APPLY_IMAGE_CONFIGURATIONS

(experimental) Applies customizations and configurations to the input AMIs, such as publishing the AMI to SSM Parameter Store, or creating launch template versions with the AMI IDs provided in the input.

Stability:

experimental

BOOTSTRAP_INSTANCE_FOR_CONTAINER

(experimental) The BootstrapInstanceForContainer action runs a service script to bootstrap the instance with minimum requirements to run container workflows.

Stability:

experimental

COLLECT_IMAGE_METADATA

(experimental) The CollectImageMetadata action collects additional information about the instance, such as the list of packages and their respective versions.

Stability:

experimental

COLLECT_IMAGE_SCAN_FINDINGS

(experimental) The CollectImageScanFindings action collects findings reported by Amazon Inspector for the provided instance.

Stability:

experimental

CREATE_IMAGE

(experimental) The CreateImage action creates an AMI from a running instance with the ec2:CreateImage API.

Stability:

experimental

DISTRIBUTE_IMAGE

(experimental) The DistributeImage action copies an AMI using the image’s distribution configuration, or using the distribution settings in the step input.

Stability:

experimental

EXECUTE_COMPONENTS

(experimental) The ExecuteComponents action runs components that are specified in the recipe for the current image being built.

Stability:

experimental

EXECUTE_STATE_MACHINE

(experimental) The ExecuteStateMachine action executes a the state machine provided and waits for completion as part of the workflow.

Stability:

experimental

LAUNCH_INSTANCE

(experimental) The LaunchInstance action launches an instance using the settings from your recipe and infrastructure configuration resources.

Stability:

experimental

MODIFY_IMAGE_ATTRIBUTES

(experimental) Applies attribute updates to the provided set of distributed images, such as launch permission updates.

Stability:

experimental

REGISTER_IMAGE

(experimental) The RegisterImage action creates an AMI from a set of snapshots with the ec2:RegisterImage API.

Stability:

experimental

RUN_COMMAND

(experimental) The RunCommand action runs a command document against the provided instance.

Stability:

experimental

RUN_SYS_PREP

(experimental) The RunSysprep action runs the Sysprep document on the provided Windows instance.

Stability:

experimental

SANITIZE_INSTANCE

(experimental) The SanitizeInstance action runs a recommended sanitization script on Linux instances.

Stability:

experimental

TERMINATE_INSTANCE

(experimental) The TerminateInstance action terminates the provided instance.

Stability:

experimental

WAIT_FOR_ACTION

(experimental) The WaitForAction action pauses the workflow and waits to receive an external signal from the imagebuilder:SendWorkflowStepAction API.

Stability:

experimental

WAIT_FOR_SSM_AGENT

(experimental) The WaitForSSMAgent action waits for the given instance to have connectivity with SSM before proceeding.

Stability:

experimental