LogGroupProps¶
-
class
aws_cdk.aws_logs.
LogGroupProps
(*, encryption_key=None, log_group_name=None, removal_policy=None, retention=None)¶ Bases:
object
Properties for a LogGroup.
- Parameters
encryption_key (
Optional
[IKey
]) – The KMS Key to encrypt the log group with. Default: - log group is encrypted with the default master keylog_group_name (
Optional
[str
]) – Name of the log group. Default: Automatically generatedremoval_policy (
Optional
[RemovalPolicy
]) – 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.Retainretention (
Optional
[RetentionDays
]) – How long, in days, the log contents will be retained. To retain all logs, set this value to RetentionDays.INFINITE. Default: RetentionDays.TWO_YEARS
Attributes
-
encryption_key
¶ The KMS Key to encrypt the log group with.
- Default
log group is encrypted with the default master key
- Return type
Optional
[IKey
]
-
log_group_name
¶ Name of the log group.
- Default
Automatically generated
- Return type
Optional
[str
]
-
removal_policy
¶ 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
- Return type
Optional
[RemovalPolicy
]
-
retention
¶ How long, in days, the log contents will be retained.
To retain all logs, set this value to RetentionDays.INFINITE.
- Default
RetentionDays.TWO_YEARS
- Return type
Optional
[RetentionDays
]