Header menu logo FsCDK

CloudTrailBuilder Type

Constructors

Constructor Description

CloudTrailBuilder(name)

Full Usage: CloudTrailBuilder(name)

Parameters:
    name : string

Returns: CloudTrailBuilder
name : string
Returns: CloudTrailBuilder

Instance members

Instance member Description

cloudWatchLogsRetention retention

Full Usage: cloudWatchLogsRetention retention

Parameters:
    retention : RetentionDays - The retention period (default: ONE_MONTH).

Returns: CloudTrailConfig

Sets the CloudWatch Logs retention period for the trail.

retention : RetentionDays

The retention period (default: ONE_MONTH).

Returns: CloudTrailConfig

this.Combine

Full Usage: this.Combine

Parameters:
Returns: CloudTrailConfig
state1 : CloudTrailConfig
state2 : CloudTrailConfig
Returns: CloudTrailConfig

constructId id

Full Usage: constructId id

Parameters:
    id : string - The construct ID.

Returns: CloudTrailConfig

Sets the construct ID for the CloudTrail.

id : string

The construct ID.

Returns: CloudTrailConfig

this.Delay

Full Usage: this.Delay

Parameters:
Returns: CloudTrailConfig
Modifiers: inline
f : unit -> CloudTrailConfig
Returns: CloudTrailConfig

enableFileValidation enabled

Full Usage: enableFileValidation enabled

Parameters:
    enabled : bool - Whether to enable validation (default: true).

Returns: CloudTrailConfig

Sets whether to enable log file validation. **Security Best Practice:** Enabled by default for log integrity verification. This allows you to detect if log files were tampered with after delivery.

enabled : bool

Whether to enable validation (default: true).

Returns: CloudTrailConfig

this.For

Full Usage: this.For

Parameters:
Returns: CloudTrailConfig
Modifiers: inline
config : CloudTrailConfig
f : unit -> CloudTrailConfig
Returns: CloudTrailConfig

includeGlobalServiceEvents enabled

Full Usage: includeGlobalServiceEvents enabled

Parameters:
    enabled : bool - Whether to include global events (default: true).

Returns: CloudTrailConfig

Sets whether to include global service events (IAM, STS, CloudFront, etc.). **Security Best Practice:** Enabled by default to capture critical security events.

enabled : bool

Whether to include global events (default: true).

Returns: CloudTrailConfig

isMultiRegionTrail enabled

Full Usage: isMultiRegionTrail enabled

Parameters:
    enabled : bool - Whether to enable multi-region (default: true).

Returns: CloudTrailConfig

Sets whether this is a multi-region trail. **Security Best Practice:** Multi-region trails are enabled by default to capture events from all AWS regions.

enabled : bool

Whether to enable multi-region (default: true).

Returns: CloudTrailConfig

isOrganizationTrail enabled

Full Usage: isOrganizationTrail enabled

Parameters:
    enabled : bool - Whether this is an organization trail.

Returns: CloudTrailConfig

Sets whether this is an organization trail (requires AWS Organizations). Organization trails log events for all accounts in the organization.

enabled : bool

Whether this is an organization trail.

Returns: CloudTrailConfig

managementEvents readWriteType

Full Usage: managementEvents readWriteType

Parameters:
    readWriteType : ReadWriteType - The type of events to log (default: ReadWriteType.ALL).

Returns: CloudTrailConfig

Sets the management event logging type.

readWriteType : ReadWriteType

The type of events to log (default: ReadWriteType.ALL).

Returns: CloudTrailConfig

this.Run

Full Usage: this.Run

Parameters:
Returns: CloudTrailSpec
config : CloudTrailConfig
Returns: CloudTrailSpec

s3Bucket bucket

Full Usage: s3Bucket bucket

Parameters:
    bucket : IBucket - The S3 bucket interface.

Returns: CloudTrailConfig

Sets a custom S3 bucket for CloudTrail logs. If not specified, CDK will create a bucket with appropriate security settings.

bucket : IBucket

The S3 bucket interface.

Returns: CloudTrailConfig

sendToCloudWatchLogs enabled

Full Usage: sendToCloudWatchLogs enabled

Parameters:
    enabled : bool - Whether to send to CloudWatch (default: true).

Returns: CloudTrailConfig

Sets whether to send trail logs to CloudWatch Logs. **Note:** CloudWatch Logs integration enables real-time monitoring but adds cost.

enabled : bool

Whether to send to CloudWatch (default: true).

Returns: CloudTrailConfig

this.Yield

Full Usage: this.Yield

Parameters:
    () : unit

Returns: CloudTrailConfig
() : unit
Returns: CloudTrailConfig

this.Zero

Full Usage: this.Zero

Returns: CloudTrailConfig
Returns: CloudTrailConfig

Type something to start searching.