Skip to content

Resource: awsCloudwatchEventApiDestination

Provides an EventBridge event API Destination resource.

\~> Note: EventBridge was formerly known as CloudWatch Events. The functionality is identical.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.cloudwatchEventApiDestination.CloudwatchEventApiDestination(
  this,
  "test",
  {
    connectionArn: "${aws_cloudwatch_event_connection.test.arn}",
    description: "An API Destination",
    httpMethod: "POST",
    invocationEndpoint: "https://api.destination.com/endpoint",
    invocationRateLimitPerSecond: 20,
    name: "api-destination",
  }
);

Argument Reference

The following arguments are supported:

  • 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.
  • invocationEndpoint - (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.
  • httpMethod - (Required) Select the HTTP method used for the invocation endpoint, such as GET, POST, PUT, etc.
  • invocationRateLimitPerSecond - (Optional) Enter the maximum number of invocations per second to allow for this destination. Enter a value greater than 0 (default 300).
  • connectionArn - (Required) ARN of the EventBridge Connection to use for the API Destination.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - The Amazon Resource Name (ARN) of the event API Destination.

Import

EventBridge API Destinations can be imported using the name, e.g.,

$ terraform import aws_cloudwatch_event_api_destination.test api-destination