RuleProps Struct
Properties for defining an EventBridge Rule.
Example
import * as redshiftserverless from 'aws-cdk-lib/aws-redshiftserverless'
declare const workgroup: redshiftserverless.CfnWorkgroup;
const rule = new events.Rule(this, 'Rule', {
schedule: events.Schedule.rate(cdk.Duration.hours(1)),
});
const dlq = new sqs.Queue(this, 'DeadLetterQueue');
rule.addTarget(new targets.RedshiftQuery(workgroup.attrWorkgroupWorkgroupArn, {
database: 'dev',
deadLetterQueue: dlq,
sql: ['SELECT * FROM foo','SELECT * FROM baz'],
}));
Properties
crossStackScopeConstructcross_stack_scopeConstructcrossStackScopeConstructCrossStackScopeConstructCrossStackScopeConstruct= none (the main scope will be use…#This helps dealing with cycles that often arise in these situations.
default
Default: none (the main scope will be used, even for cross-stack Events)
descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= No description#eventBusIEventBusRefevent_busIEventBusRefeventBusIEventBusRefEventBusIEventBusRefEventBusIEventBusRef= The default event bus.#eventPatternEventPatternevent_patternEventPatterneventPatternEventPatternEventPatternEventPatternEventPatternEventPattern= No additional filtering based on…#The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering.
default
Default: No additional filtering based on an event pattern.
Must be assumable by principal events.amazonaws.com.
ruleNamestringrule_namestrruleNameStringRuleNamestringRuleName*string= AWS CloudFormation generates a u…#default
Default: AWS CloudFormation generates a unique physical ID.
You must specify this property, the eventPattern property, or both.
For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide.
targetsIRuleTarget[]targetstyping.List[IRuleTarget]targetsList<IRuleTarget>TargetsIRuleTarget[]Targets*[]IRuleTarget= No targets.#Input will be the full matched event. If you wish to specify custom target input, use addTarget(target[, inputOptions]).