Class CfnLogStream

All Implemented Interfaces:
IInspectable,, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:04.905Z") @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.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 CfnLogStream cfnLogStream = CfnLogStream.Builder.create(this, "MyCfnLogStream")
         // the properties below are optional

See Also:
  • Field Details


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

    • CfnLogStream

      protected CfnLogStream( objRef)
    • CfnLogStream

      protected CfnLogStream( initializationMode)
    • CfnLogStream

      @Stability(Stable) public CfnLogStream(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnLogStreamProps props)
      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
      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)
      renderProperties in class CfnResource
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      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.