EventBridgePutEventsEntry

class aws_cdk.aws_stepfunctions_tasks.EventBridgePutEventsEntry(*, detail, detail_type, event_bus=None, source)

Bases: object

An entry to be sent to EventBridge.

Parameters
  • detail (TaskInput) – The event body. Can either be provided as an object or as a JSON-serialized string

  • detail_type (str) – 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 (Optional[IEventBus]) – The event bus the entry will be sent to. Default: - event is sent to account’s default event bus

  • source (str) – 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

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_events as events
import aws_cdk.aws_stepfunctions as stepfunctions
import aws_cdk.aws_stepfunctions_tasks as stepfunctions_tasks

# event_bus is of type EventBus
# task_input is of type TaskInput

event_bridge_put_events_entry = stepfunctions_tasks.EventBridgePutEventsEntry(
    detail=task_input,
    detail_type="detailType",
    source="source",

    # the properties below are optional
    event_bus=event_bus
)

Attributes

detail

The event body.

Can either be provided as an object or as a JSON-serialized string

Example:

sfn.TaskInput.from_text("{"instance-id": "i-1234567890abcdef0", "state": "terminated"}")
sfn.TaskInput.from_object({"Message": "Hello from Step Functions"})
sfn.TaskInput.from_json_path_at("$.EventDetail")
Return type

TaskInput

detail_type

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

Return type

str

event_bus

The event bus the entry will be sent to.

Default
  • event is sent to account’s default event bus

Return type

Optional[IEventBus]

source

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

Return type

str