APIGatewayClient.test_invoke_authorizer
rboto-api-gateway==0.4.0 · Service index · Types
Model summary (excerpt): Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
Install and imports
from rboto import APIGatewayClient
from collections.abc import Sequence
from rboto_api_gateway.types import (
TestInvokeAuthorizerOutput,
)
Signature
async def test_invoke_authorizer(
*,
rest_api_id: str,
authorizer_id: str,
headers: dict[str, str] | None = None,
multi_value_headers: dict[str, Sequence[str]] | None = None,
path_with_query_string: str | None = None,
body: str | None = None,
stage_variables: dict[str, str] | None = None,
additional_context: dict[str, str] | None = None,
) -> TestInvokeAuthorizerOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
rest_api_id |
Yes | The string identifier of the associated RestApi. |
authorizer_id |
Yes | Specifies a test invoke authorizer request's Authorizer ID. |
headers |
No | 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 |
No | 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 |
No | The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters. |
body |
No | The simulated request body of an incoming invocation request. |
stage_variables |
No | A key-value map of stage variables to simulate an invocation on a deployed Stage. |
additional_context |
No | A key-value map of additional context variables. |
Output
TestInvokeAuthorizerOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
client_status |
int |
Always present | — |
log |
str | None |
Always present | — |
latency |
int |
Always present | — |
principal_id |
str | None |
Always present | — |
policy |
str | None |
Always present | — |
authorization |
dict[str, list[str]] | None |
Always present | — |
claims |
dict[str, str] | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_api_gateway.exceptions:
BadRequestError, NotFoundError, TooManyRequestsError, UnauthorizedError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.