Class CfnRequestValidator
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
A CloudFormation AWS::ApiGateway::RequestValidator
.
public class CfnRequestValidator : CfnResource, IInspectable
- Inheritance
-
CfnRequestValidator
- Implements
-
IInspectable
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;
var cfnRequestValidator = new CfnRequestValidator(this, "MyCfnRequestValidator", new CfnRequestValidatorProps {
RestApiId = "restApiId",
// the properties below are optional
Name = "name",
ValidateRequestBody = false,
ValidateRequestParameters = false
});
Remarks
The AWS::ApiGateway::RequestValidator
resource sets up basic validation rules for incoming requests to your API. For more information, see Enable Basic Request Validation for an API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGateway::RequestValidator
ExampleMetadata: fixture=_generated
Constructors
CfnRequestValidator(Construct, string, ICfnRequestValidatorProps)
Create a new AWS::ApiGateway::RequestValidator
.
public CfnRequestValidator(Construct scope, string id, ICfnRequestValidatorProps props)
Parameters
scope
Construct- scope in which this resource is defined.
id
string- scoped id of the resource.
props
ICfnRequestValidatorProps- resource properties.
Properties
AttrRequestValidatorId
The ID for the request validator.
public virtual string AttrRequestValidatorId { get; }
Property Value
Remarks
For example: abc123
.
CloudformationAttribute: RequestValidatorId
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Name
The name of this RequestValidator.
public virtual string? Name { get; set; }
Property Value
Remarks
RestApiId
The string identifier of the associated RestApi.
public virtual string RestApiId { get; set; }
Property Value
Remarks
ValidateRequestBody
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
public virtual object? ValidateRequestBody { get; set; }
Property Value
Remarks
ValidateRequestParameters
A Boolean flag to indicate whether to validate request parameters ( true
) or not ( false
).
public virtual object? ValidateRequestParameters { get; set; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
inspector
TreeInspector- tree inspector to collect and process attributes.
RenderProperties(IDictionary<string, object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props
IDictionary<string, object>