test_invoke_authorizer
¶
test_invoke_authorizer(
rest_api_id: String,
authorizer_id: String,
*,
config_overrides: Optional[APIGatewayClientConfig] = None,
headers: Optional[MapOfStringToString] = None,
multi_value_headers: Optional[MapOfStringToList] = None,
path_with_query_string: Optional[String] = None,
body: Optional[String] = None,
stage_variables: Optional[MapOfStringToString] = None,
additional_context: Optional[MapOfStringToString] = None,
) -> TestInvokeAuthorizerResponse
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
Parameters:
-
rest_api_id(String) –The string identifier of the associated RestApi.
-
authorizer_id(String) –Specifies a test invoke authorizer request's Authorizer ID.
-
headers(Optional[MapOfStringToString], default:None) –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.
-
multi_value_headers(Optional[MapOfStringToList], default:None) –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.
-
path_with_query_string(Optional[String], default:None) –The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
-
body(Optional[String], default:None) –The simulated request body of an incoming invocation request.
-
stage_variables(Optional[MapOfStringToString], default:None) –A key-value map of stage variables to simulate an invocation on a deployed Stage.
-
additional_context(Optional[MapOfStringToString], default:None) –A key-value map of additional context variables.
Raises:
-
BadRequestException–The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
-
NotFoundException–The requested resource is not found. Make sure that the request URI is correct.
-
TooManyRequestsException–The request has reached its throttling limit. Retry after the specified time period.
-
UnauthorizedException–The request is denied because the caller has insufficient permissions.
-
UnknownServiceError–The service returned an error code this client does not model.