Class CloudWatchLogsAction

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iot.actions.alpha.CloudWatchLogsAction
All Implemented Interfaces:
IAction, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-10-31T19:13:08.315Z") @Stability(Experimental) public class CloudWatchLogsAction extends software.amazon.jsii.JsiiObject implements IAction
(experimental) The action to send data to Amazon CloudWatch Logs.

Example:

 import software.amazon.awscdk.services.logs.*;
 LogGroup logGroup = new LogGroup(this, "MyLogGroup");
 TopicRule.Builder.create(this, "TopicRule")
         .sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"))
         .errorAction(new CloudWatchLogsAction(logGroup))
         .build();
 
  • Constructor Details

    • CloudWatchLogsAction

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

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

      @Stability(Experimental) public CloudWatchLogsAction(@NotNull ILogGroup logGroup, @Nullable CloudWatchLogsActionProps props)
      Parameters:
      logGroup - The CloudWatch log group to which the action sends data. This parameter is required.
      props - Optional properties to not use default.
    • CloudWatchLogsAction

      @Stability(Experimental) public CloudWatchLogsAction(@NotNull ILogGroup logGroup)
      Parameters:
      logGroup - The CloudWatch log group to which the action sends data. This parameter is required.