Provides an EventBridge event API Destination resource.
resource "aws_cloudwatch_event_api_destination" "test" {
name = "api-destination"
description = "An API Destination"
invocation_endpoint = "https://api.destination.com/endpoint"
http_method = "POST"
invocation_rate_limit_per_second = 20
connection_arn = aws_cloudwatch_event_connection.test.arn
}
This resource supports the following arguments:
name
- (Required) The name of the new API Destination. The name must be unique for your account. Maximum of 64 characters consisting of numbers, lower/upper case letters, .,-,_.description
- (Optional) The description of the new API Destination. Maximum of 512 characters.invocation_endpoint
- (Required) URL endpoint to invoke as a target. This could be a valid endpoint generated by a partner service. You can include "*" as path parameters wildcards to be set from the Target HttpParameters.http_method
- (Required) Select the HTTP method used for the invocation endpoint, such as GET, POST, PUT, etc.invocation_rate_limit_per_second
- (Optional) Enter the maximum number of invocations per second to allow for this destination. Enter a value greater than 0 (default 300).connection_arn
- (Required) ARN of the EventBridge Connection to use for the API Destination.This resource exports the following attributes in addition to the arguments above:
arn
- The Amazon Resource Name (ARN) of the event API Destination.In Terraform v1.5.0 and later, use an import
block to import EventBridge API Destinations using the name
. For example:
import {
to = aws_cloudwatch_event_api_destination.test
id = "api-destination"
}
Using terraform import
, import EventBridge API Destinations using the name
. For example:
% terraform import aws_cloudwatch_event_api_destination.test api-destination