Skip to content
v2.275.0

CfnModelProps Struct ​

Properties for defining a CfnModel.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';

declare const schema: any;
const cfnModelProps: apigatewayv2.CfnModelProps = {
  apiId: 'apiId',
  name: 'name',
  schema: schema,

  // the properties below are optional
  contentType: 'contentType',
  description: 'description',
};

Properties ​

apiIdstring | IApiRefapi_idtyping.Union[str, IApiRef]apiIdStringApiIdstringApiIdinterface{}required#
The API identifier.
contentTypeoptionalstringcontent_typeoptionalstrcontentTypeoptionalStringContentTypeoptionalstringContentTypeoptional*string#
The content-type for the model, for example, "application/json".
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The description of the model.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the model.
schemaanyschemaAnyschemaObjectSchemaobjectSchemainterface{}required#
The schema for the model.

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