test_invoke_authorizer
async
¶
test_invoke_authorizer(
rest_api_id: String,
authorizer_id: String,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = 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.
Source code in docs_src/capo_api_gateway/_services/async_api_gateway.py
6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 | |