| Modifier and Type | Method and Description |
|---|---|
LogGroup |
build() |
static LogGroup.Builder |
create(software.constructs.Construct scope,
String id) |
LogGroup.Builder |
encryptionKey(IKey encryptionKey)
(experimental) The KMS Key to encrypt the log group with.
|
LogGroup.Builder |
logGroupName(String logGroupName)
(experimental) Name of the log group.
|
LogGroup.Builder |
removalPolicy(RemovalPolicy removalPolicy)
(experimental) Determine the removal policy of this log group.
|
LogGroup.Builder |
retention(RetentionDays retention)
(experimental) How long, in days, the log contents will be retained.
|
@Stability(value=Experimental) 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=Experimental) public LogGroup.Builder encryptionKey(IKey encryptionKey)
Default: - log group is encrypted with the default master key
encryptionKey - The KMS Key to encrypt the log group with. This parameter is required.this@Stability(value=Experimental) public LogGroup.Builder logGroupName(String logGroupName)
Default: Automatically generated
logGroupName - Name of the log group. This parameter is required.this@Stability(value=Experimental) 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=Experimental) 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 © 2021. All rights reserved.