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