aws-cdk-lib.aws_events.ApiDestinationProps

interface ApiDestinationProps

LanguageType name
.NETAmazon.CDK.AWS.Events.ApiDestinationProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsevents#ApiDestinationProps
Javasoftware.amazon.awscdk.services.events.ApiDestinationProps
Pythonaws_cdk.aws_events.ApiDestinationProps
TypeScript (source)aws-cdk-lib » aws_events » ApiDestinationProps

The event API Destination properties.

Example

const connection = new events.Connection(this, 'Connection', {
  authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),
  description: 'Connection with API Key x-api-key',
});

const destination = new events.ApiDestination(this, 'Destination', {
  connection,
  endpoint: 'https://example.com',
  description: 'Calling example.com with API key x-api-key',
});

const rule = new events.Rule(this, 'Rule', {
  schedule: events.Schedule.rate(Duration.minutes(1)),
  targets: [new targets.ApiDestination(destination)],
});

Properties

NameTypeDescription
connectionIConnectionThe ARN of the connection to use for the API destination.
endpointstringThe URL to the HTTP invocation endpoint for the API destination..
apiDestinationName?stringThe name for the API destination.
description?stringA description for the API destination.
httpMethod?HttpMethodThe method to use for the request to the HTTP invocation endpoint.
rateLimitPerSecond?numberThe maximum number of requests per second to send to the HTTP invocation endpoint.

connection

Type: IConnection

The ARN of the connection to use for the API destination.


endpoint

Type: string

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


apiDestinationName?

Type: string (optional, default: A unique name will be generated)

The name for the API destination.


description?

Type: string (optional, default: none)

A description for the API destination.


httpMethod?

Type: HttpMethod (optional, default: HttpMethod.POST)

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


rateLimitPerSecond?

Type: number (optional, default: Not rate limited)

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