Interface LogGroupProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LogGroupProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:10.121Z")
@Stability(Stable)
public interface LogGroupProps
extends software.amazon.jsii.JsiiSerializable
Properties for a LogGroup.
Example:
import software.amazon.awscdk.services.kinesisfirehose.alpha.*;
import software.amazon.awscdk.services.kinesisfirehose.destinations.alpha.*;
LogGroup logGroupDestination = LogGroup.Builder.create(this, "LogGroupLambdaAudit")
.logGroupName("auditDestinationForCDK")
.build();
Bucket bucket = new Bucket(this, "audit-bucket");
S3Bucket s3Destination = new S3Bucket(bucket);
DeliveryStream deliveryStream = DeliveryStream.Builder.create(this, "Delivery Stream")
.destinations(List.of(s3Destination))
.build();
DataProtectionPolicy dataProtectionPolicy = DataProtectionPolicy.Builder.create()
.name("data protection policy")
.description("policy description")
.identifiers(List.of(DataIdentifier.DRIVERSLICENSE_US, new DataIdentifier("EmailAddress")))
.logGroupAuditDestination(logGroupDestination)
.s3BucketAuditDestination(bucket)
.deliveryStreamNameAuditDestination(deliveryStream.getDeliveryStreamName())
.build();
LogGroup.Builder.create(this, "LogGroupLambda")
.logGroupName("cdkIntegLogGroup")
.dataProtectionPolicy(dataProtectionPolicy)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLogGroupPropsstatic final classAn implementation forLogGroupProps -
Method Summary
Modifier and TypeMethodDescriptionstatic LogGroupProps.Builderbuilder()default DataProtectionPolicyData Protection Policy for this log group.default IKeyThe KMS customer managed key to encrypt the log group with.default StringName of the log group.default RemovalPolicyDetermine the removal policy of this log group.default RetentionDaysHow long, in days, the log contents will be retained.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDataProtectionPolicy
Data Protection Policy for this log group.Default: - no data protection policy
-
getEncryptionKey
The KMS customer managed key to encrypt the log group with.Default: Server-side encrpytion managed by the CloudWatch Logs service
-
getLogGroupName
Name of the log group.Default: Automatically generated
-
getRemovalPolicy
Determine the removal policy of this log group.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
-
getRetention
How long, in days, the log contents will be retained.To retain all logs, set this value to RetentionDays.INFINITE.
Default: RetentionDays.TWO_YEARS
-
builder
- Returns:
- a
LogGroupProps.BuilderofLogGroupProps
-