Class CfnRequestValidator

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.856Z") @Stability(Stable) public class CfnRequestValidator extends CfnResource implements IInspectable
A CloudFormation AWS::ApiGateway::RequestValidator.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnRequestValidatorProps props)
      Create a new AWS::ApiGateway::RequestValidator.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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 ).