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.
Source code in docs_src/capo_api_gateway/_services/api_gateway.py
6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 | |