AWS::ApiGatewayV2::ModelThe AWS::ApiGatewayV2::Model resource updates data model for a WebSocket API. For more information, see [Model Selection Expressions](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-expressions) in the *API Gateway Developer Guide*.
5 configurable properties. 3 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
ApiId | string | RequiredCreate-only |
Name | string | Required |
Schema | object | Required |
ContentType | string | |
Description | string |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
ModelId | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ApiGatewayV2::Model
Resources:
MyResource:
Type: AWS::ApiGatewayV2::Model
Properties:
ApiId: "my-apiid"
Schema: {}
Name: "my-name"
Description: !Ref "AWS::StackName"Permissions CloudFormation needs in your IAM role to manage this resource.
apigateway:POSTapigateway:PATCHapigateway:GETapigateway:PUTapigateway:GETapigateway:GETapigateway:DELETEapigateway:GETOur 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.
ApiId