hal-1.1: A runtime environment for Haskell applications running on AWS Lambda.
LicenseBSD3
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

AWS.Lambda.Events.EventBridge

Description

Data types for Lambda functions which subscribe to AWS EventBridge events.

Synopsis

Documentation

type EventBridgeEvent = EventBridgeEvent' Value Source #

Convenience alias for events of unknown type. Most of the time you will want to define or use a data type Foo representing the detail payload, and write an instance FromJSON Foo to get instance FromJSON (EventBridgeEvent' Foo). See the AWS.Lambda.Events.EventBridge.Detail.* modules for data types which you can use.

data EventBridgeEvent' a Source #

Represents an event from Amazon EventBridge.

See the AWS documentation for information about events, and a sample payload.

Constructors

EventBridgeEvent 

Fields

  • version :: Text

    By default, this is set to 0 (zero) in all events.

  • id :: Text

    A Version 4 UUID that's generated for every event. You can use id to trace events as they move through rules to targets.

  • detailType :: Text

    Identifies, in combination with the source field, the fields and values that appear in the detail field.

    Events that are delivered by CloudTrail have AWS API Call via CloudTrail as the value for detail-type.

    NOTE: This is called detail-type in the AWS payload.

  • source :: Text

    Identifies the service that generated the event. All events that come from AWS services begin with "aws." Customer-generated events can have any value here, as long as it doesn't begin with "aws." We recommend the use of Java package-name style reverse domain-name strings.

    To find the correct value for source for an AWS service, see The condition keys table, select a service from the list, and look for the service prefix. For example, the source value for Amazon CloudFront is aws.cloudfront.

  • account :: Text

    The 12-digit number identifying an AWS account.

  • time :: UTCTime

    The event timestamp, which can be specified by the service originating the event. If the event spans a time interval, the service can report the start time, so this value might be before the time the event is received.

  • region :: Text

    Identifies the AWS Region where the event originated.

  • resources :: [Text]

    A JSON array that contains ARNs that identify resources that are involved in the event. The service generating the event determines whether to include these ARNs. For example, Amazon EC2 instance state-changes include Amazon EC2 instance ARNs, Auto Scaling events include ARNs for both instances and Auto Scaling groups, but API calls with AWS CloudTrail do not include resource ARNs.

  • detail :: a

    A JSON object that contains information about the event. The service generating the event determines the content of this field. The detail content can be as simple as two fields. AWS API call events have detail objects with approximately 50 fields nested several levels deep.

Instances

Instances details
Foldable EventBridgeEvent' Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

Methods

fold :: Monoid m => EventBridgeEvent' m -> m #

foldMap :: Monoid m => (a -> m) -> EventBridgeEvent' a -> m #

foldMap' :: Monoid m => (a -> m) -> EventBridgeEvent' a -> m #

foldr :: (a -> b -> b) -> b -> EventBridgeEvent' a -> b #

foldr' :: (a -> b -> b) -> b -> EventBridgeEvent' a -> b #

foldl :: (b -> a -> b) -> b -> EventBridgeEvent' a -> b #

foldl' :: (b -> a -> b) -> b -> EventBridgeEvent' a -> b #

foldr1 :: (a -> a -> a) -> EventBridgeEvent' a -> a #

foldl1 :: (a -> a -> a) -> EventBridgeEvent' a -> a #

toList :: EventBridgeEvent' a -> [a] #

null :: EventBridgeEvent' a -> Bool #

length :: EventBridgeEvent' a -> Int #

elem :: Eq a => a -> EventBridgeEvent' a -> Bool #

maximum :: Ord a => EventBridgeEvent' a -> a #

minimum :: Ord a => EventBridgeEvent' a -> a #

sum :: Num a => EventBridgeEvent' a -> a #

product :: Num a => EventBridgeEvent' a -> a #

Traversable EventBridgeEvent' Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

Methods

traverse :: Applicative f => (a -> f b) -> EventBridgeEvent' a -> f (EventBridgeEvent' b) #

sequenceA :: Applicative f => EventBridgeEvent' (f a) -> f (EventBridgeEvent' a) #

mapM :: Monad m => (a -> m b) -> EventBridgeEvent' a -> m (EventBridgeEvent' b) #

sequence :: Monad m => EventBridgeEvent' (m a) -> m (EventBridgeEvent' a) #

Functor EventBridgeEvent' Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

FromJSON a => FromJSON (EventBridgeEvent' a) Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

ToJSON a => ToJSON (EventBridgeEvent' a) Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

Generic (EventBridgeEvent' a) Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

Associated Types

type Rep (EventBridgeEvent' a) :: Type -> Type #

Show a => Show (EventBridgeEvent' a) Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

Eq a => Eq (EventBridgeEvent' a) Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge

type Rep (EventBridgeEvent' a) Source # 
Instance details

Defined in AWS.Lambda.Events.EventBridge