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 |
Gets the GatewayResponses
collection on the given RestApi
. If an API developer has not added any definitions for gateway responses, the result will be the Amazon API Gateway-generated default GatewayResponses
collection for the supported response types.
- getGatewayResponses :: Text -> GetGatewayResponses
- data GetGatewayResponses
- ggrLimit :: Lens' GetGatewayResponses (Maybe Int)
- ggrPosition :: Lens' GetGatewayResponses (Maybe Text)
- ggrRestAPIId :: Lens' GetGatewayResponses Text
- getGatewayResponsesResponse :: Int -> GetGatewayResponsesResponse
- data GetGatewayResponsesResponse
- ggrrsItems :: Lens' GetGatewayResponsesResponse [GatewayResponse]
- ggrrsPosition :: Lens' GetGatewayResponsesResponse (Maybe Text)
- ggrrsResponseStatus :: Lens' GetGatewayResponsesResponse Int
Creating a Request
Creates a value of GetGatewayResponses
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ggrLimit
- The maximum number of returned results per page. TheGatewayResponses
collection does not support pagination and the limit does not apply here.ggrPosition
- The current pagination position in the paged result set. TheGatewayResponse
collection does not support pagination and the position does not apply here.ggrRestAPIId
- The string identifier of the associatedRestApi
.
data GetGatewayResponses Source #
Gets the GatewayResponses
collection on the given RestApi
. If an API developer has not added any definitions for gateway responses, the result will be the Amazon API Gateway-generated default GatewayResponses
collection for the supported response types.
See: getGatewayResponses
smart constructor.
Request Lenses
ggrLimit :: Lens' GetGatewayResponses (Maybe Int) Source #
The maximum number of returned results per page. The GatewayResponses
collection does not support pagination and the limit does not apply here.
ggrPosition :: Lens' GetGatewayResponses (Maybe Text) Source #
The current pagination position in the paged result set. The GatewayResponse
collection does not support pagination and the position does not apply here.
ggrRestAPIId :: Lens' GetGatewayResponses Text Source #
The string identifier of the associated RestApi
.
Destructuring the Response
getGatewayResponsesResponse Source #
Creates a value of GetGatewayResponsesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ggrrsItems
- Returns the entire collection, because of no pagination support.ggrrsPosition
- Undocumented member.ggrrsResponseStatus
- -- | The response status code.
data GetGatewayResponsesResponse Source #
The collection of the GatewayResponse
instances of a RestApi
as a responseType
-to-GatewayResponse
object map of key-value pairs. As such, pagination is not supported for querying this collection.
For more information about valid gateway response types, see Gateway Response Types Supported by Amazon API Gateway Example: Get the collection of gateway responses of an API
Request
This example request shows how to retrieve the GatewayResponses
collection from an API.
@GET restapiso81lxiseflgatewayresponses HTTP1.1 Host: beta-apigateway.us-east-1.amazonaws.com Content-Type: applicationjson X-Amz-Date: 20170503T220604Z Authorization: AWS4-HMAC-SHA256 Credential={access-key-id}20170503us-east-1apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=59b42fe54a76a5de8adf2c67baa6d39206f8e9ad49a1d77ccc6a5da3103a398a Cache-Control: no-cache Postman-Token: 5637af27-dc29-fc5c-9dfe-0645d52cb515
@
Response
The successful operation returns the 200 OK
status code and a payload similar to the following:
@{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html", "name": "gatewayresponse", "templated": true }, "self": { "href": "restapiso81lxiseflgatewayresponses" }, "first": { "href": "restapiso81lxiseflgatewayresponses" }, "gatewayresponse:by-type": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "item": [ { "href": "restapiso81lxiseflgatewayresponsesINTEGRATION_FAILURE" }, { "href": "restapiso81lxiseflgatewayresponsesRESOURCE_NOT_FOUND" }, { "href": "restapiso81lxiseflgatewayresponsesREQUEST_TOO_LARGE" }, { "href": "restapiso81lxiseflgatewayresponsesTHROTTLED" }, { "href": "restapiso81lxiseflgatewayresponsesUNSUPPORTED_MEDIA_TYPE" }, { "href": "restapiso81lxiseflgatewayresponsesAUTHORIZER_CONFIGURATION_ERROR" }, { "href": "restapiso81lxiseflgatewayresponsesDEFAULT_5XX" }, { "href": "restapiso81lxiseflgatewayresponsesDEFAULT_4XX" }, { "href": "restapiso81lxiseflgatewayresponsesBAD_REQUEST_PARAMETERS" }, { "href": "restapiso81lxiseflgatewayresponsesBAD_REQUEST_BODY" }, { "href": "restapiso81lxiseflgatewayresponsesEXPIRED_TOKEN" }, { "href": "restapiso81lxiseflgatewayresponsesACCESS_DENIED" }, { "href": "restapiso81lxiseflgatewayresponsesINVALID_API_KEY" }, { "href": "restapiso81lxiseflgatewayresponsesUNAUTHORIZED" }, { "href": "restapiso81lxiseflgatewayresponsesAPI_CONFIGURATION_ERROR" }, { "href": "restapiso81lxiseflgatewayresponsesQUOTA_EXCEEDED" }, { "href": "restapiso81lxiseflgatewayresponsesINTEGRATION_TIMEOUT" }, { "href": "restapiso81lxiseflgatewayresponsesMISSING_AUTHENTICATION_TOKEN" }, { "href": "restapiso81lxiseflgatewayresponsesINVALID_SIGNATURE" }, { "href": "restapiso81lxiseflgatewayresponsesAUTHORIZER_FAILURE" } ] }, "_embedded": { "item": [ { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesINTEGRATION_FAILURE" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesINTEGRATION_FAILURE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": INTEGRATION_FAILURE, "statusCode": "504" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesRESOURCE_NOT_FOUND" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesRESOURCE_NOT_FOUND" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": RESOURCE_NOT_FOUND, "statusCode": "404" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesREQUEST_TOO_LARGE" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesREQUEST_TOO_LARGE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": REQUEST_TOO_LARGE, "statusCode": "413" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesTHROTTLED" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesTHROTTLED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": THROTTLED, "statusCode": "429" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesUNSUPPORTED_MEDIA_TYPE" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesUNSUPPORTED_MEDIA_TYPE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": UNSUPPORTED_MEDIA_TYPE, "statusCode": "415" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesAUTHORIZER_CONFIGURATION_ERROR" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesAUTHORIZER_CONFIGURATION_ERROR" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": AUTHORIZER_CONFIGURATION_ERROR, "statusCode": "500" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesDEFAULT_5XX" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesDEFAULT_5XX" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": DEFAULT_5XX }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesDEFAULT_4XX" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesDEFAULT_4XX" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": DEFAULT_4XX }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesBAD_REQUEST_PARAMETERS" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesBAD_REQUEST_PARAMETERS" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": BAD_REQUEST_PARAMETERS, "statusCode": "400" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesBAD_REQUEST_BODY" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesBAD_REQUEST_BODY" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": BAD_REQUEST_BODY, "statusCode": "400" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesEXPIRED_TOKEN" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesEXPIRED_TOKEN" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": EXPIRED_TOKEN, "statusCode": "403" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesACCESS_DENIED" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesACCESS_DENIED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": ACCESS_DENIED, "statusCode": "403" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesINVALID_API_KEY" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesINVALID_API_KEY" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": INVALID_API_KEY, "statusCode": "403" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesUNAUTHORIZED" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesUNAUTHORIZED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": UNAUTHORIZED, "statusCode": "401" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesAPI_CONFIGURATION_ERROR" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesAPI_CONFIGURATION_ERROR" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": API_CONFIGURATION_ERROR, "statusCode": "500" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesQUOTA_EXCEEDED" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesQUOTA_EXCEEDED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": QUOTA_EXCEEDED, "statusCode": "429" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesINTEGRATION_TIMEOUT" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesINTEGRATION_TIMEOUT" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": INTEGRATION_TIMEOUT, "statusCode": "504" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesMISSING_AUTHENTICATION_TOKEN" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesMISSING_AUTHENTICATION_TOKEN" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": MISSING_AUTHENTICATION_TOKEN, "statusCode": "403" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesINVALID_SIGNATURE" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesINVALID_SIGNATURE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": INVALID_SIGNATURE, "statusCode": "403" }, { "_links": { "self": { "href": "restapiso81lxiseflgatewayresponsesAUTHORIZER_FAILURE" }, "gatewayresponse:put": { "href": "restapiso81lxiseflgatewayresponses{response_type}", "templated": true }, "gatewayresponse:update": { "href": "restapiso81lxiseflgatewayresponsesAUTHORIZER_FAILURE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "applicationjson": "{"message":$context.error.messageString}" }, "responseType": AUTHORIZER_FAILURE, "statusCode": "500" } ] } }
@
See: getGatewayResponsesResponse
smart constructor.
Response Lenses
ggrrsItems :: Lens' GetGatewayResponsesResponse [GatewayResponse] Source #
Returns the entire collection, because of no pagination support.
ggrrsPosition :: Lens' GetGatewayResponsesResponse (Maybe Text) Source #
Undocumented member.
ggrrsResponseStatus :: Lens' GetGatewayResponsesResponse Int Source #
- - | The response status code.