LogStreamProps

class aws_cdk.aws_logs.LogStreamProps(*, log_group, log_stream_name=None, removal_policy=None)

Bases: object

__init__(*, log_group, log_stream_name=None, removal_policy=None)

Properties for a LogStream.

Parameters
  • log_group (ILogGroup) – The log group to create a log stream for.

  • log_stream_name (Optional[str]) – The name of the log stream to create. The name must be unique within the log group. Default: Automatically generated

  • removal_policy (Optional[RemovalPolicy]) – Determine what happens when the log stream resource is removed from the app. Normally you want to retain the log stream so you can diagnose issues from logs even after a deployment that no longer includes the log stream. The date-based retention policy of your log group will age out the logs after a certain time. Default: RemovalPolicy.Retain

Attributes

log_group

The log group to create a log stream for.

Return type

ILogGroup

log_stream_name

The name of the log stream to create.

The name must be unique within the log group.

default :default: Automatically generated

Return type

Optional[str]

removal_policy

Determine what happens when the log stream resource is removed from the app.

Normally you want to retain the log stream so you can diagnose issues from logs even after a deployment that no longer includes the log stream.

The date-based retention policy of your log group will age out the logs after a certain time.

default :default: RemovalPolicy.Retain

Return type

Optional[RemovalPolicy]