Skip to content
v2.278.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,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions as stepfunctions
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
from aws_cdk.interfaces import aws_events as interfaces_events

# event_bus_ref: interfaces_events.IEventBusRef
# task_input: stepfunctions.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_ref
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.*;
import software.amazon.awscdk.services.stepfunctions.tasks.*;
import software.amazon.awscdk.interfaces.events.*;

IEventBusRef eventBusRef;
TaskInput taskInput;

EventBridgePutEventsEntry eventBridgePutEventsEntry = EventBridgePutEventsEntry.builder()
        .detail(taskInput)
        .detailType("detailType")
        .source("source")

        // the properties below are optional
        .eventBus(eventBusRef)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;
using Amazon.CDK.AWS.StepFunctions.Tasks;
using Amazon.CDK.Interfaces.Events;

IEventBusRef eventBusRef;
TaskInput taskInput;

var eventBridgePutEventsEntry = new EventBridgePutEventsEntry {
    Detail = taskInput,
    DetailType = "detailType",
    Source = "source",

    // the properties below are optional
    EventBus = eventBusRef
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var eventBusRef IEventBusRef
var taskInput TaskInput

eventBridgePutEventsEntry := &EventBridgePutEventsEntry{
	Detail: taskInput,
	DetailType: jsii.String("detailType"),
	Source: jsii.String("source"),

	// the properties below are optional
	EventBus: eventBusRef,
}

Properties ​

detailTaskInputdetailTaskInputdetailTaskInputDetailTaskInputDetailTaskInput required #
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*string required #
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"

eventBusoptionalIEventBusRefevent_busoptionalIEventBusRefeventBusoptionalIEventBusRefEventBusoptionalIEventBusRefEventBusoptionalIEventBusRef #
The event bus the entry will be sent to.

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

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

Example value: com.example.service