Interface LogGroupTargetInputOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LogGroupTargetInputOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-12-01T16:02:21.278Z")
@Stability(Stable)
public interface LogGroupTargetInputOptions
extends software.amazon.jsii.JsiiSerializable
Options used when creating a target input template.
Example:
import software.amazon.awscdk.services.logs.*;
LogGroup logGroup;
Rule rule;
rule.addTarget(CloudWatchLogGroup.Builder.create(logGroup)
.logEvent(LogGroupTargetInput.fromObjectV2(LogGroupTargetInputOptions.builder()
.timestamp(EventField.fromPath("$.time"))
.message(EventField.fromPath("$.detail-type"))
.build()))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLogGroupTargetInputOptionsstatic final classAn implementation forLogGroupTargetInputOptions -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMessage
The value provided here will be used in the Log "message" field.This field must be a string. If an object is passed (e.g. JSON data) it will not throw an error, but the message that makes it to CloudWatch logs will be incorrect. This is a likely scenario if doing something like: EventField.fromPath('$.detail') since in most cases the
detailfield contains JSON data.Default: EventField.detailType
-
getTimestamp
The timestamp that will appear in the CloudWatch Logs record.Default: EventField.time
-
builder
- Returns:
- a
LogGroupTargetInputOptions.BuilderofLogGroupTargetInputOptions
-