| Modifier and Type | Method and Description |
|---|---|
LogGroup |
build() |
static LogGroup.Builder |
create(software.constructs.Construct scope,
String id) |
LogGroup.Builder |
encryptionKey(IKey encryptionKey)
The KMS customer managed key to encrypt the log group with.
|
LogGroup.Builder |
logGroupName(String logGroupName)
Name of the log group.
|
LogGroup.Builder |
removalPolicy(RemovalPolicy removalPolicy)
Determine the removal policy of this log group.
|
LogGroup.Builder |
retention(RetentionDays retention)
How long, in days, the log contents will be retained.
|
@Stability(value=Stable) public static LogGroup.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.LogGroup.Builder.@Stability(value=Stable) public LogGroup.Builder encryptionKey(IKey encryptionKey)
Default: Server-side encrpytion managed by the CloudWatch Logs service
encryptionKey - The KMS customer managed key to encrypt the log group with. This parameter is required.this@Stability(value=Stable) public LogGroup.Builder logGroupName(String logGroupName)
Default: Automatically generated
logGroupName - Name of the log group. This parameter is required.this@Stability(value=Stable) public LogGroup.Builder removalPolicy(RemovalPolicy removalPolicy)
Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs.
Default: RemovalPolicy.Retain
removalPolicy - Determine the removal policy of this log group. This parameter is required.this@Stability(value=Stable) public LogGroup.Builder retention(RetentionDays retention)
To retain all logs, set this value to RetentionDays.INFINITE.
Default: RetentionDays.TWO_YEARS
retention - How long, in days, the log contents will be retained. This parameter is required.thisCopyright © 2022. All rights reserved.