AWS API Gateway V2 Integration Response

This page shows how to write Terraform and CloudFormation for API Gateway V2 Integration Response and write them securely.

aws_apigatewayv2_integration_response (Terraform)

The Integration Response in API Gateway V2 can be configured in Terraform with the resource name aws_apigatewayv2_integration_response. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

github-iconniveklabs/aws
resource "aws_apigatewayv2_integration_response" "this" {
  api_id                        = var.api_id
  content_handling_strategy     = var.content_handling_strategy
  integration_id                = var.integration_id
  integration_response_key      = var.integration_response_key
  response_templates            = var.response_templates
github-iconobytes/terraform-aws-sumu
resource "aws_apigatewayv2_integration_response" "publish" {
  api_id                   = var.api_id
  integration_id           = aws_apigatewayv2_integration.publish.id
  integration_response_key = "/200/"
}

github-iconobytes/terraform-aws-sumu
resource "aws_apigatewayv2_integration_response" "send" {
  api_id                   = var.api_id
  integration_id           = aws_apigatewayv2_integration.send.id
  integration_response_key = "/200/"
}

github-iconobytes/terraform-aws-sumu
resource "aws_apigatewayv2_integration_response" "hello" {
  api_id                   = var.api_id
  integration_id           = aws_apigatewayv2_integration.ack_presence.id
  integration_response_key = "/200/"
}

github-iconobytes/terraform-aws-sumu
resource "aws_apigatewayv2_integration_response" "bye" {
  api_id                   = var.api_id
  integration_id           = aws_apigatewayv2_integration.ack_absence.id
  integration_response_key = "/200/"
}

Parameters

Explanation in Terraform Registry

Manages an Amazon API Gateway Version 2 integration response. More information can be found in the Amazon API Gateway Developer Guide.

AWS::ApiGatewayV2::IntegrationResponse (CloudFormation)

The IntegrationResponse in ApiGatewayV2 can be configured in CloudFormation with the resource name AWS::ApiGatewayV2::IntegrationResponse. The following sections describe how to use the resource and its parameters.

Parameters

Explanation in CloudFormation Registry

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.

Frequently asked questions

What is AWS API Gateway V2 Integration Response?

AWS API Gateway V2 Integration Response is a resource for API Gateway V2 of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS API Gateway V2 Integration Response?

For Terraform, the niveklabs/aws, obytes/terraform-aws-sumu and obytes/terraform-aws-sumu source code examples are useful. See the Terraform Example section for further details.