Skip to content
v2.275.0

ApiDestinationProps Struct ​

The event API Destination properties.

Example ​

ts
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 ​

apiDestinationNameoptionalstringapi_destination_nameoptionalstrapiDestinationNameoptionalStringApiDestinationNameoptionalstringApiDestinationNameoptional*string#
The name for the API destination.

Default: A unique name will be generated

connectionIConnectionRefconnectionIConnectionRefconnectionIConnectionRefConnectionIConnectionRefConnectionIConnectionRefrequired#
The ARN of the connection to use for the API destination.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= none#
A description for the API destination.
endpointstringendpointstrendpointStringEndpointstringEndpoint*stringrequired#
The URL to the HTTP invocation endpoint for the API destination..
httpMethodoptionalHttpMethodhttp_methodoptionalHttpMethodhttpMethodoptionalHttpMethodHttpMethodoptionalHttpMethodHttpMethodoptionalHttpMethod= HttpMethod.POST#
The method to use for the request to the HTTP invocation endpoint.
rateLimitPerSecondoptionalnumberrate_limit_per_secondoptionalint | floatrateLimitPerSecondoptionalNumberRateLimitPerSecondoptionaldoubleRateLimitPerSecondoptional*float64#
The maximum number of requests per second to send to the HTTP invocation endpoint.

Default: Not rate limited