Resource: awsApiGatewayModel
Provides a Model for a REST API Gateway.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsApiGatewayRestApiMyDemoApi =
new aws.apiGatewayRestApi.ApiGatewayRestApi(this, "MyDemoAPI", {
description: "This is my API for demonstration purposes",
name: "MyDemoAPI",
});
new aws.apiGatewayModel.ApiGatewayModel(this, "MyDemoModel", {
contentType: "application/json",
description: "a JSON schema",
name: "user",
restApiId: awsApiGatewayRestApiMyDemoApi.id,
schema: '${jsonencode({\n type = "object"\n })}',
});
Argument Reference
The following arguments are supported:
restApiId
- (Required) ID of the associated REST APIname
- (Required) Name of the modeldescription
- (Optional) Description of the modelcontentType
- (Required) Content type of the modelschema
- (Required) Schema of the model in a JSON form
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- ID of the model
Import
awsApiGatewayModel
can be imported using restApiId/name
, e.g.,