Class EventField
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.EventField
- All Implemented Interfaces:
IResolvable,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:38.909Z")
@Stability(Stable)
public class EventField
extends software.amazon.jsii.JsiiObject
implements IResolvable
Represents a field in the event pattern.
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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.IResolvable
IResolvable.Jsii$Default, IResolvable.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventField(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEventField(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringExtract a custom JSON path from the event.static StringExtract the account from the event.The creation stack of this resolvable which will be appended to errors thrown during resolution.static StringExtract the detail type from the event.Human readable display hint about the event pattern.static StringExtract the event ID from the event.getPath()the path to a field in the event pattern.static StringExtract the region from the event.static StringExtract the source from the event.static StringgetTime()Extract the time from the event.resolve(IResolveContext _ctx) Produce the Token's value at resolution time.toJSON()Convert the path to the field in the event pattern to JSON.toString()Return a string representation of this resolvable object.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.IResolvable
getTypeHintMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
EventField
protected EventField(software.amazon.jsii.JsiiObjectRef objRef) -
EventField
protected EventField(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromPath
Extract a custom JSON path from the event.- Parameters:
path- This parameter is required.
-
resolve
Produce the Token's value at resolution time.- Specified by:
resolvein interfaceIResolvable- Parameters:
_ctx- This parameter is required.
-
toJSON
Convert the path to the field in the event pattern to JSON. -
toString
Return a string representation of this resolvable object.Returns a reversible string representation.
- Specified by:
toStringin interfaceIResolvable- Overrides:
toStringin classObject
-
getAccount
Extract the account from the event. -
getDetailType
Extract the detail type from the event. -
getEventId
Extract the event ID from the event. -
getRegion
Extract the region from the event. -
getSource
Extract the source from the event. -
getTime
Extract the time from the event. -
getCreationStack
The creation stack of this resolvable which will be appended to errors thrown during resolution.This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.
- Specified by:
getCreationStackin interfaceIResolvable
-
getDisplayHint
Human readable display hint about the event pattern. -
getPath
the path to a field in the event pattern.
-