Class LogStream
Define a Log Stream in a Log Group.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LogStream : Resource, ILogStream, IResource, IConstruct, IDependable
Syntax (vb)
Public Class LogStream Inherits Resource Implements ILogStream, IResource, IConstruct, IDependable
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 logStream = new LogStream(this, "MyLogStream", new LogStreamProps {
LogGroup = logGroup,
// the properties below are optional
LogStreamName = "logStreamName",
RemovalPolicy = RemovalPolicy.DESTROY
});
Synopsis
Constructors
LogStream(Construct, string, ILogStreamProps) | Define a Log Stream in a Log Group. |
Properties
LogStreamName | The name of this log stream. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
FromLogStreamName(Construct, string, string) | Import an existing LogGroup. |
Constructors
LogStream(Construct, string, ILogStreamProps)
Define a Log Stream in a Log Group.
public LogStream(Construct scope, string id, ILogStreamProps props)
Parameters
- scope Construct
- id string
- props 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 logStream = new LogStream(this, "MyLogStream", new LogStreamProps {
LogGroup = logGroup,
// the properties below are optional
LogStreamName = "logStreamName",
RemovalPolicy = RemovalPolicy.DESTROY
});
Properties
LogStreamName
The name of this log stream.
public virtual string LogStreamName { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
Methods
FromLogStreamName(Construct, string, string)
Import an existing LogGroup.
public static ILogStream FromLogStreamName(Construct scope, string id, string logStreamName)
Parameters
Returns
Remarks
ExampleMetadata: fixture=_generated
Implements
Constructs.IConstruct
Constructs.IDependable