» Resource: aws_apigatewayv2_api

Manages an Amazon API Gateway Version 2 API.

» Example Usage

» Basic WebSocket API

resource "aws_apigatewayv2_api" "example" {
  name                       = "example-websocket-api"
  protocol_type              = "WEBSOCKET"
  route_selection_expression = "$request.body.action"
}

» Basic HTTP API

resource "aws_apigatewayv2_api" "example" {
  name          = "example-http-api"
  protocol_type = "HTTP"
}

» Argument Reference

The following arguments are supported:

» Attribute Reference

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

» Import

aws_apigatewayv2_api can be imported by using the API identifier, e.g.

$ terraform import aws_apigatewayv2_api.example aabbccddee