Skip to content
v2.278.0

CfnRequestValidatorProps Struct ​

Properties for defining a CfnRequestValidator.

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

  // the properties below are optional
  name: 'name',
  validateRequestBody: false,
  validateRequestParameters: false,
};
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
// 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();
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
};
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 ​

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
The name of this RequestValidator.
restApiIdstring | IRestApiRefrest_api_idtyping.Union[str, IRestApiRef]restApiIdStringRestApiIdstringRestApiIdinterface{} required #
The string identifier of the associated RestApi.
validateRequestBodyoptionalboolean | IResolvablevalidate_request_bodyoptionaltyping.Union[bool, IResolvable]validateRequestBodyoptionalBooleanValidateRequestBodyoptionalboolValidateRequestBodyoptionalinterface{} #
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
validateRequestParametersoptionalboolean | IResolvablevalidate_request_parametersoptionaltyping.Union[bool, IResolvable]validateRequestParametersoptionalBooleanValidateRequestParametersoptionalboolValidateRequestParametersoptionalinterface{} #
A Boolean flag to indicate whether to validate request parameters ( `true` ) or not ( `false` ).