ApiDestination
Source:
src/AWS/EventBridge/ApiDestination.ts
An Amazon EventBridge API destination — an HTTPS endpoint configured as an
event target, invoked with the authorization held by a Connection.
API destinations do not support tags, so ownership is tracked by the deterministic physical name.
Connecting to APIs
Section titled “Connecting to APIs”Webhook API Destination
const destination = yield* AWS.EventBridge.ApiDestination("Webhook", { connectionArn: connection.connectionArn, invocationEndpoint: "https://hooks.example.com/events", httpMethod: "POST",});Rate-Limited API Destination as a Rule Target
const destination = yield* AWS.EventBridge.ApiDestination("SlowApi", { connectionArn: connection.connectionArn, invocationEndpoint: "https://api.example.com/ingest", httpMethod: "POST", invocationRateLimitPerSecond: 10,});
const rule = yield* AWS.EventBridge.Rule("ToApi", { eventPattern: { source: ["my.app"] }, targets: [{ Id: "Api", Arn: destination.apiDestinationArn, RoleArn: role.roleArn, }],});