AWS::Events::ApiDestinationCreates 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 { CfnApiDestination } from 'aws-cdk-lib/aws-events';Or use the module namespace:
import * as events from 'aws-cdk-lib/aws-events';
// events.CfnApiDestinationConfiguration passed to the constructor as CfnApiDestinationProps.
connectionArnRequiredstringThe ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.
httpMethodRequiredstringThe method to use for the request to the HTTP invocation endpoint.
invocationEndpointRequiredstringThe URL to the HTTP invocation endpoint for the API destination.
descriptionOptionalstringA description for the API destination to create.
invocationRateLimitPerSecondOptionalnumberThe maximum number of requests per second to send to the HTTP invocation endpoint.
nameOptionalstringThe name for the API destination to create.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon EventBridge on one page. HD quality, print-friendly.
Download Free Infographicaws-eventsAWS::Events::ApiDestination