github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/api_gateway_method.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_api_gateway_method" 4 sidebar_current: "docs-aws-resource-api-gateway-method" 5 description: |- 6 Provides a HTTP Method for an API Gateway Resource. 7 --- 8 9 # aws\_api\_gateway\_method 10 11 Provides a HTTP Method for an API Gateway Resource. 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_resource" "MyDemoResource" { 22 rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" 23 parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}" 24 path_part = "mydemoresource" 25 } 26 27 resource "aws_api_gateway_method" "MyDemoMethod" { 28 rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" 29 resource_id = "${aws_api_gateway_resource.MyDemoResource.id}" 30 http_method = "GET" 31 authorization = "NONE" 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 * `resource_id` - (Required) The API resource ID 41 * `http_method` - (Required) The HTTP Method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`, `ANY`) 42 * `authorization` - (Required) The type of authorization used for the method (`NONE`, `CUSTOM`) 43 * `authorizer_id` - (Optional) The authorizer id to be used when the authorization is `CUSTOM` 44 * `api_key_required` - (Optional) Specify if the method requires an API key 45 * `request_models` - (Optional) A map of the API models used for the request's content type 46 where key is the content type (e.g. `application/json`) 47 and value is either `Error`, `Empty` (built-in models) or `aws_api_gateway_model`'s `name`. 48 * `request_parameters` - (Optional) A map of request query string parameters and headers that should be passed to the integration. 49 For example: `request_parameters = { "method.request.header.X-Some-Header" = true }` 50 would define that the header `X-Some-Header` must be provided on the request. 51 * `request_parameters_in_json` - **Deprecated**, use `request_parameters` instead.