Class LambdaEventRecord
The LambdaEventRecord class defines a structured Lambda log entry for events.
Namespace: LambdaSharp.Logging.Events.Models
Assembly: LambdaSharp.Logging.dll
Syntax
public sealed class LambdaEventRecord : ALambdaLogRecord
Constructors
LambdaEventRecord()
Create a new LambdaEventRecord instance.
Declaration
public LambdaEventRecord()
Properties
Detail
The Detail property contains detailed event information as a JSON-serialized object.
Declaration
public string Detail { get; set; }
Property Value
Type | Description |
---|---|
System.String | The event details, encoded as a JSON string. |
DetailType
The DetailType property describes what fields to expect in the event detail.
Declaration
public string DetailType { get; set; }
Property Value
Type | Description |
---|---|
System.String | Then event name. |
EventBus
The EventBus property describes which event bus will receive the event.
Declaration
public string EventBus { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the event bus. |
Resources
The Resources property describes what resources the event is associated with.
Declaration
public List<string> Resources { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | The list of associated resources. |
Source
The Source property describes the source of the event.
Declaration
public string Source { get; set; }
Property Value
Type | Description |
---|---|
System.String | The source of the event. |
Time
The Time property describes when the event occurred.
Declaration
public string Time { get; set; }
Property Value
Type | Description |
---|---|
System.String | The time stamp of the event, per RFC3339. |
Methods
GetTimeAsDateTimeOffset()
The GetTimeAsDateTimeOffset() method parses the value of the Time property into a System.DateTimeOffset value.
Declaration
public DateTimeOffset GetTimeAsDateTimeOffset()
Returns
Type | Description |
---|---|
System.DateTimeOffset | The System.DateTimeOffset value of the Time property. |
SetTime(DateTimeOffset)
The SetTime(DateTimeOffset) method converts a System.DateTimeOffset value into a correctly formatted string for the Time property.
Declaration
public void SetTime(DateTimeOffset timestamp)
Parameters
Type | Name | Description |
---|---|---|
System.DateTimeOffset | timestamp | The System.DateTimeOffset value to store in the Time property. |