create_request_validator

create_request_validator(**kwargs)

Creates a RequestValidator of a given RestApi.

See also: AWS API Documentation

Request Syntax

response = client.create_request_validator(
    restApiId='string',
    name='string',
    validateRequestBody=True|False,
    validateRequestParameters=True|False
)
Parameters
  • restApiId (string) --

    [REQUIRED]

    The string identifier of the associated RestApi.

  • name (string) -- The name of the to-be-created RequestValidator.
  • validateRequestBody (boolean) -- A Boolean flag to indicate whether to validate request body according to the configured model schema for the method ( true ) or not ( false ).
  • validateRequestParameters (boolean) -- A Boolean flag to indicate whether to validate request parameters, true , or not false .
Return type

dict

Returns

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'validateRequestBody': True|False,
    'validateRequestParameters': True|False
}

Response Structure

  • (dict) --

    A set of validation rules for incoming Method requests.

    • id (string) --

      The identifier of this RequestValidator.

    • name (string) --

      The name of this RequestValidator

    • validateRequestBody (boolean) --

      A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

    • validateRequestParameters (boolean) --

      A Boolean flag to indicate whether to validate request parameters ( true ) or not ( false ).

Exceptions

  • APIGateway.Client.exceptions.BadRequestException
  • APIGateway.Client.exceptions.ConflictException
  • APIGateway.Client.exceptions.LimitExceededException
  • APIGateway.Client.exceptions.NotFoundException
  • APIGateway.Client.exceptions.UnauthorizedException
  • APIGateway.Client.exceptions.TooManyRequestsException