Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a ReqeustValidator of a given RestApi.
Synopsis
- data CreateRequestValidator = CreateRequestValidator' {}
- newCreateRequestValidator :: Text -> CreateRequestValidator
- createRequestValidator_validateRequestParameters :: Lens' CreateRequestValidator (Maybe Bool)
- createRequestValidator_name :: Lens' CreateRequestValidator (Maybe Text)
- createRequestValidator_validateRequestBody :: Lens' CreateRequestValidator (Maybe Bool)
- createRequestValidator_restApiId :: Lens' CreateRequestValidator Text
- data RequestValidator = RequestValidator' {}
- newRequestValidator :: RequestValidator
- requestValidator_validateRequestParameters :: Lens' RequestValidator (Maybe Bool)
- requestValidator_name :: Lens' RequestValidator (Maybe Text)
- requestValidator_validateRequestBody :: Lens' RequestValidator (Maybe Bool)
- requestValidator_id :: Lens' RequestValidator (Maybe Text)
Creating a Request
data CreateRequestValidator Source #
Creates a RequestValidator of a given RestApi.
See: newCreateRequestValidator
smart constructor.
CreateRequestValidator' | |
|
Instances
newCreateRequestValidator Source #
Create a value of CreateRequestValidator
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:validateRequestParameters:CreateRequestValidator'
, createRequestValidator_validateRequestParameters
- A Boolean flag to indicate whether to validate request parameters,
true
, or not false
.
$sel:name:CreateRequestValidator'
, createRequestValidator_name
- The name of the to-be-created RequestValidator.
$sel:validateRequestBody:CreateRequestValidator'
, createRequestValidator_validateRequestBody
- A Boolean flag to indicate whether to validate request body according to
the configured model schema for the method (true
) or not (false
).
$sel:restApiId:CreateRequestValidator'
, createRequestValidator_restApiId
- [Required] The string identifier of the associated RestApi.
Request Lenses
createRequestValidator_validateRequestParameters :: Lens' CreateRequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate request parameters,
true
, or not false
.
createRequestValidator_name :: Lens' CreateRequestValidator (Maybe Text) Source #
The name of the to-be-created RequestValidator.
createRequestValidator_validateRequestBody :: Lens' CreateRequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate request body according to
the configured model schema for the method (true
) or not (false
).
createRequestValidator_restApiId :: Lens' CreateRequestValidator Text Source #
- Required
- The string identifier of the associated RestApi.
Destructuring the Response
data RequestValidator Source #
A set of validation rules for incoming Method requests.
In OpenAPI, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator object. It the referenced using the x-amazon-apigateway-request-validator property.
Enable Basic Request Validation in API Gateway
See: newRequestValidator
smart constructor.
RequestValidator' | |
|
Instances
newRequestValidator :: RequestValidator Source #
Create a value of RequestValidator
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:validateRequestParameters:RequestValidator'
, requestValidator_validateRequestParameters
- A Boolean flag to indicate whether to validate request parameters
(true
) or not (false
).
$sel:name:RequestValidator'
, requestValidator_name
- The name of this RequestValidator
$sel:validateRequestBody:RequestValidator'
, requestValidator_validateRequestBody
- A Boolean flag to indicate whether to validate a request body according
to the configured Model schema.
$sel:id:RequestValidator'
, requestValidator_id
- The identifier of this RequestValidator.
Response Lenses
requestValidator_validateRequestParameters :: Lens' RequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate request parameters
(true
) or not (false
).
requestValidator_name :: Lens' RequestValidator (Maybe Text) Source #
The name of this RequestValidator
requestValidator_validateRequestBody :: Lens' RequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
requestValidator_id :: Lens' RequestValidator (Maybe Text) Source #
The identifier of this RequestValidator.