Class Workflow
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.imagebuilder.alpha.Workflow
- All Implemented Interfaces:
IEnvironmentAware,IResource,IWorkflow,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:50.101Z")
@Stability(Experimental)
public class Workflow
extends Resource
implements IWorkflow
(experimental) Represents an EC2 Image Builder Workflow.
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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forWorkflow.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.imagebuilder.alpha.IWorkflow
IWorkflow.Jsii$Default, IWorkflow.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWorkflow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedWorkflow(software.amazon.jsii.JsiiObjectRef objRef) Workflow(software.constructs.Construct scope, String id, WorkflowProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IWorkflowfromWorkflowArn(software.constructs.Construct scope, String id, String workflowArn) (experimental) Import an existing workflow given its ARN.static IWorkflowfromWorkflowAttributes(software.constructs.Construct scope, String id, WorkflowAttributes attrs) (experimental) Import an existing workflow by providing its attributes.(experimental) The ARN of the workflow.(experimental) The name of the workflow.(experimental) The type of the workflow.(experimental) The version of the workflow.grant(IGrantable grantee, String... actions) (experimental) Grant custom actions to the given grantee for the workflow.grantRead(IGrantable grantee) (experimental) Grant read permissions to the given grantee for the workflow.static BooleanisWorkflow(Object x) (experimental) Return whether the given object is a Workflow.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
Workflow
protected Workflow(software.amazon.jsii.JsiiObjectRef objRef) -
Workflow
protected Workflow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Workflow
@Stability(Experimental) public Workflow(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WorkflowProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromWorkflowArn
@Stability(Experimental) @NotNull public static IWorkflow fromWorkflowArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String workflowArn) (experimental) Import an existing workflow given its ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.workflowArn- This parameter is required.
-
fromWorkflowAttributes
@Stability(Experimental) @NotNull public static IWorkflow fromWorkflowAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WorkflowAttributes attrs) (experimental) Import an existing workflow by providing its attributes.The provided name must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens. You may not provide a dynamic expression for the workflowArn or workflowType
- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
isWorkflow
(experimental) Return whether the given object is a Workflow.- Parameters:
x- This parameter is required.
-
grant
@Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) (experimental) Grant custom actions to the given grantee for the workflow. -
grantRead
(experimental) Grant read permissions to the given grantee for the workflow. -
getWorkflowArn
(experimental) The ARN of the workflow.- Specified by:
getWorkflowArnin interfaceIWorkflow
-
getWorkflowName
(experimental) The name of the workflow.- Specified by:
getWorkflowNamein interfaceIWorkflow
-
getWorkflowType
(experimental) The type of the workflow.- Specified by:
getWorkflowTypein interfaceIWorkflow
-
getWorkflowVersion
(experimental) The version of the workflow.- Specified by:
getWorkflowVersionin interfaceIWorkflow
-