Class RequestValidatorProps
Inheritance
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RequestValidatorProps : Object, IRequestValidatorProps, IRequestValidatorOptions
Syntax (vb)
Public Class RequestValidatorProps
Inherits Object
Implements IRequestValidatorProps, IRequestValidatorOptions
Remarks
ExampleMetadata: fixture=_generated
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
};
Synopsis
Constructors
RequestValidatorProps() |
Properties
RequestValidatorName | The name of this request validator. |
RestApi | The rest API that this model is part of. |
ValidateRequestBody | Indicates whether to validate the request body according to the configured schema for the targeted API and method. |
ValidateRequestParameters | Indicates whether to validate request parameters. |
Constructors
RequestValidatorProps()
public RequestValidatorProps()
Properties
RequestValidatorName
The name of this request validator.
public string RequestValidatorName { get; set; }
Property Value
System.String
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 Nullable<bool> ValidateRequestBody { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
ValidateRequestParameters
Indicates whether to validate request parameters.
public Nullable<bool> ValidateRequestParameters { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false