Show / Hide Table of Contents

Class LogStream

Define a Log Stream in a Log Group.

Inheritance
object
Resource
LogStream
Implements
ILogStream
IResource
ILogStreamRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyCrossStackReferenceStrength(ReferenceStrength)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.With(params IMixin[])
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LogStream : Resource, ILogStream, IResource, ILogStreamRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class LogStream Inherits Resource Implements ILogStream, IResource, ILogStreamRef, IConstruct, IDependable, IEnvironmentAware
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;
            using Amazon.CDK.Interfaces.Logs;

            ILogGroupRef logGroupRef;

            var logStream = new LogStream(this, "MyLogStream", new LogStreamProps {
                LogGroup = logGroupRef,

                // 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.

LogStreamRef

A reference to a LogStream resource.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Methods

FromLogStreamAttributes(Construct, string, ILogStreamAttributes)

Import an existing LogStream using its attributes.

FromLogStreamName(Construct, string, string)

Import an existing LogStream.

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;
            using Amazon.CDK.Interfaces.Logs;

            ILogGroupRef logGroupRef;

            var logStream = new LogStream(this, "MyLogStream", new LogStreamProps {
                LogGroup = logGroupRef,

                // 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

string

Remarks

ExampleMetadata: fixture=_generated

LogStreamRef

A reference to a LogStream resource.

public virtual ILogStreamReference LogStreamRef { get; }
Property Value

ILogStreamReference

Remarks

ExampleMetadata: fixture=_generated

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

Methods

FromLogStreamAttributes(Construct, string, ILogStreamAttributes)

Import an existing LogStream using its attributes.

public static ILogStream FromLogStreamAttributes(Construct scope, string id, ILogStreamAttributes attrs)
Parameters
scope Construct
id string
attrs ILogStreamAttributes
Returns

ILogStream

Remarks

ExampleMetadata: fixture=_generated

FromLogStreamName(Construct, string, string)

Import an existing LogStream.

public static ILogStream FromLogStreamName(Construct scope, string id, string logStreamName)
Parameters
scope Construct
id string
logStreamName string
Returns

ILogStream

Remarks

ExampleMetadata: fixture=_generated

Implements

ILogStream
IResource
ILogStreamRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX