Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
Creates a ReqeustValidator
of a given RestApi
.
- createRequestValidator :: Text -> CreateRequestValidator
- data CreateRequestValidator
- crvValidateRequestParameters :: Lens' CreateRequestValidator (Maybe Bool)
- crvName :: Lens' CreateRequestValidator (Maybe Text)
- crvValidateRequestBody :: Lens' CreateRequestValidator (Maybe Bool)
- crvRestAPIId :: Lens' CreateRequestValidator Text
- requestValidator :: RequestValidator
- data RequestValidator
- rvValidateRequestParameters :: Lens' RequestValidator (Maybe Bool)
- rvName :: Lens' RequestValidator (Maybe Text)
- rvValidateRequestBody :: Lens' RequestValidator (Maybe Bool)
- rvId :: Lens' RequestValidator (Maybe Text)
Creating a Request
createRequestValidator Source #
Creates a value of CreateRequestValidator
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
crvValidateRequestParameters
- A Boolean flag to indicate whether to validate request parameters,true
, or notfalse
.crvName
- The name of the to-be-createdRequestValidator
.crvValidateRequestBody
- A Boolean flag to indicate whether to validate request body according to the configured model schema for the method (true
) or not (false
).crvRestAPIId
- The string identifier of the associatedRestApi
.
data CreateRequestValidator Source #
Creates a RequestValidator
of a given RestApi
.
See: createRequestValidator
smart constructor.
Request Lenses
crvValidateRequestParameters :: Lens' CreateRequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate request parameters, true
, or not false
.
crvName :: Lens' CreateRequestValidator (Maybe Text) Source #
The name of the to-be-created RequestValidator
.
crvValidateRequestBody :: 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
).
crvRestAPIId :: Lens' CreateRequestValidator Text Source #
The string identifier of the associated RestApi
.
Destructuring the Response
requestValidator :: RequestValidator Source #
Creates a value of RequestValidator
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rvValidateRequestParameters
- A Boolean flag to indicate whether to validate request parameters (true
) or not (false
).rvName
- The name of thisRequestValidator
rvValidateRequestBody
- A Boolean flag to indicate whether to validate a request body according to the configuredModel
schema.rvId
- The identifier of thisRequestValidator
.
data RequestValidator Source #
A set of validation rules for incoming Method
requests.
In Swagger, 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: requestValidator
smart constructor.
Response Lenses
rvValidateRequestParameters :: Lens' RequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate request parameters (true
) or not (false
).
rvName :: Lens' RequestValidator (Maybe Text) Source #
The name of this RequestValidator
rvValidateRequestBody :: Lens' RequestValidator (Maybe Bool) Source #
A Boolean flag to indicate whether to validate a request body according to the configured Model
schema.
rvId :: Lens' RequestValidator (Maybe Text) Source #
The identifier of this RequestValidator
.