| 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.TestInvokeMethod
Description
Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body.
Synopsis
- data TestInvokeMethod = TestInvokeMethod' {
- body :: Maybe Text
- clientCertificateId :: Maybe Text
- headers :: Maybe (HashMap Text Text)
- multiValueHeaders :: Maybe (HashMap Text [Text])
- pathWithQueryString :: Maybe Text
- stageVariables :: Maybe (HashMap Text Text)
- restApiId :: Text
- resourceId :: Text
- httpMethod :: Text
- newTestInvokeMethod :: Text -> Text -> Text -> TestInvokeMethod
- testInvokeMethod_body :: Lens' TestInvokeMethod (Maybe Text)
- testInvokeMethod_clientCertificateId :: Lens' TestInvokeMethod (Maybe Text)
- testInvokeMethod_headers :: Lens' TestInvokeMethod (Maybe (HashMap Text Text))
- testInvokeMethod_multiValueHeaders :: Lens' TestInvokeMethod (Maybe (HashMap Text [Text]))
- testInvokeMethod_pathWithQueryString :: Lens' TestInvokeMethod (Maybe Text)
- testInvokeMethod_stageVariables :: Lens' TestInvokeMethod (Maybe (HashMap Text Text))
- testInvokeMethod_restApiId :: Lens' TestInvokeMethod Text
- testInvokeMethod_resourceId :: Lens' TestInvokeMethod Text
- testInvokeMethod_httpMethod :: Lens' TestInvokeMethod Text
- data TestInvokeMethodResponse = TestInvokeMethodResponse' {}
- newTestInvokeMethodResponse :: Int -> TestInvokeMethodResponse
- testInvokeMethodResponse_body :: Lens' TestInvokeMethodResponse (Maybe Text)
- testInvokeMethodResponse_headers :: Lens' TestInvokeMethodResponse (Maybe (HashMap Text Text))
- testInvokeMethodResponse_latency :: Lens' TestInvokeMethodResponse (Maybe Integer)
- testInvokeMethodResponse_log :: Lens' TestInvokeMethodResponse (Maybe Text)
- testInvokeMethodResponse_multiValueHeaders :: Lens' TestInvokeMethodResponse (Maybe (HashMap Text [Text]))
- testInvokeMethodResponse_status :: Lens' TestInvokeMethodResponse (Maybe Int)
- testInvokeMethodResponse_httpStatus :: Lens' TestInvokeMethodResponse Int
Creating a Request
data TestInvokeMethod Source #
Make a request to simulate the invocation of a Method.
See: newTestInvokeMethod smart constructor.
Constructors
| TestInvokeMethod' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> Text | |
| -> TestInvokeMethod |
Create a value of TestInvokeMethod 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:
TestInvokeMethod, testInvokeMethod_body - The simulated request body of an incoming invocation request.
TestInvokeMethod, testInvokeMethod_clientCertificateId - 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.
TestInvokeMethod, testInvokeMethod_headers - A key-value map of headers to simulate an incoming invocation request.
TestInvokeMethod, testInvokeMethod_multiValueHeaders - The headers as a map from string to list of values to simulate an
incoming invocation request.
$sel:pathWithQueryString:TestInvokeMethod', testInvokeMethod_pathWithQueryString - The URI path, including query string, of the simulated invocation
request. Use this to specify path parameters and query string
parameters.
$sel:stageVariables:TestInvokeMethod', testInvokeMethod_stageVariables - A key-value map of stage variables to simulate an invocation on a
deployed Stage.
TestInvokeMethod, testInvokeMethod_restApiId - The string identifier of the associated RestApi.
$sel:resourceId:TestInvokeMethod', testInvokeMethod_resourceId - Specifies a test invoke method request's resource ID.
TestInvokeMethod, testInvokeMethod_httpMethod - Specifies a test invoke method request's HTTP method.
Request Lenses
testInvokeMethod_body :: Lens' TestInvokeMethod (Maybe Text) Source #
The simulated request body of an incoming invocation request.
testInvokeMethod_clientCertificateId :: 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.
testInvokeMethod_headers :: Lens' TestInvokeMethod (Maybe (HashMap Text Text)) Source #
A key-value map of headers to simulate an incoming invocation request.
testInvokeMethod_multiValueHeaders :: Lens' TestInvokeMethod (Maybe (HashMap Text [Text])) Source #
The headers as a map from string to list of values to simulate an incoming invocation request.
testInvokeMethod_pathWithQueryString :: 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.
testInvokeMethod_stageVariables :: Lens' TestInvokeMethod (Maybe (HashMap Text Text)) Source #
A key-value map of stage variables to simulate an invocation on a deployed Stage.
testInvokeMethod_restApiId :: Lens' TestInvokeMethod Text Source #
The string identifier of the associated RestApi.
testInvokeMethod_resourceId :: Lens' TestInvokeMethod Text Source #
Specifies a test invoke method request's resource ID.
testInvokeMethod_httpMethod :: Lens' TestInvokeMethod Text Source #
Specifies a test invoke method request's HTTP method.
Destructuring the Response
data TestInvokeMethodResponse Source #
Represents the response of the test invoke request in the HTTP method.
See: newTestInvokeMethodResponse smart constructor.
Constructors
| TestInvokeMethodResponse' | |
Fields
| |
Instances
newTestInvokeMethodResponse Source #
Create a value of TestInvokeMethodResponse 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:
TestInvokeMethod, testInvokeMethodResponse_body - The body of the HTTP response.
TestInvokeMethod, testInvokeMethodResponse_headers - The headers of the HTTP response.
$sel:latency:TestInvokeMethodResponse', testInvokeMethodResponse_latency - The execution latency of the test invoke request.
$sel:log:TestInvokeMethodResponse', testInvokeMethodResponse_log - The API Gateway execution log for the test invoke request.
TestInvokeMethod, testInvokeMethodResponse_multiValueHeaders - The headers of the HTTP response as a map from string to list of values.
TestInvokeMethodResponse, testInvokeMethodResponse_status - The HTTP status code.
$sel:httpStatus:TestInvokeMethodResponse', testInvokeMethodResponse_httpStatus - The response's http status code.
Response Lenses
testInvokeMethodResponse_body :: Lens' TestInvokeMethodResponse (Maybe Text) Source #
The body of the HTTP response.
testInvokeMethodResponse_headers :: Lens' TestInvokeMethodResponse (Maybe (HashMap Text Text)) Source #
The headers of the HTTP response.
testInvokeMethodResponse_latency :: Lens' TestInvokeMethodResponse (Maybe Integer) Source #
The execution latency of the test invoke request.
testInvokeMethodResponse_log :: Lens' TestInvokeMethodResponse (Maybe Text) Source #
The API Gateway execution log for the test invoke request.
testInvokeMethodResponse_multiValueHeaders :: Lens' TestInvokeMethodResponse (Maybe (HashMap Text [Text])) Source #
The headers of the HTTP response as a map from string to list of values.
testInvokeMethodResponse_status :: Lens' TestInvokeMethodResponse (Maybe Int) Source #
The HTTP status code.
testInvokeMethodResponse_httpStatus :: Lens' TestInvokeMethodResponse Int Source #
The response's http status code.