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

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()
.type("CONDITIONAL")
.actions(TriggerActionArgs.builder()
.jobName(aws_glue_job.example1().name())
.build())
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName(aws_glue_job.example2().name())
.state("SUCCEEDED")
.build())
.build())
.build());
}
}

On-Demand Trigger

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()
.type("ON_DEMAND")
.actions(TriggerActionArgs.builder()
.jobName(aws_glue_job.example().name())
.build())
.build());
}
}

Scheduled Trigger

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()
.schedule("cron(15 12 * * ? *)")
.type("SCHEDULED")
.actions(TriggerActionArgs.builder()
.jobName(aws_glue_job.example().name())
.build())
.build());
}
}

Conditional Trigger with Crawler Action

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

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()
.type("CONDITIONAL")
.actions(TriggerActionArgs.builder()
.crawlerName(aws_glue_crawler.example1().name())
.build())
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.jobName(aws_glue_job.example2().name())
.state("SUCCEEDED")
.build())
.build())
.build());
}
}

Conditional Trigger with Crawler Condition

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

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()
.type("CONDITIONAL")
.actions(TriggerActionArgs.builder()
.jobName(aws_glue_job.example1().name())
.build())
.predicate(TriggerPredicateArgs.builder()
.conditions(TriggerPredicateConditionArgs.builder()
.crawlerName(aws_glue_crawler.example2().name())
.crawlState("SUCCEEDED")
.build())
.build())
.build());
}
}

Import

Glue Triggers can be imported using name, e.g.,

$ 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