CfnModelProps Struct
Properties for defining a CfnModel.
| Source | |
|---|---|
| Type last changed |
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',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigatewayv2 as apigatewayv2
# schema: Any
cfn_model_props = apigatewayv2.CfnModelProps(
api_id="apiId",
name="name",
schema=schema,
# the properties below are optional
content_type="contentType",
description="description"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigatewayv2.*;
Object schema;
CfnModelProps cfnModelProps = CfnModelProps.builder()
.apiId("apiId")
.name("name")
.schema(schema)
// the properties below are optional
.contentType("contentType")
.description("description")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Apigatewayv2;
var schema;
var cfnModelProps = new CfnModelProps {
ApiId = "apiId",
Name = "name",
Schema = schema,
// the properties below are optional
ContentType = "contentType",
Description = "description"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var schema interface{}
cfnModelProps := &CfnModelProps{
ApiId: jsii.String("apiId"),
Name: jsii.String("name"),
Schema: schema,
// the properties below are optional
ContentType: jsii.String("contentType"),
Description: jsii.String("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.
The name of the model.
The schema for the model.
For application/json models, this should be JSON schema draft 4 model.