Class Trigger
Manages a Glue Trigger resource.
Example Usage
Conditional Trigger
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Glue.Trigger("example", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = aws_glue_job.Example1.Name,
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions =
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = aws_glue_job.Example2.Name,
State = "SUCCEEDED",
},
},
},
Type = "CONDITIONAL",
});
}
}
On-Demand Trigger
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Glue.Trigger("example", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = aws_glue_job.Example.Name,
},
},
Type = "ON_DEMAND",
});
}
}
Scheduled Trigger
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Glue.Trigger("example", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = aws_glue_job.Example.Name,
},
},
Schedule = "cron(15 12 * * ? *)",
Type = "SCHEDULED",
});
}
}
Conditional Trigger with Crawler Action
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Glue.Trigger("example", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
CrawlerName = aws_glue_crawler.Example1.Name,
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions =
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
JobName = aws_glue_job.Example2.Name,
State = "SUCCEEDED",
},
},
},
Type = "CONDITIONAL",
});
}
}
Conditional Trigger with Crawler Condition
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Glue.Trigger("example", new Aws.Glue.TriggerArgs
{
Actions =
{
new Aws.Glue.Inputs.TriggerActionArgs
{
JobName = aws_glue_job.Example1.Name,
},
},
Predicate = new Aws.Glue.Inputs.TriggerPredicateArgs
{
Conditions =
{
new Aws.Glue.Inputs.TriggerPredicateConditionArgs
{
CrawlState = "SUCCEEDED",
CrawlerName = aws_glue_crawler.Example2.Name,
},
},
},
Type = "CONDITIONAL",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Glue
Assembly: Pulumi.Aws.dll
Syntax
public class Trigger : CustomResource
Constructors
View SourceTrigger(String, TriggerArgs, CustomResourceOptions)
Create a Trigger resource with the given unique name, arguments, and options.
Declaration
public Trigger(string name, TriggerArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TriggerArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceActions
List of actions initiated by this trigger when it fires. Defined below.
Declaration
public Output<ImmutableArray<TriggerAction>> Actions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<TriggerAction>> |
Arn
Amazon Resource Name (ARN) of Glue Trigger
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
A description of the new trigger.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
Start the trigger. Defaults to true. Not valid to disable for ON_DEMAND type.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
The name of the trigger.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Predicate
A predicate to specify when the new trigger should fire. Required when trigger type is CONDITIONAL. Defined below.
Declaration
public Output<TriggerPredicate> Predicate { get; }
Property Value
| Type | Description |
|---|---|
| Output<TriggerPredicate> |
Schedule
A cron expression used to specify the schedule. Time-Based Schedules for Jobs and Crawlers
Declaration
public Output<string> Schedule { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
Key-value map of resource tags
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Type
The type of trigger. Valid values are CONDITIONAL, ON_DEMAND, and SCHEDULED.
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
WorkflowName
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.
Declaration
public Output<string> WorkflowName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, TriggerState, CustomResourceOptions)
Get an existing Trigger resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Trigger Get(string name, Input<string> id, TriggerState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| TriggerState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Trigger |