TriggerArgs

data class TriggerArgs(val actions: Output<List<TriggerActionArgs>>? = null, val description: Output<String>? = null, val enabled: Output<Boolean>? = null, val eventBatchingConditions: Output<List<TriggerEventBatchingConditionArgs>>? = null, val name: Output<String>? = null, val predicate: Output<TriggerPredicateArgs>? = null, val schedule: Output<String>? = null, val startOnCreation: Output<Boolean>? = null, val tags: Output<Map<String, String>>? = null, val type: Output<String>? = null, val workflowName: Output<String>? = null) : ConvertibleToJava<TriggerArgs>

Manages a Glue Trigger resource.

Example Usage

Conditional Trigger

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
name: "example",
type: "CONDITIONAL",
actions: [{
jobName: example1.name,
}],
predicate: {
conditions: [{
jobName: example2.name,
state: "SUCCEEDED",
}],
},
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
name="example",
type="CONDITIONAL",
actions=[{
"job_name": example1["name"],
}],
predicate={
"conditions": [{
"job_name": example2["name"],
"state": "SUCCEEDED",
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Trigger("example", new()
{
Name = "example",
Type = "CONDITIONAL",
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = example1.Name,
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions = new[]
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = example2.Name,
State = "SUCCEEDED",
},
},
},
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Name: pulumi.String("example"),
Type: pulumi.String("CONDITIONAL"),
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(example1.Name),
},
},
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
JobName: pulumi.Any(example2.Name),
State: pulumi.String("SUCCEEDED"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 Trigger("example", TriggerArgs.builder()
.name("example")
.type("CONDITIONAL")
.actions(TriggerActionArgs.builder()
.jobName(example1.name())
.build())
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName(example2.name())
.state("SUCCEEDED")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
name: example
type: CONDITIONAL
actions:
- jobName: ${example1.name}
predicate:
conditions:
- jobName: ${example2.name}
state: SUCCEEDED

On-Demand Trigger

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
name: "example",
type: "ON_DEMAND",
actions: [{
jobName: exampleAwsGlueJob.name,
}],
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
name="example",
type="ON_DEMAND",
actions=[{
"job_name": example_aws_glue_job["name"],
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Trigger("example", new()
{
Name = "example",
Type = "ON_DEMAND",
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = exampleAwsGlueJob.Name,
},
},
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Name: pulumi.String("example"),
Type: pulumi.String("ON_DEMAND"),
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(exampleAwsGlueJob.Name),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Trigger;
import com.pulumi.aws.glue.TriggerArgs;
import com.pulumi.aws.glue.inputs.TriggerActionArgs;
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 Trigger("example", TriggerArgs.builder()
.name("example")
.type("ON_DEMAND")
.actions(TriggerActionArgs.builder()
.jobName(exampleAwsGlueJob.name())
.build())
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
name: example
type: ON_DEMAND
actions:
- jobName: ${exampleAwsGlueJob.name}

Scheduled Trigger

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
name: "example",
schedule: "cron(15 12 * * ? *)",
type: "SCHEDULED",
actions: [{
jobName: exampleAwsGlueJob.name,
}],
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
name="example",
schedule="cron(15 12 * * ? *)",
type="SCHEDULED",
actions=[{
"job_name": example_aws_glue_job["name"],
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Trigger("example", new()
{
Name = "example",
Schedule = "cron(15 12 * * ? *)",
Type = "SCHEDULED",
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = exampleAwsGlueJob.Name,
},
},
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Name: pulumi.String("example"),
Schedule: pulumi.String("cron(15 12 * * ? *)"),
Type: pulumi.String("SCHEDULED"),
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(exampleAwsGlueJob.Name),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Trigger;
import com.pulumi.aws.glue.TriggerArgs;
import com.pulumi.aws.glue.inputs.TriggerActionArgs;
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 Trigger("example", TriggerArgs.builder()
.name("example")
.schedule("cron(15 12 * * ? *)")
.type("SCHEDULED")
.actions(TriggerActionArgs.builder()
.jobName(exampleAwsGlueJob.name())
.build())
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
name: example
schedule: cron(15 12 * * ? *)
type: SCHEDULED
actions:
- jobName: ${exampleAwsGlueJob.name}

Conditional Trigger with Crawler Action

Note: Triggers can have both a crawler action and a crawler condition, just no example provided.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
name: "example",
type: "CONDITIONAL",
actions: [{
crawlerName: example1.name,
}],
predicate: {
conditions: [{
jobName: example2.name,
state: "SUCCEEDED",
}],
},
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
name="example",
type="CONDITIONAL",
actions=[{
"crawler_name": example1["name"],
}],
predicate={
"conditions": [{
"job_name": example2["name"],
"state": "SUCCEEDED",
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Trigger("example", new()
{
Name = "example",
Type = "CONDITIONAL",
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
CrawlerName = example1.Name,
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions = new[]
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = example2.Name,
State = "SUCCEEDED",
},
},
},
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Name: pulumi.String("example"),
Type: pulumi.String("CONDITIONAL"),
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
CrawlerName: pulumi.Any(example1.Name),
},
},
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
JobName: pulumi.Any(example2.Name),
State: pulumi.String("SUCCEEDED"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 Trigger("example", TriggerArgs.builder()
.name("example")
.type("CONDITIONAL")
.actions(TriggerActionArgs.builder()
.crawlerName(example1.name())
.build())
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName(example2.name())
.state("SUCCEEDED")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
name: example
type: CONDITIONAL
actions:
- crawlerName: ${example1.name}
predicate:
conditions:
- jobName: ${example2.name}
state: SUCCEEDED

Conditional Trigger with Crawler Condition

Note: Triggers can have both a crawler action and a crawler condition, just no example provided.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
name: "example",
type: "CONDITIONAL",
actions: [{
jobName: example1.name,
}],
predicate: {
conditions: [{
crawlerName: example2.name,
crawlState: "SUCCEEDED",
}],
},
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
name="example",
type="CONDITIONAL",
actions=[{
"job_name": example1["name"],
}],
predicate={
"conditions": [{
"crawler_name": example2["name"],
"crawl_state": "SUCCEEDED",
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Trigger("example", new()
{
Name = "example",
Type = "CONDITIONAL",
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = example1.Name,
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions = new[]
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
CrawlerName = example2.Name,
CrawlState = "SUCCEEDED",
},
},
},
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Name: pulumi.String("example"),
Type: pulumi.String("CONDITIONAL"),
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(example1.Name),
},
},
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
CrawlerName: pulumi.Any(example2.Name),
CrawlState: pulumi.String("SUCCEEDED"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 Trigger("example", TriggerArgs.builder()
.name("example")
.type("CONDITIONAL")
.actions(TriggerActionArgs.builder()
.jobName(example1.name())
.build())
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.crawlerName(example2.name())
.crawlState("SUCCEEDED")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
name: example
type: CONDITIONAL
actions:
- jobName: ${example1.name}
predicate:
conditions:
- crawlerName: ${example2.name}
crawlState: SUCCEEDED

Import

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

$ pulumi import aws:glue/trigger:Trigger MyTrigger MyTrigger

Constructors

Link copied to clipboard
constructor(actions: Output<List<TriggerActionArgs>>? = null, description: Output<String>? = null, enabled: Output<Boolean>? = null, eventBatchingConditions: Output<List<TriggerEventBatchingConditionArgs>>? = null, name: Output<String>? = null, predicate: Output<TriggerPredicateArgs>? = null, schedule: Output<String>? = null, startOnCreation: Output<Boolean>? = null, tags: Output<Map<String, String>>? = null, type: Output<String>? = null, workflowName: Output<String>? = null)

Properties

Link copied to clipboard
val actions: Output<List<TriggerActionArgs>>? = null

List of actions initiated by this trigger when it fires. See Actions Below.

Link copied to clipboard
val description: Output<String>? = null

A description of the new trigger.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Start the trigger. Defaults to true.

Link copied to clipboard

Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition.

Link copied to clipboard
val name: Output<String>? = null

The name of the trigger.

Link copied to clipboard
val predicate: Output<TriggerPredicateArgs>? = null

A predicate to specify when the new trigger should fire. Required when trigger type is CONDITIONAL. See Predicate Below.

Link copied to clipboard
val schedule: Output<String>? = null

A cron expression used to specify the schedule. Time-Based Schedules for Jobs and Crawlers

Link copied to clipboard
val startOnCreation: Output<Boolean>? = null

Set to true to start SCHEDULED and CONDITIONAL triggers when created. True is not supported for ON_DEMAND triggers.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

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.

Link copied to clipboard
val type: Output<String>? = null

The type of trigger. Valid values are CONDITIONAL, EVENT, ON_DEMAND, and SCHEDULED.

Link copied to clipboard
val workflowName: Output<String>? = null

A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (ON_DEMAND or SCHEDULED type) and can contain multiple additional CONDITIONAL triggers.

Functions

Link copied to clipboard
open override fun toJava(): TriggerArgs