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.103.1 (build bef2dea)",
date="2024-10-05T03:43:43.685Z")
@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.fromObject(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.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResolvable
IResolvable.Jsii$Default, IResolvable.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
EventField
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
EventField
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Extract a custom JSON path from the event.static String
Extract the account from the event.The creation stack of this resolvable which will be appended to errors thrown during resolution.static String
Extract the detail type from the event.Human readable display hint about the event pattern.static String
Extract the event ID from the event.getPath()
the path to a field in the event pattern.static String
Extract the region from the event.static String
Extract the source from the event.static String
getTime()
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, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.IResolvable
getTypeHint
Methods 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:
resolve
in 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:
toString
in interfaceIResolvable
- Overrides:
toString
in 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:
getCreationStack
in interfaceIResolvable
-
getDisplayHint
Human readable display hint about the event pattern. -
getPath
the path to a field in the event pattern.
-