awscc_apigatewayv2_integration_response (Resource)

The AWS::ApiGatewayV2::IntegrationResponse resource updates an integration response for an WebSocket API. For more information, see Set up WebSocket API Integration Responses in API Gateway in the API Gateway Developer Guide.

Example Usage

The following example creates an IntegrationResponse resource for an API named example-websocket-api that has an integration resource.

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

resource "aws_apigatewayv2_integration" "example" {
  api_id           = awscc_apigatewayv2_api.example.id
  integration_type = "MOCK"
}

resource "awscc_apigatewayv2_integration_response" "example" {
  api_id                   = awscc_apigatewayv2_api.example.id
  integration_id           = aws_apigatewayv2_integration.example.id
  integration_response_key = "/400/"
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

$ terraform import awscc_apigatewayv2_integration_response.example <resource ID>