Files
opentf/website/source/docs/providers/aws/r/api_gateway_model.html.markdown
George Christou 61277c0dbd website/docs: Run terraform fmt on code examples (#12075)
* docs/vsphere: Fix code block

* docs: Convert `...` to `# ...` to allow `terraform fmt`ing

* docs: Trim trailing whitespace

* docs: First-pass run of `terraform fmt` on code examples
2017-02-19 00:48:50 +02:00

1.1 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_api_gateway_model docs-aws-resource-api-gateway-model Provides a Model for a API Gateway.

aws_api_gateway_model

Provides a Model for a API Gateway.

Example Usage

resource "aws_api_gateway_rest_api" "MyDemoAPI" {
  name        = "MyDemoAPI"
  description = "This is my API for demonstration purposes"
}

resource "aws_api_gateway_model" "MyDemoModel" {
  rest_api_id  = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
  name         = "user"
  description  = "a JSON schema"
  content_type = "application/json"

  schema = <<EOF
{
  "type": "object"
}
EOF
}

Argument Reference

The following arguments are supported:

  • rest_api_id - (Required) The ID of the associated REST API
  • name - (Required) The name of the model
  • description - (Optional) The description of the model
  • content_type - (Required) The content type of the model
  • schema - (Required) The schema of the model in a JSON form

Attributes Reference

The following attributes are exported:

  • id - The ID of the model