Workflow
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Glue.Workflow("example", new Aws.Glue.WorkflowArgs
{
});
var example_start = new Aws.Glue.Trigger("example-start", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = "example-job",
},
},
Type = "ON_DEMAND",
WorkflowName = example.Name,
});
var example_inner = new Aws.Glue.Trigger("example-inner", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = "another-example-job",
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions =
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = "example-job",
State = "SUCCEEDED",
},
},
},
Type = "CONDITIONAL",
WorkflowName = example.Name,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/glue"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := glue.NewWorkflow(ctx, "example", nil)
if err != nil {
return err
}
_, err = glue.NewTrigger(ctx, "example_start", &glue.TriggerArgs{
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.String("example-job"),
},
},
Type: pulumi.String("ON_DEMAND"),
WorkflowName: example.Name,
})
if err != nil {
return err
}
_, err = glue.NewTrigger(ctx, "example_inner", &glue.TriggerArgs{
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.String("another-example-job"),
},
},
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
JobName: pulumi.String("example-job"),
State: pulumi.String("SUCCEEDED"),
},
},
},
Type: pulumi.String("CONDITIONAL"),
WorkflowName: example.Name,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.glue.Workflow("example")
example_start = aws.glue.Trigger("example-start",
actions=[{
"jobName": "example-job",
}],
type="ON_DEMAND",
workflow_name=example.name)
example_inner = aws.glue.Trigger("example-inner",
actions=[{
"jobName": "another-example-job",
}],
predicate={
"conditions": [{
"jobName": "example-job",
"state": "SUCCEEDED",
}],
},
type="CONDITIONAL",
workflow_name=example.name)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Workflow("example", {});
const example_start = new aws.glue.Trigger("example-start", {
actions: [{
jobName: "example-job",
}],
type: "ON_DEMAND",
workflowName: example.name,
});
const example_inner = new aws.glue.Trigger("example-inner", {
actions: [{
jobName: "another-example-job",
}],
predicate: {
conditions: [{
jobName: "example-job",
state: "SUCCEEDED",
}],
},
type: "CONDITIONAL",
workflowName: example.name,
});Create a Workflow Resource
new Workflow(name: string, args?: WorkflowArgs, opts?: CustomResourceOptions);def Workflow(resource_name, opts=None, default_run_properties=None, description=None, name=None, __props__=None);func NewWorkflow(ctx *Context, name string, args *WorkflowArgs, opts ...ResourceOption) (*Workflow, error)public Workflow(string name, WorkflowArgs? args = null, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Workflow Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Workflow resource accepts the following input properties:
- Default
Run Dictionary<string, object>Properties 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.
- Name string
The name you assign to this workflow.
- Default
Run map[string]interface{}Properties 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.
- Name string
The name you assign to this workflow.
- default
Run {[key: string]: any}Properties 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.
- name string
The name you assign to this workflow.
- default_
run_ Dict[str, Any]properties 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.
- name str
The name you assign to this workflow.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workflow resource produces the following output properties:
Look up an 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): Workflowstatic get(resource_name, id, opts=None, default_run_properties=None, description=None, name=None, __props__=None);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)- 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.
The following state arguments are supported:
- Default
Run Dictionary<string, object>Properties 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.
- Name string
The name you assign to this workflow.
- Default
Run map[string]interface{}Properties 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.
- Name string
The name you assign to this workflow.
- default
Run {[key: string]: any}Properties 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.
- name string
The name you assign to this workflow.
- default_
run_ Dict[str, Any]properties 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.
- name str
The name you assign to this workflow.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.