AWS Fundamentals Logo
AWS Fundamentals
AWS::ApiGateway::GatewayResponse

ApiGateway GatewayResponse

The AWS::ApiGateway::GatewayResponse resource creates a gateway response for your API. When you delete a stack containing this resource, your custom gateway responses are reset. For more information, see [API Gateway Responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html#api-gateway-gatewayResponse-definition) in the *API Gateway Developer Guide*.

Properties

5 configurable properties. 2 required. Click a row to see details.

Filter:
PropertyTypeFlags
ResponseType
string
RequiredCreate-only
RestApiId
string
RequiredCreate-only
ResponseParameters
object
ResponseTemplates
object
StatusCode
string

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Idstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ApiGateway::GatewayResponse

Resources:
  MyResource:
    Type: AWS::ApiGateway::GatewayResponse
    Properties:
      ResponseType: "value"
      RestApiId: "my-restapiid"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

apigateway:PUTapigateway:GET

read

apigateway:GET

update

apigateway:GETapigateway:PUT

delete

apigateway:GETapigateway:DELETE

list

apigateway:GET

Get the ApiGateway Cheat Sheet

Everything you need to know about ApiGateway on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceApiGateway
Properties6
Required2
TaggingNot supported
Primary IDId

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

ResponseTypeRestApiId

External Links