Skip to content
v2.274.0

AWSEventMetadataProps Struct ​

Properties for AWS EventBridge event metadata.

Example ​

ts
import { BucketEvents } from '@aws-cdk/mixins-preview/aws-s3/events';
import * as events from 'aws-cdk-lib/aws-events';

const bucketEvents = BucketEvents.fromBucket(bucket);

const pattern = bucketEvents.objectCreatedPattern({
  eventMetadata: {
    region: events.Match.prefix('us-'),
    version: ['0']
  }
});

Properties ​

regionoptionalstring[]regionoptionaltyping.List[str]regionoptionalList<String>Regionoptionalstring[]Regionoptional*[]*string#
Identifies the AWS region where the event originated.

Default: No filtering on region

resourcesoptionalstring[]resourcesoptionaltyping.List[str]resourcesoptionalList<String>Resourcesoptionalstring[]Resourcesoptional*[]*string#
This JSON array contains ARNs that identify resources that are involved in the event.

Default: No filtering on resource

notes

Inclusion of these ARNs is at the discretion of the service.

For example, Amazon EC2 instance state-changes include Amazon EC2 instance ARNs, Auto Scaling events include ARNs for both instances and Auto Scaling groups, but API calls with AWS CloudTrail do not include resource ARNs.

versionoptionalstring[]versionoptionaltyping.List[str]versionoptionalList<String>Versionoptionalstring[]Versionoptional*[]*string#
By default, this is set to 0 (zero) in all events.

Default: No filtering on version