AWS::ApiGatewayV2::ApiThe AWS::ApiGatewayV2::Api resource creates an API. WebSocket APIs and HTTP APIs are supported. For more information about WebSocket APIs, see [About WebSocket APIs in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-overview.html) in the *API Gateway Developer Guide*. For more information about HTTP APIs, see [HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api.html) in the *API Gateway Developer Guide.*
18 configurable properties. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
ApiKeySelectionExpression | string | |
BasePath | string | Write-only |
Body | object | Write-only |
BodyS3Location | BodyS3Location | Write-only |
CorsConfiguration | Cors | |
CredentialsArn | string | Write-only |
Description | string | |
DisableExecuteApiEndpoint | boolean | |
DisableSchemaValidation | boolean | Write-only |
FailOnWarnings | boolean | Write-only |
IpAddressType | string | |
Name | string | |
ProtocolType | string | Create-only |
RouteKey | string | Write-only |
RouteSelectionExpression | string | |
Tags | object | |
Target | string | Write-only |
Version | string |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
ApiEndpoint | string | - |
ApiId | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ApiGatewayV2::Api
Resources:
MyResource:
Type: AWS::ApiGatewayV2::Api
Properties:
Tags:
- Key: Environment
Value: Production
Description: !Ref "AWS::StackName"
Name: !Ref "AWS::StackName"Permissions CloudFormation needs in your IAM role to manage this resource.
apigateway:POSTapigateway:PUTs3:getObjectapigateway:PATCHapigateway:GETapigateway:PUTapigateway:POSTs3:getObjectapigateway:GETs3:getObjectapigateway:GETapigateway:DELETEs3:getObjectapigateway:GETs3:getObjectOur bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to NewsletterApiIdThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
ProtocolType