AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Events::ApiDestination

CfnApiDestination

Creates an API destination, which is an HTTP invocation endpoint configured as a target for events. When using ApiDesinations with OAuth authentication we recommend these best practices: - Create a secret in Secrets Manager with your OAuth credentials. - Reference that secret in your CloudFormation template for `AWS::Events::Connection` using CloudFormation dynamic reference syntax. For more information, see [Secrets Manager secrets](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager) . When the Connection resource is created the secret will be passed to EventBridge and stored in the customer account using “Service Linked Secrets,” effectively creating two secrets. This will minimize the cost because the original secret is only accessed when a CloudFormation template is created or updated, not every time an event is sent to the ApiDestination. The secret stored in the customer account by EventBridge is the one used for each event sent to the ApiDestination and AWS is responsible for the fees. > The secret stored in the customer account by EventBridge can’t be updated directly, only when a CloudFormation template is updated. For examples of CloudFormation templates that use secrets, see [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html#aws-resource-events-connection--examples) .

Import

import { CfnApiDestination } from 'aws-cdk-lib/aws-events';

Or use the module namespace:

import * as events from 'aws-cdk-lib/aws-events';
// events.CfnApiDestination

Properties

Configuration passed to the constructor as CfnApiDestinationProps.

connectionArnRequired
string

The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.

httpMethodRequired
string

The method to use for the request to the HTTP invocation endpoint.

invocationEndpointRequired
string

The URL to the HTTP invocation endpoint for the API destination.

descriptionOptional
string

A description for the API destination to create.

invocationRateLimitPerSecondOptional
number

The maximum number of requests per second to send to the HTTP invocation endpoint.

nameOptional
string

The name for the API destination to create.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EventBridge Cheat Sheet

Everything you need to know about Amazon EventBridge on one page. HD quality, print-friendly.

Download Free Infographic