Skip to main content

request_validators

Creates, updates, deletes or gets a request_validator resource or lists request_validators in a region

Overview

Namerequest_validators
TypeResource
DescriptionThe 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](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) in the *API Gateway Developer Guide*.
Idaws.apigateway.request_validators

Fields

NameDatatypeDescription
request_validator_idstring
namestringThe name of this RequestValidator
rest_api_idstringThe string identifier of the associated RestApi.
validate_request_bodybooleanA Boolean flag to indicate whether to validate a request body according to the configured Model schema.
validate_request_parametersbooleanA Boolean flag to indicate whether to validate request parameters (true) or not (false).
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTRestApiId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all request_validators in a region.

SELECT
region,
request_validator_id,
name,
rest_api_id,
validate_request_body,
validate_request_parameters
FROM aws.apigateway.request_validators
WHERE region = 'us-east-1';

Gets all properties from an individual request_validator.

SELECT
region,
request_validator_id,
name,
rest_api_id,
validate_request_body,
validate_request_parameters
FROM aws.apigateway.request_validators
WHERE region = 'us-east-1' AND data__Identifier = '<RestApiId>|<RequestValidatorId>';

INSERT example

Use the following StackQL query and manifest file to create a new request_validator resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apigateway.request_validators (
RestApiId,
region
)
SELECT
'{{ RestApiId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigateway.request_validators
WHERE data__Identifier = '<RestApiId|RequestValidatorId>'
AND region = 'us-east-1';

Permissions

To operate on the request_validators resource, the following permissions are required:

Create

apigateway:POST,
apigateway:GET

Update

apigateway:PATCH,
apigateway:GET

Delete

apigateway:DELETE

Read

apigateway:GET

List

apigateway:GET