Class CfnLogStream

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:12.499Z") @Stability(Stable) public class CfnLogStream extends CfnResource implements IInspectable
The AWS::Logs::LogStream resource specifies an Amazon CloudWatch Logs log stream in a specific log group.

A log stream represents the sequence of events coming from an application instance or resource that you are monitoring.

There is no limit on the number of log streams that you can create for a log group.

You must use the following guidelines when naming a log stream:

  • Log stream names must be unique within the log group.
  • Log stream names can be between 1 and 512 characters long.
  • The ':' (colon) and '*' (asterisk) characters are not allowed.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.logs.*;
 CfnLogStream cfnLogStream = CfnLogStream.Builder.create(this, "MyCfnLogStream")
         .logGroupName("logGroupName")
         // the properties below are optional
         .logStreamName("logStreamName")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnLogStream

      protected CfnLogStream(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnLogStream

      protected CfnLogStream(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnLogStream

      @Stability(Stable) public CfnLogStream(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnLogStreamProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getLogGroupName

      @Stability(Stable) @NotNull public String getLogGroupName()
      The name of the log group where the log stream is created.
    • setLogGroupName

      @Stability(Stable) public void setLogGroupName(@NotNull String value)
      The name of the log group where the log stream is created.
    • getLogStreamName

      @Stability(Stable) @Nullable public String getLogStreamName()
      The name of the log stream.
    • setLogStreamName

      @Stability(Stable) public void setLogStreamName(@Nullable String value)
      The name of the log stream.