github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/aws/r/api_gateway_model.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_api_gateway_model" 4 sidebar_current: "docs-aws-resource-api-gateway-model" 5 description: |- 6 Provides a Model for a API Gateway. 7 --- 8 9 # aws\_api\_gateway\_model 10 11 Provides a Model for a API Gateway. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_api_gateway_rest_api" "MyDemoAPI" { 17 name = "MyDemoAPI" 18 description = "This is my API for demonstration purposes" 19 } 20 21 resource "aws_api_gateway_model" "MyDemoModel" { 22 rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" 23 name = "user" 24 description = "a JSON schema" 25 content_type = "application/json" 26 schema = <<EOF 27 { 28 "type": "object" 29 } 30 EOF 31 } 32 ``` 33 34 ## Argument Reference 35 36 The following arguments are supported: 37 38 * `rest_api_id` - (Required) The ID of the associated REST API 39 * `name` - (Required) The name of the model 40 * `description` - (Optional) The description of the model 41 * `content_type` - (Required) The content type of the model 42 * `schema` - (Required) The schema of the model in a JSON form 43 44 ## Attributes Reference 45 46 The following attributes are exported: 47 48 * `id` - The ID of the model