Class CfnRequestValidator

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:11.808Z") @Stability(Stable) public class CfnRequestValidator extends CfnResource implements IInspectable
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 .

Example:

 // 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.*;
 CfnRequestValidator cfnRequestValidator = CfnRequestValidator.Builder.create(this, "MyCfnRequestValidator")
         .restApiId("restApiId")
         // the properties below are optional
         .name("name")
         .validateRequestBody(false)
         .validateRequestParameters(false)
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnRequestValidator

      protected CfnRequestValidator(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRequestValidator

      protected CfnRequestValidator(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRequestValidator

      @Stability(Stable) public CfnRequestValidator(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRequestValidatorProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrRequestValidatorId

      @Stability(Stable) @NotNull public String getAttrRequestValidatorId()
      The ID for the request validator.

      For example: abc123 .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getRestApiId

      @Stability(Stable) @NotNull public String getRestApiId()
      The string identifier of the associated RestApi.
    • setRestApiId

      @Stability(Stable) public void setRestApiId(@NotNull String value)
      The string identifier of the associated RestApi.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of this RequestValidator.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of this RequestValidator.
    • getValidateRequestBody

      @Stability(Stable) @Nullable public Object getValidateRequestBody()
      A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
    • setValidateRequestBody

      @Stability(Stable) public void setValidateRequestBody(@Nullable Boolean value)
      A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
    • setValidateRequestBody

      @Stability(Stable) public void setValidateRequestBody(@Nullable IResolvable value)
      A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
    • getValidateRequestParameters

      @Stability(Stable) @Nullable public Object getValidateRequestParameters()
      A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
    • setValidateRequestParameters

      @Stability(Stable) public void setValidateRequestParameters(@Nullable Boolean value)
      A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).
    • setValidateRequestParameters

      @Stability(Stable) public void setValidateRequestParameters(@Nullable IResolvable value)
      A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).