EventBridgePutEventsEntry
- class aws_cdk.aws_scheduler_targets_alpha.EventBridgePutEventsEntry(*, detail, detail_type, event_bus, source)
Bases:
object
(experimental) An entry to be sent to EventBridge.
- Parameters:
detail (
ScheduleTargetInput
) – (experimental) The event body. Can either be provided as an object or as a JSON-serialized stringdetail_type (
str
) – (experimental) Used along with the source field to help identify the fields and values expected in the detail field. For example, events by CloudTrail have detail type “AWS API Call via CloudTrail”event_bus (
IEventBus
) – (experimental) The event bus the entry will be sent to.source (
str
) – (experimental) The service or application that caused this event to be generated. Example value:com.example.service
- See:
https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html
- Stability:
experimental
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_events as events event_bus = events.EventBus(self, "EventBus", event_bus_name="DomainEvents" ) event_entry = targets.EventBridgePutEventsEntry( event_bus=event_bus, source="PetService", detail=ScheduleTargetInput.from_object({"Name": "Fluffy"}), detail_type="🐶" ) Schedule(self, "Schedule", schedule=ScheduleExpression.rate(Duration.hours(1)), target=targets.EventBridgePutEvents(event_entry) )
Attributes
- detail
(experimental) The event body.
Can either be provided as an object or as a JSON-serialized string
- Stability:
experimental
Example:
ScheduleTargetInput.from_text("{"instance-id": "i-1234567890abcdef0", "state": "terminated"}") ScheduleTargetInput.from_object({"Message": "Hello from a friendly event :)"})
- detail_type
(experimental) Used along with the source field to help identify the fields and values expected in the detail field.
For example, events by CloudTrail have detail type “AWS API Call via CloudTrail”
- See:
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html
- Stability:
experimental
- event_bus
(experimental) The event bus the entry will be sent to.
- Stability:
experimental
- source
(experimental) The service or application that caused this event to be generated.
Example value:
com.example.service
- See:
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html
- Stability:
experimental