interface RequestValidatorProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.APIGateway.RequestValidatorProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#RequestValidatorProps |
![]() | software.amazon.awscdk.services.apigateway.RequestValidatorProps |
![]() | aws_cdk.aws_apigateway.RequestValidatorProps |
![]() | aws-cdk-lib » aws_apigateway » RequestValidatorProps |
Example
// 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
Name | Type | Description |
---|---|---|
rest | IRest | The rest API that this model is part of. |
request | string | The name of this request validator. |
validate | boolean | Indicates whether to validate the request body according to the configured schema for the targeted API and method. |
validate | boolean | Indicates whether to validate request parameters. |
restApi
Type:
IRest
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 it's hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.
requestValidatorName?
Type:
string
(optional, default: None)
The name of this request validator.
validateRequestBody?
Type:
boolean
(optional, default: false)
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
validateRequestParameters?
Type:
boolean
(optional, default: false)
Indicates whether to validate request parameters.