Manages an API Gateway Request Validator.
resource "aws_api_gateway_request_validator" "example" {
name = "example"
rest_api_id = aws_api_gateway_rest_api.example.id
validate_request_body = true
validate_request_parameters = true
}
This resource supports the following arguments:
name
- (Required) Name of the request validatorrest_api_id
- (Required) ID of the associated Rest APIvalidate_request_body
- (Optional) Boolean whether to validate request body. Defaults to false
.validate_request_parameters
- (Optional) Boolean whether to validate request parameters. Defaults to false
.This resource exports the following attributes in addition to the arguments above:
id
- Unique ID of the request validatorIn Terraform v1.5.0 and later, use an import
block to import aws_api_gateway_request_validator
using REST-API-ID/REQUEST-VALIDATOR-ID
. For example:
import {
to = aws_api_gateway_request_validator.example
id = "12345abcde/67890fghij"
}
Using terraform import
, import aws_api_gateway_request_validator
using REST-API-ID/REQUEST-VALIDATOR-ID
. For example:
% terraform import aws_api_gateway_request_validator.example 12345abcde/67890fghij