Class Header
- java.lang.Object
-
- com.perihelios.aws.lambda.cloudwatch.dispatcher.event.Header
-
public class Header extends Object
Encapsulates the metadata from a CloudWatch event.Every CloudWatch event includes a set of common fields; this class encapsulates those.
Note that the
detail-typeproperty is not included in this class, as it is used exclusively by the unmarshaller to identify to which subtype ofCloudWatchEventthe event should be unmarshalled. Thedetailproperty is unmarshalled as the body of the identified subtype, and so is also not included in the header.
-
-
Constructor Summary
Constructors Constructor Description Header()
-
Method Summary
Modifier and Type Method Description Stringaccount()Returns the AWS account ID for which the event was generated.Stringid()Returns the unique CloudWatch event ID.Stringregion()Returns the AWS region where the event occurred.List<String>resources()Returns the AWS resources (typically, ARNs) affected by the event.Stringsource()Returns the AWS service name that is the source of the event.ZonedDateTimetime()Returns the timestamp when the event occurred.Stringversion()Returns the CloudWatch event version.
-
-
-
Constructor Detail
-
Header
public Header()
-
-
Method Detail
-
version
public String version()
Returns the CloudWatch event version.At this time, the version is always
"0".- Returns:
- the event version
-
source
public String source()
Returns the AWS service name that is the source of the event.- Returns:
- the event source
-
account
public String account()
Returns the AWS account ID for which the event was generated.- Returns:
- the AWS account ID
-
time
public ZonedDateTime time()
Returns the timestamp when the event occurred.The resolution of this field is typically only to the second. Specific events may provide higher-resolution timestamps as part of their bodies.
- Returns:
- the event timestamp
-
region
public String region()
Returns the AWS region where the event occurred.- Returns:
- the event region
-
-