# EventCommonOptions

Common options for Events.

- Source: [`aws-events/lib/on-event-options.ts`](https://github.com/aws/aws-cdk/blob/v2.273.0/packages/aws-cdk-lib/aws-events/lib/on-event-options.ts#L8)
- Type last changed: v2.38.0 · 17 Aug 2022

## Example

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

declare const construct: constructs.Construct;
declare const detail: any;
const eventCommonOptions: events.EventCommonOptions = {
  crossStackScope: construct,
  description: 'description',
  eventPattern: {
    account: ['account'],
    detail: {
      detailKey: detail,
    },
    detailType: ['detailType'],
    id: ['id'],
    region: ['region'],
    resources: ['resources'],
    source: ['source'],
    time: ['time'],
    version: ['version'],
  },
  ruleName: 'ruleName',
};
```

## Properties

- `crossStackScope`: [Construct](/cdk/api/v2/docs/constructs.Construct.html) = none (the main scope will be used, even for cross-stack Events) — The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region).

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

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

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

- `eventPattern`: [EventPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventPattern.html) = No additional filtering based on an event pattern. — Additional restrictions for the event to route to the specified target.

  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:** No additional filtering based on an event pattern.

- `ruleName`: string = AWS CloudFormation generates a unique physical ID. — A name for the rule.

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