Class RequestValidatorProps
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public class RequestValidatorProps : IRequestValidatorProps, IRequestValidatorOptions
- Inheritance
-
RequestValidatorProps
- Implements
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
RestApi restApi;
var requestValidatorProps = new RequestValidatorProps {
RestApi = restApi,
// the properties below are optional
RequestValidatorName = "requestValidatorName",
ValidateRequestBody = false,
ValidateRequestParameters = false
};
Remarks
ExampleMetadata: fixture=_generated
Constructors
RequestValidatorProps()
public RequestValidatorProps()
Properties
RequestValidatorName
The name of this request validator.
public string? RequestValidatorName { get; set; }
Property Value
Remarks
Default: None
RestApi
The rest API that this model is part of.
public IRestApi RestApi { get; set; }
Property Value
Remarks
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.
ValidateRequestBody
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
public bool? ValidateRequestBody { get; set; }
Property Value
- bool?
Remarks
Default: false
ValidateRequestParameters
Indicates whether to validate request parameters.
public bool? ValidateRequestParameters { get; set; }
Property Value
- bool?
Remarks
Default: false