| Copyright | (c) 2013-2018 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 |
Network.AWS.APIGateway.TestInvokeMethod
Description
Simulate the execution of a Method in your RestApi with headers, parameters, and an incoming request body.
- testInvokeMethod :: Text -> Text -> Text -> TestInvokeMethod
- data TestInvokeMethod
- timPathWithQueryString :: Lens' TestInvokeMethod (Maybe Text)
- timBody :: Lens' TestInvokeMethod (Maybe Text)
- timClientCertificateId :: Lens' TestInvokeMethod (Maybe Text)
- timStageVariables :: Lens' TestInvokeMethod (HashMap Text Text)
- timHeaders :: Lens' TestInvokeMethod (HashMap Text Text)
- timRestAPIId :: Lens' TestInvokeMethod Text
- timResourceId :: Lens' TestInvokeMethod Text
- timHttpMethod :: Lens' TestInvokeMethod Text
- testInvokeMethodResponse :: Int -> TestInvokeMethodResponse
- data TestInvokeMethodResponse
- timrsLog :: Lens' TestInvokeMethodResponse (Maybe Text)
- timrsStatus :: Lens' TestInvokeMethodResponse (Maybe Int)
- timrsBody :: Lens' TestInvokeMethodResponse (Maybe Text)
- timrsLatency :: Lens' TestInvokeMethodResponse (Maybe Integer)
- timrsHeaders :: Lens' TestInvokeMethodResponse (HashMap Text Text)
- timrsResponseStatus :: Lens' TestInvokeMethodResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> Text | |
| -> TestInvokeMethod |
Creates a value of TestInvokeMethod with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
timPathWithQueryString- The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.timBody- The simulated request body of an incoming invocation request.timClientCertificateId- AClientCertificateidentifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.timStageVariables- A key-value map of stage variables to simulate an invocation on a deployedStage.timHeaders- A key-value map of headers to simulate an incoming invocation request.timRestAPIId- [Required] The string identifier of the associatedRestApi.timResourceId- [Required] Specifies a test invoke method request's resource ID.timHttpMethod- [Required] Specifies a test invoke method request's HTTP method.
data TestInvokeMethod Source #
Make a request to simulate the execution of a Method .
See: testInvokeMethod smart constructor.
Instances
Request Lenses
timPathWithQueryString :: Lens' TestInvokeMethod (Maybe Text) Source #
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
timBody :: Lens' TestInvokeMethod (Maybe Text) Source #
The simulated request body of an incoming invocation request.
timClientCertificateId :: Lens' TestInvokeMethod (Maybe Text) Source #
A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
timStageVariables :: Lens' TestInvokeMethod (HashMap Text Text) Source #
A key-value map of stage variables to simulate an invocation on a deployed Stage .
timHeaders :: Lens' TestInvokeMethod (HashMap Text Text) Source #
A key-value map of headers to simulate an incoming invocation request.
timRestAPIId :: Lens' TestInvokeMethod Text Source #
- Required
- The string identifier of the associated
RestApi.
timResourceId :: Lens' TestInvokeMethod Text Source #
- Required
- Specifies a test invoke method request's resource ID.
timHttpMethod :: Lens' TestInvokeMethod Text Source #
- Required
- Specifies a test invoke method request's HTTP method.
Destructuring the Response
testInvokeMethodResponse Source #
Arguments
| :: Int | |
| -> TestInvokeMethodResponse |
Creates a value of TestInvokeMethodResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
timrsLog- The API Gateway execution log for the test invoke request.timrsStatus- The HTTP status code.timrsBody- The body of the HTTP response.timrsLatency- The execution latency of the test invoke request.timrsHeaders- The headers of the HTTP response.timrsResponseStatus- -- | The response status code.
data TestInvokeMethodResponse Source #
Represents the response of the test invoke request in the HTTP method.
Test API using the API Gateway console
See: testInvokeMethodResponse smart constructor.
Response Lenses
timrsLog :: Lens' TestInvokeMethodResponse (Maybe Text) Source #
The API Gateway execution log for the test invoke request.
timrsStatus :: Lens' TestInvokeMethodResponse (Maybe Int) Source #
The HTTP status code.
timrsLatency :: Lens' TestInvokeMethodResponse (Maybe Integer) Source #
The execution latency of the test invoke request.
timrsHeaders :: Lens' TestInvokeMethodResponse (HashMap Text Text) Source #
The headers of the HTTP response.
timrsResponseStatus :: Lens' TestInvokeMethodResponse Int Source #
- - | The response status code.