Class RequestValidator.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.RequestValidator.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<RequestValidator>
Enclosing class:
RequestValidator

@Stability(Stable) public static final class RequestValidator.Builder extends Object implements software.amazon.jsii.Builder<RequestValidator>
A fluent builder for RequestValidator.
  • Method Details

    • create

      @Stability(Stable) public static RequestValidator.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of RequestValidator.Builder.
    • requestValidatorName

      @Stability(Stable) public RequestValidator.Builder requestValidatorName(String requestValidatorName)
      The name of this request validator.

      Default: None

      Parameters:
      requestValidatorName - The name of this request validator. This parameter is required.
      Returns:
      this
    • validateRequestBody

      @Stability(Stable) public RequestValidator.Builder validateRequestBody(Boolean validateRequestBody)
      Indicates whether to validate the request body according to the configured schema for the targeted API and method.

      Default: false

      Parameters:
      validateRequestBody - Indicates whether to validate the request body according to the configured schema for the targeted API and method. This parameter is required.
      Returns:
      this
    • validateRequestParameters

      @Stability(Stable) public RequestValidator.Builder validateRequestParameters(Boolean validateRequestParameters)
      Indicates whether to validate request parameters.

      Default: false

      Parameters:
      validateRequestParameters - Indicates whether to validate request parameters. This parameter is required.
      Returns:
      this
    • restApi

      @Stability(Stable) public RequestValidator.Builder restApi(IRestApi restApi)
      The rest API that this model is part of.

      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.

      Parameters:
      restApi - The rest API that this model is part of. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public RequestValidator build()
      Specified by:
      build in interface software.amazon.jsii.Builder<RequestValidator>
      Returns:
      a newly built instance of RequestValidator.