Workflow class
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", {
actions: [{
jobName: "example-job",
}],
name: "trigger-start",
type: "ON_DEMAND",
workflowName: example.name,
});
const example_inner = new aws.glue.Trigger("example-inner", {
predicate: {
conditions: [{
jobName: "example-job",
state: "SUCCEEDED",
}],
},
actions: [{
jobName: "another-example-job",
}],
name: "trigger-inner",
type: "CONDITIONAL",
workflowName: example.name,
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Workflow("example", name="example")
example_start = aws.glue.Trigger("example-start",
actions=[{
"job_name": "example-job",
}],
name="trigger-start",
type="ON_DEMAND",
workflow_name=example.name)
example_inner = aws.glue.Trigger("example-inner",
predicate={
"conditions": [{
"job_name": "example-job",
"state": "SUCCEEDED",
}],
},
actions=[{
"job_name": "another-example-job",
}],
name="trigger-inner",
type="CONDITIONAL",
workflow_name=example.name)
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()
{
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = "example-job",
},
},
Name = "trigger-start",
Type = "ON_DEMAND",
WorkflowName = example.Name,
});
var example_inner = new Aws.Glue.Trigger("example-inner", new()
{
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",
},
},
Name = "trigger-inner",
Type = "CONDITIONAL",
WorkflowName = example.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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{
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.String("example-job"),
},
},
Name: pulumi.String("trigger-start"),
Type: pulumi.String("ON_DEMAND"),
WorkflowName: example.Name,
})
if err != nil {
return err
}
_, err = glue.NewTrigger(ctx, "example-inner", &glue.TriggerArgs{
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"),
},
},
Name: pulumi.String("trigger-inner"),
Type: pulumi.String("CONDITIONAL"),
WorkflowName: example.Name,
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_workflow" "example" {
name = "example"
}
resource "aws_glue_trigger" "example-start" {
actions {
job_name = "example-job"
}
name = "trigger-start"
type = "ON_DEMAND"
workflow_name = aws_glue_workflow.example.name
}
resource "aws_glue_trigger" "example-inner" {
predicate = {
conditions = [{
"jobName" = "example-job"
"state" = "SUCCEEDED"
}]
}
actions {
job_name = "another-example-job"
}
name = "trigger-inner"
type = "CONDITIONAL"
workflow_name = aws_glue_workflow.example.name
}
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 com.pulumi.aws.glue.inputs.TriggerPredicateConditionArgs;
import java.util.ArrayList;
import java.util.Arrays;
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()
.actions(TriggerActionArgs.builder()
.jobName("example-job")
.build())
.name("trigger-start")
.type("ON_DEMAND")
.workflowName(example.name())
.build());
var example_inner = new Trigger("example-inner", TriggerArgs.builder()
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName("example-job")
.state("SUCCEEDED")
.build())
.build())
.actions(TriggerActionArgs.builder()
.jobName("another-example-job")
.build())
.name("trigger-inner")
.type("CONDITIONAL")
.workflowName(example.name())
.build());
}
}
resources:
example:
type: aws:glue:Workflow
properties:
name: example
example-start:
type: aws:glue:Trigger
properties:
actions:
- jobName: example-job
name: trigger-start
type: ON_DEMAND
workflowName: ${example.name}
example-inner:
type: aws:glue:Trigger
properties:
predicate:
conditions:
- jobName: example-job
state: SUCCEEDED
actions:
- jobName: another-example-job
name: trigger-inner
type: CONDITIONAL
workflowName: ${example.name}
Import
Using pulumi import, import Glue Workflows using name. For example:
$ pulumi import aws:glue/workflow:Workflow MyWorkflow MyWorkflow
Constructors
- Workflow(String name, {WorkflowArgs? args, CustomResourceOptions? options})
-
Creates a new Workflow.
nameThe Pulumi resource name.argsArguments used to configure this Workflow. The set of arguments for Workflow.optionsResource options controlling this resource's behavior. - Workflow.reference(String urn)
- Creates a typed reference to an existing Workflow resource.
Properties
-
arn
↔ Output<
String> -
ARN of Glue Workflow
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
defaultRunProperties
↔ Output<
Map< String, String> ?> -
A map of default run properties for this workflow. These properties are passed to all jobs associated to the workflow.
latefinal
-
description
↔ Output<
String?> -
Description of the workflow.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
maxConcurrentRuns
↔ Output<
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.
latefinal
-
name
↔ Output<
String> -
The name you assign to this workflow.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Key-value map of resource tags. .If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited