interface CfnModelProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGateway.CfnModelProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#CfnModelProps |
Java | software.amazon.awscdk.services.apigateway.CfnModelProps |
Python | aws_cdk.aws_apigateway.CfnModelProps |
TypeScript | aws-cdk-lib » aws_apigateway » CfnModelProps |
Properties for defining a CfnModel
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
declare const schema: any;
const cfnModelProps: apigateway.CfnModelProps = {
restApiId: 'restApiId',
// the properties below are optional
contentType: 'contentType',
description: 'description',
name: 'name',
schema: schema,
};
Properties
Name | Type | Description |
---|---|---|
rest | string | The string identifier of the associated RestApi. |
content | string | The content-type for the model. |
description? | string | The description of the model. |
name? | string | A name for the model. |
schema? | any | The schema for the model. |
restApiId
Type:
string
The string identifier of the associated RestApi.
contentType?
Type:
string
(optional)
The content-type for the model.
description?
Type:
string
(optional)
The description of the model.
name?
Type:
string
(optional)
A name for the model.
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the model name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
schema?
Type:
any
(optional)
The schema for the model.
For application/json
models, this should be JSON schema draft 4 model. Do not include "* /" characters in the description of any properties because such "* /" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.