Interface LogGroupProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TargetBaseProps
All Known Implementing Classes:
LogGroupProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:38.471Z") @Stability(Stable) public interface LogGroupProps extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Customize the CloudWatch LogGroup Event Target.

Example:

 import software.amazon.awscdk.services.logs.*;
 LogGroup logGroup;
 Rule rule;
 rule.addTarget(CloudWatchLogGroup.Builder.create(logGroup)
         .logEvent(LogGroupTargetInput.fromObject(LogGroupTargetInputOptions.builder()
                 .message(JSON.stringify(Map.of(
                         "CustomField", "CustomValue")))
                 .build()))
         .build());
 
  • Method Details

    • getEvent

      @Stability(Deprecated) @Deprecated @Nullable default RuleTargetInput getEvent()
      Deprecated.
      use logEvent instead
      (deprecated) The event to send to the CloudWatch LogGroup.

      This will be the event logged into the CloudWatch LogGroup

      Default: - the entire EventBridge event

    • getInstallLatestAwsSdk

      @Stability(Stable) @Nullable default Boolean getInstallLatestAwsSdk()
      Whether the custom resource created wll default to install latest AWS SDK.

      Default: - install latest AWS SDK

    • getLogEvent

      @Stability(Stable) @Nullable default LogGroupTargetInput getLogEvent()
      The event to send to the CloudWatch LogGroup.

      This will be the event logged into the CloudWatch LogGroup

      Default: - the entire EventBridge event

    • builder

      @Stability(Stable) static LogGroupProps.Builder builder()
      Returns:
      a LogGroupProps.Builder of LogGroupProps