# RuleProps

Properties for defining an EventBridge Rule.

Extends: RuleProps
Extends: EventCommonOptions
Used as props by: Rule

- Source: [`aws-events/lib/rule.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-events/lib/rule.ts#L25)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
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

- `crossStackScope`: [Construct](/cdk/api/v2/docs/constructs.Construct.html) — The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region).

  **Default:** none (the main scope will be used, even for cross-stack Events)

  This helps dealing with cycles that often arise in these situations.

- `description`: string — A description of the rule's purpose.

  **Default:** No description

- `enabled`: boolean = true — Indicates whether the rule is enabled.

- `eventBus`: [IEventBusRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_events.IEventBusRef.html) — The event bus to associate with this rule.

  **Default:** The default event bus.

- `eventPattern`: [EventPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventPattern.html) — Additional restrictions for the event to route to the specified target.

  **Default:** No additional filtering based on an event pattern.

  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.

- `role`: [IRoleRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) — The role that is used for target invocation.

  **Default:** No role associated

  Must be assumable by principal `events.amazonaws.com`.

- `ruleName`: string — A name for the rule.

  **Default:** AWS CloudFormation generates a unique physical ID.

- `schedule`: [Schedule](/cdk/api/v2/docs/aws-cdk-lib.aws_events.Schedule.html) = None. — The schedule or rate (frequency) that determines when EventBridge runs the rule.

  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.

- `targets`: [IRuleTarget](/cdk/api/v2/docs/aws-cdk-lib.aws_events.IRuleTarget.html)[] — Targets to invoke when this rule matches an event.

  **Default:** No targets.

  Input will be the full matched event. If you wish to specify custom
  target input, use `addTarget(target[, inputOptions])`.
