test_invoke_authorizer¶
Operation¶
test_invoke_authorizer
¶
test_invoke_authorizer(request: TestInvokeAuthorizerInput | TestInvokeAuthorizerInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TestInvokeAuthorizerInputDict]) -> TestInvokeAuthorizerOutput
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TestInvokeAuthorizerInput | TestInvokeAuthorizerInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[TestInvokeAuthorizerInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
TestInvokeAuthorizerOutput
|
An instance of |
test_invoke_authorizer
async
¶
test_invoke_authorizer(request: TestInvokeAuthorizerInput | TestInvokeAuthorizerInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TestInvokeAuthorizerInputDict]) -> TestInvokeAuthorizerOutput
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TestInvokeAuthorizerInput | TestInvokeAuthorizerInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[TestInvokeAuthorizerInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
TestInvokeAuthorizerOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
TestInvokeAuthorizerInputDict
¶
Bases: TypedDict
Dictionary form of TestInvokeAuthorizerInput.
Attributes¶
additional_context
instance-attribute
¶
A key-value map of additional context variables.
authorizer_id
instance-attribute
¶
Specifies a test invoke authorizer request's Authorizer ID.
body
instance-attribute
¶
body: str | None
The simulated request body of an incoming invocation request.
headers
instance-attribute
¶
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
instance-attribute
¶
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
instance-attribute
¶
path_with_query_string: str | None
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
rest_api_id
instance-attribute
¶
The string identifier of the associated RestApi.
TestInvokeAuthorizerInput
dataclass
¶
Bases: _SerdeShape
Make a request to simulate the invocation of an Authorizer.
Attributes¶
additional_context
class-attribute
instance-attribute
¶
A key-value map of additional context variables.
authorizer_id
class-attribute
instance-attribute
¶
authorizer_id: str | None = ...
Specifies a test invoke authorizer request's Authorizer ID.
body
class-attribute
instance-attribute
¶
body: str | None = ...
The simulated request body of an incoming invocation request.
headers
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
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
class-attribute
instance-attribute
¶
path_with_query_string: str | None = ...
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
Output¶
TestInvokeAuthorizerOutput
dataclass
¶
Bases: _SerdeShape
Represents the response of the test invoke request for a custom Authorizer
Attributes¶
authorization
class-attribute
instance-attribute
¶
The authorization response.
claims
class-attribute
instance-attribute
¶
The open identity claims, with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.
client_status
class-attribute
instance-attribute
¶
client_status: int = ...
The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded.
latency
class-attribute
instance-attribute
¶
latency: int = ...
The execution latency, in ms, of the test authorizer request.
log
class-attribute
instance-attribute
¶
log: str | None = ...
The API Gateway execution log for the test authorizer request.
policy
class-attribute
instance-attribute
¶
policy: str | None = ...
The JSON policy document returned by the Authorizer
principal_id
class-attribute
instance-attribute
¶
principal_id: str | None = ...
The principal identity returned by the Authorizer
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.