aws-cdk-lib.aws_stepfunctions_tasks.EventBridgePutEventsEntry

interface EventBridgePutEventsEntry

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.Tasks.EventBridgePutEventsEntry
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#EventBridgePutEventsEntry
Javasoftware.amazon.awscdk.services.stepfunctions.tasks.EventBridgePutEventsEntry
Pythonaws_cdk.aws_stepfunctions_tasks.EventBridgePutEventsEntry
TypeScript (source)aws-cdk-lib » aws_stepfunctions_tasks » EventBridgePutEventsEntry

An entry to be sent to EventBridge.

See also: 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_events as events } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const eventBus: events.EventBus;
declare const taskInput: stepfunctions.TaskInput;
const eventBridgePutEventsEntry: stepfunctions_tasks.EventBridgePutEventsEntry = {
  detail: taskInput,
  detailType: 'detailType',
  source: 'source',

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

Properties

NameTypeDescription
detailTaskInputThe event body.
detailTypestringUsed along with the source field to help identify the fields and values expected in the detail field.
sourcestringThe service or application that caused this event to be generated.
eventBus?IEventBusThe event bus the entry will be sent to.

detail

Type: TaskInput

The event body.

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

sfn.TaskInput.fromText('{"instance-id": "i-1234567890abcdef0", "state": "terminated"}');
sfn.TaskInput.fromObject({ Message: 'Hello from Step Functions' });
sfn.TaskInput.fromJsonPathAt('$.EventDetail');

detailType

Type: string

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 also: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html


source

Type: string

The service or application that caused this event to be generated.

Example value: com.example.service

See also: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html


eventBus?

Type: IEventBus (optional, default: event is sent to account's default event bus)

The event bus the entry will be sent to.