The AWS::ApiGateway::RequestValidator
resource sets up basic validation rules for incoming requests to your API. For more information, see Enable Basic Request Validation for an API in API Gateway in the API Gateway Developer Guide.
To create API Gateway Request Validator
resource "awscc_apigateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI"
description = "This is my API for demonstration purposes"
}
resource "awscc_apigateway_request_validator" "example" {
name = "example"
rest_api_id = awscc_apigateway_rest_api.MyDemoAPI.id
validate_request_body = true
validate_request_parameters = true
}
rest_api_id
(String) The string identifier of the associated RestApi.name
(String) The name of this RequestValidatorvalidate_request_body
(Boolean) A Boolean flag to indicate whether to validate a request body according to the configured Model schema.validate_request_parameters
(Boolean) A Boolean flag to indicate whether to validate request parameters (true
) or not (false
).id
(String) Uniquely identifies the resource.request_validator_id
(String)Import is supported using the following syntax:
$ terraform import awscc_apigateway_request_validator.example <resource ID>