# CfnRequestValidatorProps

Properties for defining a `CfnRequestValidator`.

Used as props by: [CfnRequestValidator](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.CfnRequestValidator.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```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';
const cfnRequestValidatorProps: apigateway.CfnRequestValidatorProps = {
  restApiId: 'restApiId',

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

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway

cfn_request_validator_props = apigateway.CfnRequestValidatorProps(
    rest_api_id="restApiId",

    # the properties below are optional
    name="name",
    validate_request_body=False,
    validate_request_parameters=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;

CfnRequestValidatorProps cfnRequestValidatorProps = CfnRequestValidatorProps.builder()
        .restApiId("restApiId")

        // the properties below are optional
        .name("name")
        .validateRequestBody(false)
        .validateRequestParameters(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;

var cfnRequestValidatorProps = new CfnRequestValidatorProps {
    RestApiId = "restApiId",

    // the properties below are optional
    Name = "name",
    ValidateRequestBody = false,
    ValidateRequestParameters = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnRequestValidatorProps := &CfnRequestValidatorProps{
	RestApiId: jsii.String("restApiId"),

	// the properties below are optional
	Name: jsii.String("name"),
	ValidateRequestBody: jsii.Boolean(false),
	ValidateRequestParameters: jsii.Boolean(false),
}
```

## Properties

- `name`: string — The name of this RequestValidator.

- `restApiId`: string | [IRestApiRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_apigateway.IRestApiRef.html) (required) — The string identifier of the associated RestApi.

- `validateRequestBody`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

- `validateRequestParameters`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A Boolean flag to indicate whether to validate request parameters ( `true` ) or not ( `false` ).
