Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body¶
Description¶
Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body.
Usage¶
apigateway_test_invoke_method(restApiId, resourceId, httpMethod,
pathWithQueryString, body, headers, multiValueHeaders,
clientCertificateId, stageVariables)
Arguments¶
-
restApiId[required] The string identifier of the associated RestApi.
-
resourceId[required] Specifies a test invoke method request's resource ID.
-
httpMethod[required] Specifies a test invoke method request's HTTP method.
-
pathWithQueryStringThe URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
-
bodyThe simulated request body of an incoming invocation request.
-
headersA key-value map of headers to simulate an incoming invocation request.
-
multiValueHeadersThe headers as a map from string to list of values to simulate an incoming invocation request.
-
clientCertificateIdA 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.
-
stageVariablesA key-value map of stage variables to simulate an invocation on a deployed Stage.
Value¶
A list with the following syntax:
list(
status = 123,
body = "string",
headers = list(
"string"
),
multiValueHeaders = list(
list(
"string"
)
),
log = "string",
latency = 123
)