AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ApiGatewayV2::Model

CfnModel

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

Import

import { CfnModel } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.CfnModel

Properties

Configuration passed to the constructor as CfnModelProps.

apiIdRequired
string | IApiRef

The API identifier.

nameRequired
string

The name of the model.

schemaRequired
any

The schema for the model. For application/json models, this should be JSON schema draft 4 model.

contentTypeOptional
string

The content-type for the model, for example, "application/json".

descriptionOptional
string

The description of the model.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

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

Subscribe to Newsletter