Trigger class
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", {
predicate: {
conditions: [{
jobName: example2.name,
state: "SUCCEEDED",
}],
},
actions: [{
jobName: example1.name,
}],
name: "example",
type: "CONDITIONAL",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
predicate={
"conditions": [{
"job_name": example2["name"],
"state": "SUCCEEDED",
}],
},
actions=[{
"job_name": example1["name"],
}],
name="example",
type="CONDITIONAL")
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()
{
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions = new[]
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = example2.Name,
State = "SUCCEEDED",
},
},
},
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = example1.Name,
},
},
Name = "example",
Type = "CONDITIONAL",
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
JobName: pulumi.Any(example2.Name),
State: pulumi.String("SUCCEEDED"),
},
},
},
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(example1.Name),
},
},
Name: pulumi.String("example"),
Type: pulumi.String("CONDITIONAL"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_trigger" "example" {
predicate = {
conditions = [{
"jobName" = example2.name
"state" = "SUCCEEDED"
}]
}
actions {
job_name = example1.name
}
name = "example"
type = "CONDITIONAL"
}
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.TriggerPredicateArgs;
import com.pulumi.aws.glue.inputs.TriggerPredicateConditionArgs;
import com.pulumi.aws.glue.inputs.TriggerActionArgs;
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 Trigger("example", TriggerArgs.builder()
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName(example2.name())
.state("SUCCEEDED")
.build())
.build())
.actions(TriggerActionArgs.builder()
.jobName(example1.name())
.build())
.name("example")
.type("CONDITIONAL")
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
predicate:
conditions:
- jobName: ${example2.name}
state: SUCCEEDED
actions:
- jobName: ${example1.name}
name: example
type: CONDITIONAL
On-Demand Trigger
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
actions: [{
jobName: exampleAwsGlueJob.name,
}],
name: "example",
type: "ON_DEMAND",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
actions=[{
"job_name": example_aws_glue_job["name"],
}],
name="example",
type="ON_DEMAND")
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()
{
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = exampleAwsGlueJob.Name,
},
},
Name = "example",
Type = "ON_DEMAND",
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(exampleAwsGlueJob.Name),
},
},
Name: pulumi.String("example"),
Type: pulumi.String("ON_DEMAND"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_trigger" "example" {
actions {
job_name = exampleAwsGlueJob.name
}
name = "example"
type = "ON_DEMAND"
}
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.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 Trigger("example", TriggerArgs.builder()
.actions(TriggerActionArgs.builder()
.jobName(exampleAwsGlueJob.name())
.build())
.name("example")
.type("ON_DEMAND")
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
actions:
- jobName: ${exampleAwsGlueJob.name}
name: example
type: ON_DEMAND
Scheduled Trigger
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Trigger("example", {
actions: [{
jobName: exampleAwsGlueJob.name,
}],
name: "example",
schedule: "cron(15 12 * * ? *)",
type: "SCHEDULED",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
actions=[{
"job_name": example_aws_glue_job["name"],
}],
name="example",
schedule="cron(15 12 * * ? *)",
type="SCHEDULED")
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()
{
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = exampleAwsGlueJob.Name,
},
},
Name = "example",
Schedule = "cron(15 12 * * ? *)",
Type = "SCHEDULED",
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(exampleAwsGlueJob.Name),
},
},
Name: pulumi.String("example"),
Schedule: pulumi.String("cron(15 12 * * ? *)"),
Type: pulumi.String("SCHEDULED"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_trigger" "example" {
actions {
job_name = exampleAwsGlueJob.name
}
name = "example"
schedule = "cron(15 12 * * ? *)"
type = "SCHEDULED"
}
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.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 Trigger("example", TriggerArgs.builder()
.actions(TriggerActionArgs.builder()
.jobName(exampleAwsGlueJob.name())
.build())
.name("example")
.schedule("cron(15 12 * * ? *)")
.type("SCHEDULED")
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
actions:
- jobName: ${exampleAwsGlueJob.name}
name: example
schedule: cron(15 12 * * ? *)
type: SCHEDULED
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", {
predicate: {
conditions: [{
jobName: example2.name,
state: "SUCCEEDED",
}],
},
actions: [{
crawlerName: example1.name,
}],
name: "example",
type: "CONDITIONAL",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
predicate={
"conditions": [{
"job_name": example2["name"],
"state": "SUCCEEDED",
}],
},
actions=[{
"crawler_name": example1["name"],
}],
name="example",
type="CONDITIONAL")
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()
{
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions = new[]
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = example2.Name,
State = "SUCCEEDED",
},
},
},
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
CrawlerName = example1.Name,
},
},
Name = "example",
Type = "CONDITIONAL",
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
JobName: pulumi.Any(example2.Name),
State: pulumi.String("SUCCEEDED"),
},
},
},
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
CrawlerName: pulumi.Any(example1.Name),
},
},
Name: pulumi.String("example"),
Type: pulumi.String("CONDITIONAL"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_trigger" "example" {
predicate = {
conditions = [{
"jobName" = example2.name
"state" = "SUCCEEDED"
}]
}
actions {
crawler_name = example1.name
}
name = "example"
type = "CONDITIONAL"
}
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.TriggerPredicateArgs;
import com.pulumi.aws.glue.inputs.TriggerPredicateConditionArgs;
import com.pulumi.aws.glue.inputs.TriggerActionArgs;
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 Trigger("example", TriggerArgs.builder()
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName(example2.name())
.state("SUCCEEDED")
.build())
.build())
.actions(TriggerActionArgs.builder()
.crawlerName(example1.name())
.build())
.name("example")
.type("CONDITIONAL")
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
predicate:
conditions:
- jobName: ${example2.name}
state: SUCCEEDED
actions:
- crawlerName: ${example1.name}
name: example
type: CONDITIONAL
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", {
predicate: {
conditions: [{
crawlerName: example2.name,
crawlState: "SUCCEEDED",
}],
},
actions: [{
jobName: example1.name,
}],
name: "example",
type: "CONDITIONAL",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Trigger("example",
predicate={
"conditions": [{
"crawler_name": example2["name"],
"crawl_state": "SUCCEEDED",
}],
},
actions=[{
"job_name": example1["name"],
}],
name="example",
type="CONDITIONAL")
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()
{
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions = new[]
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
CrawlerName = example2.Name,
CrawlState = "SUCCEEDED",
},
},
},
Actions = new[]
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = example1.Name,
},
},
Name = "example",
Type = "CONDITIONAL",
});
});
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 {
_, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{
Predicate: &glue.TriggerPredicateArgs{
Conditions: glue.TriggerPredicateConditionArray{
&glue.TriggerPredicateConditionArgs{
CrawlerName: pulumi.Any(example2.Name),
CrawlState: pulumi.String("SUCCEEDED"),
},
},
},
Actions: glue.TriggerActionArray{
&glue.TriggerActionArgs{
JobName: pulumi.Any(example1.Name),
},
},
Name: pulumi.String("example"),
Type: pulumi.String("CONDITIONAL"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_trigger" "example" {
predicate = {
conditions = [{
"crawlerName" = example2.name
"crawlState" = "SUCCEEDED"
}]
}
actions {
job_name = example1.name
}
name = "example"
type = "CONDITIONAL"
}
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.TriggerPredicateArgs;
import com.pulumi.aws.glue.inputs.TriggerPredicateConditionArgs;
import com.pulumi.aws.glue.inputs.TriggerActionArgs;
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 Trigger("example", TriggerArgs.builder()
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.crawlerName(example2.name())
.crawlState("SUCCEEDED")
.build())
.build())
.actions(TriggerActionArgs.builder()
.jobName(example1.name())
.build())
.name("example")
.type("CONDITIONAL")
.build());
}
}
resources:
example:
type: aws:glue:Trigger
properties:
predicate:
conditions:
- crawlerName: ${example2.name}
crawlState: SUCCEEDED
actions:
- jobName: ${example1.name}
name: example
type: CONDITIONAL
Import
Using pulumi import, import Glue Triggers using name. For example:
$ pulumi import aws:glue/trigger:Trigger MyTrigger MyTrigger
Constructors
- Trigger(String name, {TriggerArgs? args, CustomResourceOptions? options})
-
Creates a new Trigger.
nameThe Pulumi resource name.argsArguments used to configure this Trigger. The set of arguments for Trigger.optionsResource options controlling this resource's behavior. - Trigger.reference(String urn)
- Creates a typed reference to an existing Trigger resource.
Properties
-
actions
↔ Output<
List< TriggerAction> > -
List of actions initiated by this trigger when it fires. See Actions Below.
latefinal
-
arn
↔ Output<
String> -
ARN of Glue Trigger
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
description
↔ Output<
String?> -
A description of the new trigger.
latefinal
-
enabled
↔ Output<
bool?> -
Start the trigger. Defaults to
true.latefinal -
eventBatchingConditions
↔ Output<
List< TriggerEventBatchingCondition> ?> -
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.
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
-
name
↔ Output<
String> -
The name of the trigger.
latefinal
-
predicate
↔ Output<
TriggerPredicate?> -
A predicate to specify when the new trigger should fire. Required when trigger type is
CONDITIONAL. See Predicate Below.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
-
schedule
↔ Output<
String?> -
A cron expression used to specify the schedule. Time-Based Schedules for Jobs and Crawlers
latefinal
-
startOnCreation
↔ Output<
bool?> -
Set to true to start
SCHEDULEDandCONDITIONALtriggers when created. True is not supported forON_DEMANDtriggers.latefinal -
state
↔ Output<
String> -
The current state of the trigger.
latefinal
-
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
-
type
↔ Output<
String> -
The type of trigger. Valid values are
CONDITIONAL,EVENT,ON_DEMAND, andSCHEDULED.latefinal -
urn
↔ Output<
String> -
latefinalinherited
-
workflowName
↔ Output<
String?> -
A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (
ON_DEMANDorSCHEDULEDtype) and can contain multiple additionalCONDITIONALtriggers.latefinal
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