class LogStream (construct)
Define a Log Stream in a Log Group.
new LogStream(scope: Construct, id: string, props: LogStreamProps)
|log||The log group to create a log stream for.|
|log||The name of the log stream to create.|
|removal||Determine what happens when the log stream resource is removed from the app.|
The log group to create a log stream for.
(optional, default: Automatically generated)
The name of the log stream to create.
The name must be unique within the log group.
(optional, default: RemovalPolicy.Retain)
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.
|env||The environment this resource belongs to.|
|log||The name of this log stream.|
|node||The construct tree node associated with this construct.|
|stack||The stack in which this resource is defined.|
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
The name of this log stream.
The construct tree node associated with this construct.
The stack in which this resource is defined.
|to||Returns a string representation of this construct.|
|static from||Import an existing LogGroup.|
public toString(): string
Returns a string representation of this construct.
Log Stream Name(scope, id, logStreamName)
public static fromLogStreamName(scope: Construct, id: string, logStreamName: string): ILogStream
Import an existing LogGroup.