1. Packages
  2. AWS Classic
  3. API Docs
  4. glue
  5. Workflow

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.glue.Workflow

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a Glue Workflow resource. The workflow graph (DAG) can be build using the aws.glue.Trigger resource. See the example below for creating a graph with four nodes (two triggers and two jobs).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.glue.Workflow("example", {name: "example"});
    const example_start = new aws.glue.Trigger("example-start", {
        name: "trigger-start",
        type: "ON_DEMAND",
        workflowName: example.name,
        actions: [{
            jobName: "example-job",
        }],
    });
    const example_inner = new aws.glue.Trigger("example-inner", {
        name: "trigger-inner",
        type: "CONDITIONAL",
        workflowName: example.name,
        predicate: {
            conditions: [{
                jobName: "example-job",
                state: "SUCCEEDED",
            }],
        },
        actions: [{
            jobName: "another-example-job",
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.glue.Workflow("example", name="example")
    example_start = aws.glue.Trigger("example-start",
        name="trigger-start",
        type="ON_DEMAND",
        workflow_name=example.name,
        actions=[{
            "jobName": "example-job",
        }])
    example_inner = aws.glue.Trigger("example-inner",
        name="trigger-inner",
        type="CONDITIONAL",
        workflow_name=example.name,
        predicate={
            "conditions": [{
                "jobName": "example-job",
                "state": "SUCCEEDED",
            }],
        },
        actions=[{
            "jobName": "another-example-job",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := glue.NewWorkflow(ctx, "example", &glue.WorkflowArgs{
    			Name: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = glue.NewTrigger(ctx, "example-start", &glue.TriggerArgs{
    			Name:         pulumi.String("trigger-start"),
    			Type:         pulumi.String("ON_DEMAND"),
    			WorkflowName: example.Name,
    			Actions: glue.TriggerActionArray{
    				&glue.TriggerActionArgs{
    					JobName: pulumi.String("example-job"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = glue.NewTrigger(ctx, "example-inner", &glue.TriggerArgs{
    			Name:         pulumi.String("trigger-inner"),
    			Type:         pulumi.String("CONDITIONAL"),
    			WorkflowName: example.Name,
    			Predicate: &glue.TriggerPredicateArgs{
    				Conditions: glue.TriggerPredicateConditionArray{
    					&glue.TriggerPredicateConditionArgs{
    						JobName: pulumi.String("example-job"),
    						State:   pulumi.String("SUCCEEDED"),
    					},
    				},
    			},
    			Actions: glue.TriggerActionArray{
    				&glue.TriggerActionArgs{
    					JobName: pulumi.String("another-example-job"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Glue.Workflow("example", new()
        {
            Name = "example",
        });
    
        var example_start = new Aws.Glue.Trigger("example-start", new()
        {
            Name = "trigger-start",
            Type = "ON_DEMAND",
            WorkflowName = example.Name,
            Actions = new[]
            {
                new Aws.Glue.Inputs.TriggerActionArgs
                {
                    JobName = "example-job",
                },
            },
        });
    
        var example_inner = new Aws.Glue.Trigger("example-inner", new()
        {
            Name = "trigger-inner",
            Type = "CONDITIONAL",
            WorkflowName = example.Name,
            Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
            {
                Conditions = new[]
                {
                    new Aws.Glue.Inputs.TriggerPredicateConditionArgs
                    {
                        JobName = "example-job",
                        State = "SUCCEEDED",
                    },
                },
            },
            Actions = new[]
            {
                new Aws.Glue.Inputs.TriggerActionArgs
                {
                    JobName = "another-example-job",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.glue.Workflow;
    import com.pulumi.aws.glue.WorkflowArgs;
    import com.pulumi.aws.glue.Trigger;
    import com.pulumi.aws.glue.TriggerArgs;
    import com.pulumi.aws.glue.inputs.TriggerActionArgs;
    import com.pulumi.aws.glue.inputs.TriggerPredicateArgs;
    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")
                .build());
    
            var example_start = new Trigger("example-start", TriggerArgs.builder()
                .name("trigger-start")
                .type("ON_DEMAND")
                .workflowName(example.name())
                .actions(TriggerActionArgs.builder()
                    .jobName("example-job")
                    .build())
                .build());
    
            var example_inner = new Trigger("example-inner", TriggerArgs.builder()
                .name("trigger-inner")
                .type("CONDITIONAL")
                .workflowName(example.name())
                .predicate(TriggerPredicateArgs.builder()
                    .conditions(TriggerPredicateConditionArgs.builder()
                        .jobName("example-job")
                        .state("SUCCEEDED")
                        .build())
                    .build())
                .actions(TriggerActionArgs.builder()
                    .jobName("another-example-job")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:glue:Workflow
        properties:
          name: example
      example-start:
        type: aws:glue:Trigger
        properties:
          name: trigger-start
          type: ON_DEMAND
          workflowName: ${example.name}
          actions:
            - jobName: example-job
      example-inner:
        type: aws:glue:Trigger
        properties:
          name: trigger-inner
          type: CONDITIONAL
          workflowName: ${example.name}
          predicate:
            conditions:
              - jobName: example-job
                state: SUCCEEDED
          actions:
            - jobName: another-example-job
    

    Create Workflow Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Workflow(name: string, args?: WorkflowArgs, opts?: CustomResourceOptions);
    @overload
    def Workflow(resource_name: str,
                 args: Optional[WorkflowArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Workflow(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 default_run_properties: Optional[Mapping[str, str]] = None,
                 description: Optional[str] = None,
                 max_concurrent_runs: Optional[int] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewWorkflow(ctx *Context, name string, args *WorkflowArgs, opts ...ResourceOption) (*Workflow, error)
    public Workflow(string name, WorkflowArgs? args = null, CustomResourceOptions? opts = null)
    public Workflow(String name, WorkflowArgs args)
    public Workflow(String name, WorkflowArgs args, CustomResourceOptions options)
    
    type: aws:glue:Workflow
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkflowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkflowArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkflowArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkflowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkflowArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var workflowResource = new Aws.Glue.Workflow("workflowResource", new()
    {
        DefaultRunProperties = 
        {
            { "string", "string" },
        },
        Description = "string",
        MaxConcurrentRuns = 0,
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := glue.NewWorkflow(ctx, "workflowResource", &glue.WorkflowArgs{
    	DefaultRunProperties: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description:       pulumi.String("string"),
    	MaxConcurrentRuns: pulumi.Int(0),
    	Name:              pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var workflowResource = new Workflow("workflowResource", WorkflowArgs.builder()
        .defaultRunProperties(Map.of("string", "string"))
        .description("string")
        .maxConcurrentRuns(0)
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    workflow_resource = aws.glue.Workflow("workflowResource",
        default_run_properties={
            "string": "string",
        },
        description="string",
        max_concurrent_runs=0,
        name="string",
        tags={
            "string": "string",
        })
    
    const workflowResource = new aws.glue.Workflow("workflowResource", {
        defaultRunProperties: {
            string: "string",
        },
        description: "string",
        maxConcurrentRuns: 0,
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:glue:Workflow
    properties:
        defaultRunProperties:
            string: string
        description: string
        maxConcurrentRuns: 0
        name: string
        tags:
            string: string
    

    Workflow Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Workflow resource accepts the following input properties:

    DefaultRunProperties Dictionary<string, string>
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    Description string
    Description of the workflow.
    MaxConcurrentRuns int
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    Name string
    The name you assign to this workflow.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    DefaultRunProperties map[string]string
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    Description string
    Description of the workflow.
    MaxConcurrentRuns int
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    Name string
    The name you assign to this workflow.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    defaultRunProperties Map<String,String>
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description String
    Description of the workflow.
    maxConcurrentRuns Integer
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name String
    The name you assign to this workflow.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    defaultRunProperties {[key: string]: string}
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description string
    Description of the workflow.
    maxConcurrentRuns number
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name string
    The name you assign to this workflow.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    default_run_properties Mapping[str, str]
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description str
    Description of the workflow.
    max_concurrent_runs int
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name str
    The name you assign to this workflow.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    defaultRunProperties Map<String>
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description String
    Description of the workflow.
    maxConcurrentRuns Number
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name String
    The name you assign to this workflow.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Workflow resource produces the following output properties:

    Arn string
    Amazon Resource Name (ARN) of Glue Workflow
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of Glue Workflow
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of Glue Workflow
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of Glue Workflow
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of Glue Workflow
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of Glue Workflow
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Workflow Resource

    Get an existing Workflow resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WorkflowState, opts?: CustomResourceOptions): Workflow
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            default_run_properties: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            max_concurrent_runs: Optional[int] = None,
            name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Workflow
    func GetWorkflow(ctx *Context, name string, id IDInput, state *WorkflowState, opts ...ResourceOption) (*Workflow, error)
    public static Workflow Get(string name, Input<string> id, WorkflowState? state, CustomResourceOptions? opts = null)
    public static Workflow get(String name, Output<String> id, WorkflowState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    Amazon Resource Name (ARN) of Glue Workflow
    DefaultRunProperties Dictionary<string, string>
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    Description string
    Description of the workflow.
    MaxConcurrentRuns int
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    Name string
    The name you assign to this workflow.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of Glue Workflow
    DefaultRunProperties map[string]string
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    Description string
    Description of the workflow.
    MaxConcurrentRuns int
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    Name string
    The name you assign to this workflow.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of Glue Workflow
    defaultRunProperties Map<String,String>
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description String
    Description of the workflow.
    maxConcurrentRuns Integer
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name String
    The name you assign to this workflow.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of Glue Workflow
    defaultRunProperties {[key: string]: string}
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description string
    Description of the workflow.
    maxConcurrentRuns number
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name string
    The name you assign to this workflow.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of Glue Workflow
    default_run_properties Mapping[str, str]
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description str
    Description of the workflow.
    max_concurrent_runs int
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name str
    The name you assign to this workflow.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of Glue Workflow
    defaultRunProperties Map<String>
    A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
    description String
    Description of the workflow.
    maxConcurrentRuns Number
    Prevents exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
    name String
    The name you assign to this workflow.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import Glue Workflows using name. For example:

    $ pulumi import aws:glue/workflow:Workflow MyWorkflow MyWorkflow
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi