github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    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  
    27    schema = <<EOF
    28  {
    29    "type": "object"
    30  }
    31  EOF
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `rest_api_id` - (Required) The ID of the associated REST API
    40  * `name` - (Required) The name of the model
    41  * `description` - (Optional) The description of the model
    42  * `content_type` - (Required) The content type of the model
    43  * `schema` - (Required) The schema of the model in a JSON form
    44  
    45  ## Attributes Reference
    46  
    47  The following attributes are exported:
    48  
    49  * `id` - The ID of the model