Skip to content
v2.273.0

EventBridgePutEventsEntry Struct ​

An entry to be sent to EventBridge.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
import { aws_events as interfaces_events } from 'aws-cdk-lib/interfaces';

declare const eventBusRef: interfaces_events.IEventBusRef;
declare const taskInput: stepfunctions.TaskInput;
const eventBridgePutEventsEntry: stepfunctions_tasks.EventBridgePutEventsEntry = {
  detail: taskInput,
  detailType: 'detailType',
  source: 'source',

  // the properties below are optional
  eventBus: eventBusRef,
};

Properties ​

detailTaskInputdetailTaskInputdetailTaskInputDetailTaskInputDetailTaskInputrequired#
The event body.

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

example
ts
sfn.TaskInput.fromText('{"instance-id": "i-1234567890abcdef0", "state": "terminated"}');
sfn.TaskInput.fromObject({ Message: 'Hello from Step Functions' });
sfn.TaskInput.fromJsonPathAt('$.EventDetail');
detailTypestringdetail_typestrdetailTypeStringDetailTypestringDetailType*stringrequired#
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"

eventBusIEventBusRefevent_busIEventBusRefeventBusIEventBusRefEventBusIEventBusRefEventBusIEventBusRef= event is sent to account's defau…#
The event bus the entry will be sent to.
default

Default: event is sent to account's default event bus

sourcestringsourcestrsourceStringSourcestringSource*stringrequired#
The service or application that caused this event to be generated.

Example value: com.example.service