ApiDestinationProps
- class aws_cdk.aws_events.ApiDestinationProps(*, connection, endpoint, api_destination_name=None, description=None, http_method=None, rate_limit_per_second=None)
Bases:
object
The event API Destination properties.
- Parameters:
connection (
IConnection
) – The ARN of the connection to use for the API destination.endpoint (
str
) – The URL to the HTTP invocation endpoint for the API destination..api_destination_name (
Optional
[str
]) – The name for the API destination. Default: - A unique name will be generateddescription (
Optional
[str
]) – A description for the API destination. Default: - nonehttp_method (
Optional
[HttpMethod
]) – The method to use for the request to the HTTP invocation endpoint. Default: HttpMethod.POSTrate_limit_per_second (
Union
[int
,float
,None
]) – The maximum number of requests per second to send to the HTTP invocation endpoint. Default: - Not rate limited
- ExampleMetadata:
infused
Example:
connection = events.Connection(self, "Connection", authorization=events.Authorization.api_key("x-api-key", SecretValue.secrets_manager("ApiSecretName")), description="Connection with API Key x-api-key" ) destination = events.ApiDestination(self, "Destination", connection=connection, endpoint="https://example.com", description="Calling example.com with API key x-api-key" ) rule = events.Rule(self, "Rule", schedule=events.Schedule.rate(cdk.Duration.minutes(1)), targets=[targets.ApiDestination(destination)] )
Attributes
- api_destination_name
The name for the API destination.
- Default:
A unique name will be generated
- connection
The ARN of the connection to use for the API destination.
- description
A description for the API destination.
- Default:
none
- endpoint
The URL to the HTTP invocation endpoint for the API destination..
- http_method
The method to use for the request to the HTTP invocation endpoint.
- Default:
HttpMethod.POST
- rate_limit_per_second
The maximum number of requests per second to send to the HTTP invocation endpoint.
- Default:
Not rate limited