Interface ILogStreamProps
Properties for a LogStream.
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILogStreamProps
Syntax (vb)
Public Interface ILogStreamProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Logs;
LogGroup logGroup;
var logStreamProps = new LogStreamProps {
LogGroup = logGroup,
// the properties below are optional
LogStreamName = "logStreamName",
RemovalPolicy = RemovalPolicy.DESTROY
};
Synopsis
Properties
LogGroup | The log group to create a log stream for. |
LogStreamName | The name of the log stream to create. |
RemovalPolicy | Determine what happens when the log stream resource is removed from the app. |
Properties
LogGroup
LogStreamName
The name of the log stream to create.
virtual string LogStreamName { get; }
Property Value
System.String
Remarks
The name must be unique within the log group.
Default: Automatically generated
RemovalPolicy
Determine what happens when the log stream resource is removed from the app.
virtual Nullable<RemovalPolicy> RemovalPolicy { get; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
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