Class Workflow


  • public class Workflow
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS EC2 Image Builder Workflow. > Image Builder manages the workflows for the distribution stage. Therefore, using the DISTRIBUTION workflow type results in an error. ## Example Usage ### Basic Usage <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.imagebuilder.Workflow;
     import com.pulumi.aws.imagebuilder.WorkflowArgs;
     import java.util.List;
     import java.util.ArrayList;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new Workflow("example", WorkflowArgs.builder()
                 .name("example")
                 .version("1.0.0")
                 .type("TEST")
                 .data("""
     name: example
     description: Workflow to test an image
     schemaVersion: 1.0
     
     parameters:
       - name: waitForActionAtEnd
         type: boolean
     
     steps:
       - name: LaunchTestInstance
         action: LaunchInstance
         onFailure: Abort
         inputs:
           waitFor: "ssmAgent"
     
       - name: TerminateTestInstance
         action: TerminateInstance
         onFailure: Continue
         inputs:
           instanceId.$: "$.stepOutputs.LaunchTestInstance.instanceId"
     
       - name: WaitForActionAtEnd
         action: WaitForAction
         if:
           booleanEquals: true
           value: "$.parameters.waitForActionAtEnd"
                 """)
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import EC2 Image Builder Workflow using the `example_id_arg`. For example: ```sh $ pulumi import aws:imagebuilder/workflow:Workflow example arn:aws:imagebuilder:us-east-1:aws:workflow/test/example/1.0.1/1 ``` Certain resource arguments, such as `uri`, cannot be read via the API and imported into Terraform. Terraform will display a difference for these arguments the first run after import if declared in the Terraform configuration for an imported resource.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Workflow​(java.lang.String name)  
      Workflow​(java.lang.String name, WorkflowArgs args)  
      Workflow​(java.lang.String name, WorkflowArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> changeDescription()  
      com.pulumi.core.Output<java.lang.String> data()  
      com.pulumi.core.Output<java.lang.String> dateCreated()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      static Workflow get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, WorkflowState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> owner()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.lang.String> type()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> uri()  
      com.pulumi.core.Output<java.lang.String> version()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Workflow

        public Workflow​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Workflow

        public Workflow​(java.lang.String name,
                        WorkflowArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Workflow

        public Workflow​(java.lang.String name,
                        WorkflowArgs args,
                        @Nullable
                        com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        Amazon Resource Name (ARN) of the workflow.
      • changeDescription

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> changeDescription()
        Returns:
        Change description of the workflow.
      • data

        public com.pulumi.core.Output<java.lang.String> data()
        Returns:
        Inline YAML string with data of the workflow. Exactly one of `data` and `uri` can be specified.
      • dateCreated

        public com.pulumi.core.Output<java.lang.String> dateCreated()
        Returns:
        Date the workflow was created.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description of the workflow.
      • kmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()
        Returns:
        Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the workflow.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the workflow.
      • owner

        public com.pulumi.core.Output<java.lang.String> owner()
        Returns:
        Owner of the workflow.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value map of resource tags for the workflow. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        Type of the workflow. Valid values: `BUILD`, `TEST`.
      • uri

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> uri()
        Returns:
        S3 URI with data of the workflow. Exactly one of `data` and `uri` can be specified.
      • version

        public com.pulumi.core.Output<java.lang.String> version()
        Returns:
        Version of the workflow. The following arguments are optional:
      • get

        public static Workflow get​(java.lang.String name,
                                   com.pulumi.core.Output<java.lang.String> id,
                                   @Nullable
                                   WorkflowState state,
                                   @Nullable
                                   com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.