2018/10/04 - Amazon API Gateway - 2 updated api methods
Changes Adding support for multi-value parameters in TestInvokeMethod and TestInvokeAuthorizer.
{'multiValueHeaders': {'string': ['string']}}
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
See also: AWS API Documentation
Request Syntax
client.test_invoke_authorizer( restApiId='string', authorizerId='string', headers={ 'string': 'string' }, multiValueHeaders={ 'string': [ 'string', ] }, pathWithQueryString='string', body='string', stageVariables={ 'string': 'string' }, additionalContext={ 'string': 'string' } )
string
[REQUIRED]
[Required] The string identifier of the associated RestApi .
string
[REQUIRED]
[Required] Specifies a test invoke authorizer request's Authorizer ID.
dict
[Required] A key-value map of headers to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, should be specified.
(string) --
(string) --
dict
[Optional] The headers as a map from string to list of values to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, may be specified.
(string) --
(list) --
(string) --
string
[Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
string
[Optional] The simulated request body of an incoming invocation request.
dict
A key-value map of stage variables to simulate an invocation on a deployed Stage .
(string) --
(string) --
dict
[Optional] A key-value map of additional context variables.
(string) --
(string) --
dict
Response Syntax
{ 'clientStatus': 123, 'log': 'string', 'latency': 123, 'principalId': 'string', 'policy': 'string', 'authorization': { 'string': [ 'string', ] }, 'claims': { 'string': 'string' } }
Response Structure
(dict) --
Represents the response of the test invoke request for a custom Authorizer
clientStatus (integer) --
The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded.
log (string) --
The API Gateway execution log for the test authorizer request.
latency (integer) --
The execution latency of the test authorizer request.
principalId (string) --
The principal identity returned by the Authorizer
policy (string) --
The JSON policy document returned by the Authorizer
authorization (dict) --
(string) --
(list) --
(string) --
claims (dict) --
The open identity claims , with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.
(string) --
(string) --
{'multiValueHeaders': {'string': ['string']}}
Simulate the execution of a Method in your RestApi with headers, parameters, and an incoming request body.
See also: AWS API Documentation
Request Syntax
client.test_invoke_method( restApiId='string', resourceId='string', httpMethod='string', pathWithQueryString='string', body='string', headers={ 'string': 'string' }, multiValueHeaders={ 'string': [ 'string', ] }, clientCertificateId='string', stageVariables={ 'string': 'string' } )
string
[REQUIRED]
[Required] The string identifier of the associated RestApi .
string
[REQUIRED]
[Required] Specifies a test invoke method request's resource ID.
string
[REQUIRED]
[Required] Specifies a test invoke method request's HTTP method.
string
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
string
The simulated request body of an incoming invocation request.
dict
A key-value map of headers to simulate an incoming invocation request.
(string) --
(string) --
dict
The headers as a map from string to list of values to simulate an incoming invocation request.
(string) --
(list) --
(string) --
string
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.
dict
A key-value map of stage variables to simulate an invocation on a deployed Stage .
(string) --
(string) --
dict
Response Syntax
{ 'status': 123, 'body': 'string', 'headers': { 'string': 'string' }, 'multiValueHeaders': { 'string': [ 'string', ] }, 'log': 'string', 'latency': 123 }
Response Structure
(dict) --
Represents the response of the test invoke request in the HTTP method.
status (integer) --
The HTTP status code.
body (string) --
The body of the HTTP response.
headers (dict) --
The headers of the HTTP response.
(string) --
(string) --
multiValueHeaders (dict) --
The headers of the HTTP response as a map from string to list of values.
(string) --
(list) --
(string) --
log (string) --
The API Gateway execution log for the test invoke request.
latency (integer) --
The execution latency of the test invoke request.