AWS Fundamentals Logo
AWS Fundamentals
AWS::ApiGateway::RestApi

ApiGateway RestApi

The AWS::ApiGateway::RestApi resource creates a REST API. For more information, see [restapi:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateRestApi.html) in the *Amazon API Gateway REST API Reference*. On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://docs.aws.amazon.com/https://www.openapis.org/), becoming the foundation of the OpenAPI Specification.

Properties

17 configurable properties. Click a row to see details.

Filter:
PropertyTypeFlags
ApiKeySourceType
string
BinaryMediaTypes
Array<string>
Body
objectstring
Write-only
BodyS3Location
S3Location
Write-only
CloneFrom
string
Write-only
Description
string
DisableExecuteApiEndpoint
boolean
EndpointAccessMode
string
EndpointConfiguration
EndpointConfiguration
FailOnWarnings
boolean
Write-only
MinimumCompressionSize
integer
Mode
string
Write-only
Name
string
Parameters
objectstring
Write-only
Policy
objectstring
SecurityPolicy
string
Tags
Array<Tag>

Return Values

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

AttributeTypeDescription
RestApiIdstring-
RootResourceIdstring-

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::RestApi

Resources:
  MyResource:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Tags:
        - Key: Environment
          Value: Production
      Description: !Ref "AWS::StackName"
      Name: !Ref "AWS::StackName"

Required IAM Permissions

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

read

apigateway:GET

create

apigateway:GETapigateway:POSTapigateway:PUTapigateway:PATCHapigateway:UpdateRestApiPolicys3:GetObjectiam:PassRole

update

apigateway:GETapigateway:DELETEapigateway:PATCHapigateway:PUTapigateway:UpdateRestApiPolicys3:GetObjectiam:PassRole

list

apigateway:GET

delete

apigateway:DELETE

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
Properties19
Required0
TaggingSupported
Primary IDRestApiId

Supported Operations

ReadCreateUpdateListDelete

External Links