AWS Fundamentals Logo
AWS Fundamentals
AWS::ApiGatewayV2::Model

ApiGatewayV2 Model

The 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*.

Properties

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

Filter:
PropertyTypeFlags
ApiId
string
RequiredCreate-only
Name
string
Required
Schema
object
Required
ContentType
string
Description
string

Return Values

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

AttributeTypeDescription
ModelIdstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
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"

Required IAM Permissions

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

create

apigateway:POST

update

apigateway:PATCHapigateway:GETapigateway:PUT

read

apigateway:GET

delete

apigateway:GETapigateway:DELETE

list

apigateway:GET

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceApiGatewayV2
Properties6
Required3
TaggingNot supported
Primary IDApiId

Supported Operations

CreateUpdateReadDeleteList

Immutable After Creation

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

ApiId

External Links