Class CfnRequestValidator
The AWS::ApiGateway::RequestValidator
resource sets up basic validation rules for incoming requests to your API.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRequestValidator : CfnResource, IInspectable
Syntax (vb)
Public Class CfnRequestValidator
Inherits CfnResource
Implements IInspectable
Remarks
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
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
});
Synopsis
Constructors
CfnRequestValidator(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnRequestValidator(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnRequestValidator(Construct, String, ICfnRequestValidatorProps) |
Properties
AttrRequestValidatorId | The ID for the request validator. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Name | The name of this RequestValidator. |
RestApiId | The string identifier of the associated RestApi. |
ValidateRequestBody | A Boolean flag to indicate whether to validate a request body according to the configured Model schema. |
ValidateRequestParameters | A Boolean flag to indicate whether to validate request parameters ( |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnRequestValidator(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnRequestValidator(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnRequestValidator(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnRequestValidator(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnRequestValidator(Construct, String, ICfnRequestValidatorProps)
public CfnRequestValidator(Construct scope, string id, ICfnRequestValidatorProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnRequestValidatorProps
Resource properties.
Properties
AttrRequestValidatorId
The ID for the request validator.
public virtual string AttrRequestValidatorId { get; }
Property Value
System.String
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
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Name
The name of this RequestValidator.
public virtual string Name { get; set; }
Property Value
System.String
RestApiId
The string identifier of the associated RestApi.
public virtual string RestApiId { get; set; }
Property Value
System.String
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
System.Object
ValidateRequestParameters
A Boolean flag to indicate whether to validate request parameters ( true
) or not ( false
).
public virtual object ValidateRequestParameters { get; set; }
Property Value
System.Object
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 System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>