Skip to content
v2.278.0

ConditionalTriggerOptions Struct ​

Properties for configuring a Condition (Predicate) based Glue Trigger.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';

declare const action: glue.Action;
declare const condition: glue.Condition;
const conditionalTriggerOptions: glue.ConditionalTriggerOptions = {
  actions: [action],
  predicate: {
    conditions: [condition],
    logical: glue.PredicateLogical.AND,
  },

  // the properties below are optional
  description: 'description',
  name: 'name',
  startOnCreation: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

# action: glue.Action
# condition: glue.Condition

conditional_trigger_options = glue.ConditionalTriggerOptions(
    actions=[action],
    predicate=glue.Predicate(
        conditions=[condition],
        logical=glue.PredicateLogical.AND
    ),

    # the properties below are optional
    description="description",
    name="name",
    start_on_creation=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;

Action action;
Condition condition;

ConditionalTriggerOptions conditionalTriggerOptions = ConditionalTriggerOptions.builder()
        .actions(List.of(action))
        .predicate(Predicate.builder()
                .conditions(List.of(condition))
                .logical(PredicateLogical.AND)
                .build())

        // the properties below are optional
        .description("description")
        .name("name")
        .startOnCreation(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;

Action action;
Condition condition;

var conditionalTriggerOptions = new ConditionalTriggerOptions {
    Actions = new [] { action },
    Predicate = new Predicate {
        Conditions = new [] { condition },
        Logical = PredicateLogical.AND
    },

    // the properties below are optional
    Description = "description",
    Name = "name",
    StartOnCreation = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var action Action
var condition Condition

conditionalTriggerOptions := &ConditionalTriggerOptions{
	Actions: []Action{
		action,
	},
	Predicate: &Predicate{
		Conditions: []Condition{
			condition,
		},
		Logical: awscdk.Aws_glue.PredicateLogical_AND,
	},

	// the properties below are optional
	Description: jsii.String("description"),
	Name: jsii.String("name"),
	StartOnCreation: jsii.Boolean(false),
}

Properties ​

actionsAction[]actionstyping.List[Action]actionsList<Action>ActionsAction[]Actions*[]Action required #
The actions initiated by this trigger.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description for the trigger.

Default: no description

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
A name for the trigger.

Default: no name is provided

predicatePredicatepredicatePredicatepredicatePredicatePredicatePredicatePredicatePredicate required #
The predicate for the trigger.
startOnCreationoptionalbooleanstart_on_creationoptionalboolstartOnCreationoptionalBooleanStartOnCreationoptionalboolStartOnCreationoptional*bool = false #
Whether to start the trigger on creation or not.