mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-01-21 08:00:49 -05:00
This commit adds a new HTTP method to a list of valid HTTP methods which is now accepted by API Gateway. Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2.0 KiB
2.0 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_api_gateway_method | docs-aws-resource-api-gateway-method | Provides a HTTP Method for an API Gateway Resource. |
aws_api_gateway_method
Provides a HTTP Method for an API Gateway Resource.
Example Usage
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI"
description = "This is my API for demonstration purposes"
}
resource "aws_api_gateway_resource" "MyDemoResource" {
rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}"
path_part = "mydemoresource"
}
resource "aws_api_gateway_method" "MyDemoMethod" {
rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
resource_id = "${aws_api_gateway_resource.MyDemoResource.id}"
http_method = "GET"
authorization = "NONE"
}
Argument Reference
The following arguments are supported:
rest_api_id- (Required) The ID of the associated REST APIresource_id- (Required) The API resource IDhttp_method- (Required) The HTTP Method (GET,POST,PUT,DELETE,HEAD,OPTION,ANY)authorization- (Required) The type of authorization used for the method (NONE,CUSTOM)authorizer_id- (Optional) The authorizer id to be used when the authorization isCUSTOMapi_key_required- (Optional) Specify if the method requires an API keyrequest_models- (Optional) A map of the API models used for the request's content type where key is the content type (e.g.application/json) and value is eitherError,Empty(built-in models) oraws_api_gateway_model'sname.request_parameters- (Optional) A map of request query string parameters and headers that should be passed to the integration. For example:request_parameters = { "method.request.header.X-Some-Header" = true }would define that the headerX-Some-Headermust be provided on the request.request_parameters_in_json- Deprecated, userequest_parametersinstead.