Show / Hide Table of Contents

Class EventField

Represents a field in the event pattern.

Inheritance
object
EventField
Implements
IResolvable
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EventField : DeputyBase, IResolvable
Syntax (vb)
Public Class EventField Inherits DeputyBase Implements IResolvable
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Logs;
            LogGroup logGroup;
            Rule rule;


            rule.AddTarget(new CloudWatchLogGroup(logGroup, new LogGroupProps {
                LogEvent = LogGroupTargetInput.FromObjectV2(new LogGroupTargetInputOptions {
                    Timestamp = EventField.FromPath("$.time"),
                    Message = EventField.FromPath("$.detail-type")
                })
            }));

Synopsis

Properties

Account

Extract the account from the event.

CreationStack

The creation stack of this resolvable which will be appended to errors thrown during resolution.

DetailType

Extract the detail type from the event.

DisplayHint

Human readable display hint about the event pattern.

EventId

Extract the event ID from the event.

Path

the path to a field in the event pattern.

Region

Extract the region from the event.

Source

Extract the source from the event.

Time

Extract the time from the event.

Methods

FromPath(string)

Extract a custom JSON path from the event.

Resolve(IResolveContext)

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.

Properties

Account

Extract the account from the event.

public static string Account { get; }
Property Value

string

Remarks

ExampleMetadata: infused

CreationStack

The creation stack of this resolvable which will be appended to errors thrown during resolution.

public virtual string[] CreationStack { get; }
Property Value

string[]

Remarks

This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.

DetailType

Extract the detail type from the event.

public static string DetailType { get; }
Property Value

string

Remarks

ExampleMetadata: infused

DisplayHint

Human readable display hint about the event pattern.

public virtual string DisplayHint { get; }
Property Value

string

Remarks

ExampleMetadata: infused

EventId

Extract the event ID from the event.

public static string EventId { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Path

the path to a field in the event pattern.

public virtual string Path { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Region

Extract the region from the event.

public static string Region { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Source

Extract the source from the event.

public static string Source { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Time

Extract the time from the event.

public static string Time { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Methods

FromPath(string)

Extract a custom JSON path from the event.

public static string FromPath(string path)
Parameters
path string
Returns

string

Remarks

ExampleMetadata: infused

Resolve(IResolveContext)

Produce the Token's value at resolution time.

public virtual object Resolve(IResolveContext ctx)
Parameters
ctx IResolveContext
Returns

object

Remarks

ExampleMetadata: infused

ToJSON()

Convert the path to the field in the event pattern to JSON.

public virtual string ToJSON()
Returns

string

Remarks

ExampleMetadata: infused

ToString()

Return a string representation of this resolvable object.

public override string ToString()
Returns

string

Remarks

Returns a reversible string representation.

Implements

IResolvable
Back to top Generated by DocFX