# RequestValidatorProps

Extends: RequestValidatorProps
Extends: RequestValidatorOptions

- Source: [`aws-apigateway/lib/requestvalidator.ts`](https://github.com/aws/aws-cdk/blob/v2.273.0/packages/aws-cdk-lib/aws-apigateway/lib/requestvalidator.ts#L44)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';

declare const restApi: apigateway.RestApi;
const requestValidatorProps: apigateway.RequestValidatorProps = {
  restApi: restApi,

  // the properties below are optional
  requestValidatorName: 'requestValidatorName',
  validateRequestBody: false,
  validateRequestParameters: false,
};
```

## Properties

- `requestValidatorName`: string = None — The name of this request validator.

- `restApi`: [IRestApi](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IRestApi.html) (required) — The rest API that this model is part of.

  The reason we need the RestApi object itself and not just the ID is because the model
  is being tracked by the top-level RestApi object for the purpose of calculating its
  hash to determine the ID of the deployment. This allows us to automatically update
  the deployment when the model of the REST API changes.

- `validateRequestBody`: boolean = false — Indicates whether to validate the request body according to the configured schema for the targeted API and method.

- `validateRequestParameters`: boolean = false — Indicates whether to validate request parameters.

## Used as props by

- [`RequestValidator`](/v2/docs/aws-cdk-lib.aws_apigateway.RequestValidator)
