interface AddEventSelectorOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudTrail.AddEventSelectorOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudtrail#AddEventSelectorOptions |
![]() | software.amazon.awscdk.services.cloudtrail.AddEventSelectorOptions |
![]() | aws_cdk.aws_cloudtrail.AddEventSelectorOptions |
![]() | aws-cdk-lib » aws_cloudtrail » AddEventSelectorOptions |
Options for adding an event selector.
Example
import * as cloudtrail from 'aws-cdk-lib/aws-cloudtrail';
declare const sourceBucket: s3.Bucket;
const sourceOutput = new codepipeline.Artifact();
const key = 'some/key.zip';
const trail = new cloudtrail.Trail(this, 'CloudTrail');
trail.addS3EventSelector([{
bucket: sourceBucket,
objectPrefix: key,
}], {
readWriteType: cloudtrail.ReadWriteType.WRITE_ONLY,
});
const sourceAction = new codepipeline_actions.S3SourceAction({
actionName: 'S3Source',
bucketKey: key,
bucket: sourceBucket,
output: sourceOutput,
trigger: codepipeline_actions.S3Trigger.EVENTS, // default: S3Trigger.POLL
});
Properties
Name | Type | Description |
---|---|---|
exclude | Management [] | An optional list of service event sources from which you do not want management events to be logged on your trail. |
include | boolean | Specifies whether the event selector includes management events for the trail. |
read | Read | Specifies whether to log read-only events, write-only events, or all events. |
excludeManagementEventSources?
Type:
Management
[]
(optional, default: [])
An optional list of service event sources from which you do not want management events to be logged on your trail.
includeManagementEvents?
Type:
boolean
(optional, default: true)
Specifies whether the event selector includes management events for the trail.
readWriteType?
Type:
Read
(optional, default: ReadWriteType.All)
Specifies whether to log read-only events, write-only events, or all events.