Class CfnLogStream

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.078Z") @Stability(Stable) public class CfnLogStream extends CfnResource implements IInspectable
A CloudFormation AWS::Logs::LogStream.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnLogStreamProps props)
      Create a new AWS::Logs::LogStream.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.

      The name must be unique within the log group.

    • setLogStreamName

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

      The name must be unique within the log group.