| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.APIGateway.PutGatewayResponse
Description
Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.
Synopsis
- data PutGatewayResponse = PutGatewayResponse' {}
- newPutGatewayResponse :: Text -> GatewayResponseType -> PutGatewayResponse
- putGatewayResponse_responseParameters :: Lens' PutGatewayResponse (Maybe (HashMap Text Text))
- putGatewayResponse_responseTemplates :: Lens' PutGatewayResponse (Maybe (HashMap Text Text))
- putGatewayResponse_statusCode :: Lens' PutGatewayResponse (Maybe Text)
- putGatewayResponse_restApiId :: Lens' PutGatewayResponse Text
- putGatewayResponse_responseType :: Lens' PutGatewayResponse GatewayResponseType
- data GatewayResponse = GatewayResponse' {}
- newGatewayResponse :: GatewayResponse
- gatewayResponse_defaultResponse :: Lens' GatewayResponse (Maybe Bool)
- gatewayResponse_responseParameters :: Lens' GatewayResponse (Maybe (HashMap Text Text))
- gatewayResponse_responseTemplates :: Lens' GatewayResponse (Maybe (HashMap Text Text))
- gatewayResponse_responseType :: Lens' GatewayResponse (Maybe GatewayResponseType)
- gatewayResponse_statusCode :: Lens' GatewayResponse (Maybe Text)
Creating a Request
data PutGatewayResponse Source #
Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.
See: newPutGatewayResponse smart constructor.
Constructors
| PutGatewayResponse' | |
Fields
| |
Instances
newPutGatewayResponse Source #
Create a value of PutGatewayResponse 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:
PutGatewayResponse, putGatewayResponse_responseParameters - Response parameters (paths, query strings and headers) of the
GatewayResponse as a string-to-string map of key-value pairs.
PutGatewayResponse, putGatewayResponse_responseTemplates - Response templates of the GatewayResponse as a string-to-string map of
key-value pairs.
PutGatewayResponse, putGatewayResponse_statusCode - The HTTP status code of the GatewayResponse.
PutGatewayResponse, putGatewayResponse_restApiId - The string identifier of the associated RestApi.
PutGatewayResponse, putGatewayResponse_responseType - The response type of the associated GatewayResponse
Request Lenses
putGatewayResponse_responseParameters :: Lens' PutGatewayResponse (Maybe (HashMap Text Text)) Source #
Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.
putGatewayResponse_responseTemplates :: Lens' PutGatewayResponse (Maybe (HashMap Text Text)) Source #
Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
putGatewayResponse_statusCode :: Lens' PutGatewayResponse (Maybe Text) Source #
The HTTP status code of the GatewayResponse.
putGatewayResponse_restApiId :: Lens' PutGatewayResponse Text Source #
The string identifier of the associated RestApi.
putGatewayResponse_responseType :: Lens' PutGatewayResponse GatewayResponseType Source #
The response type of the associated GatewayResponse
Destructuring the Response
data GatewayResponse Source #
A gateway response of a given response type and status code, with optional response parameters and mapping templates.
See: newGatewayResponse smart constructor.
Constructors
| GatewayResponse' | |
Fields
| |
Instances
newGatewayResponse :: GatewayResponse Source #
Create a value of GatewayResponse 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:defaultResponse:GatewayResponse', gatewayResponse_defaultResponse - A Boolean flag to indicate whether this GatewayResponse is the default
gateway response (true) or not (false). A default gateway response
is one generated by API Gateway without any customization by an API
developer.
$sel:responseParameters:GatewayResponse', gatewayResponse_responseParameters - Response parameters (paths, query strings and headers) of the
GatewayResponse as a string-to-string map of key-value pairs.
$sel:responseTemplates:GatewayResponse', gatewayResponse_responseTemplates - Response templates of the GatewayResponse as a string-to-string map of
key-value pairs.
$sel:responseType:GatewayResponse', gatewayResponse_responseType - The response type of the associated GatewayResponse.
$sel:statusCode:GatewayResponse', gatewayResponse_statusCode - The HTTP status code for this GatewayResponse.
Response Lenses
gatewayResponse_defaultResponse :: Lens' GatewayResponse (Maybe Bool) Source #
A Boolean flag to indicate whether this GatewayResponse is the default
gateway response (true) or not (false). A default gateway response
is one generated by API Gateway without any customization by an API
developer.
gatewayResponse_responseParameters :: Lens' GatewayResponse (Maybe (HashMap Text Text)) Source #
Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.
gatewayResponse_responseTemplates :: Lens' GatewayResponse (Maybe (HashMap Text Text)) Source #
Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
gatewayResponse_responseType :: Lens' GatewayResponse (Maybe GatewayResponseType) Source #
The response type of the associated GatewayResponse.
gatewayResponse_statusCode :: Lens' GatewayResponse (Maybe Text) Source #
The HTTP status code for this GatewayResponse.