| Copyright | (c) 2013-2021 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
Amazonka.APIGateway.TestInvokeAuthorizer
Description
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
Use Lambda Function as Authorizer Use Cognito User Pool as Authorizer
Synopsis
- data TestInvokeAuthorizer = TestInvokeAuthorizer' {}
- newTestInvokeAuthorizer :: Text -> Text -> TestInvokeAuthorizer
- testInvokeAuthorizer_pathWithQueryString :: Lens' TestInvokeAuthorizer (Maybe Text)
- testInvokeAuthorizer_body :: Lens' TestInvokeAuthorizer (Maybe Text)
- testInvokeAuthorizer_additionalContext :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text))
- testInvokeAuthorizer_stageVariables :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text))
- testInvokeAuthorizer_headers :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text))
- testInvokeAuthorizer_multiValueHeaders :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text [Text]))
- testInvokeAuthorizer_restApiId :: Lens' TestInvokeAuthorizer Text
- testInvokeAuthorizer_authorizerId :: Lens' TestInvokeAuthorizer Text
- data TestInvokeAuthorizerResponse = TestInvokeAuthorizerResponse' {}
- newTestInvokeAuthorizerResponse :: Int -> TestInvokeAuthorizerResponse
- testInvokeAuthorizerResponse_log :: Lens' TestInvokeAuthorizerResponse (Maybe Text)
- testInvokeAuthorizerResponse_principalId :: Lens' TestInvokeAuthorizerResponse (Maybe Text)
- testInvokeAuthorizerResponse_latency :: Lens' TestInvokeAuthorizerResponse (Maybe Integer)
- testInvokeAuthorizerResponse_authorization :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text [Text]))
- testInvokeAuthorizerResponse_claims :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text Text))
- testInvokeAuthorizerResponse_clientStatus :: Lens' TestInvokeAuthorizerResponse (Maybe Int)
- testInvokeAuthorizerResponse_policy :: Lens' TestInvokeAuthorizerResponse (Maybe Text)
- testInvokeAuthorizerResponse_httpStatus :: Lens' TestInvokeAuthorizerResponse Int
Creating a Request
data TestInvokeAuthorizer Source #
Make a request to simulate the execution of an Authorizer.
See: newTestInvokeAuthorizer smart constructor.
Constructors
| TestInvokeAuthorizer' | |
Fields
| |
Instances
newTestInvokeAuthorizer Source #
Arguments
| :: Text | |
| -> Text | |
| -> TestInvokeAuthorizer |
Create a value of TestInvokeAuthorizer with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:pathWithQueryString:TestInvokeAuthorizer', testInvokeAuthorizer_pathWithQueryString - [Optional] The URI path, including query string, of the simulated
invocation request. Use this to specify path parameters and query string
parameters.
$sel:body:TestInvokeAuthorizer', testInvokeAuthorizer_body - [Optional] The simulated request body of an incoming invocation request.
$sel:additionalContext:TestInvokeAuthorizer', testInvokeAuthorizer_additionalContext - [Optional] A key-value map of additional context variables.
$sel:stageVariables:TestInvokeAuthorizer', testInvokeAuthorizer_stageVariables - A key-value map of stage variables to simulate an invocation on a
deployed Stage.
$sel:headers:TestInvokeAuthorizer', testInvokeAuthorizer_headers - [Required] 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.
$sel:multiValueHeaders:TestInvokeAuthorizer', testInvokeAuthorizer_multiValueHeaders - [Optional] 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.
$sel:restApiId:TestInvokeAuthorizer', testInvokeAuthorizer_restApiId - [Required] The string identifier of the associated RestApi.
$sel:authorizerId:TestInvokeAuthorizer', testInvokeAuthorizer_authorizerId - [Required] Specifies a test invoke authorizer request's Authorizer ID.
Request Lenses
testInvokeAuthorizer_pathWithQueryString :: Lens' TestInvokeAuthorizer (Maybe Text) Source #
- Optional
- The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
testInvokeAuthorizer_body :: Lens' TestInvokeAuthorizer (Maybe Text) Source #
- Optional
- The simulated request body of an incoming invocation request.
testInvokeAuthorizer_additionalContext :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #
- Optional
- A key-value map of additional context variables.
testInvokeAuthorizer_stageVariables :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #
A key-value map of stage variables to simulate an invocation on a deployed Stage.
testInvokeAuthorizer_headers :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #
- Required
- 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.
testInvokeAuthorizer_multiValueHeaders :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text [Text])) Source #
- Optional
- 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.
testInvokeAuthorizer_restApiId :: Lens' TestInvokeAuthorizer Text Source #
- Required
- The string identifier of the associated RestApi.
testInvokeAuthorizer_authorizerId :: Lens' TestInvokeAuthorizer Text Source #
- Required
- Specifies a test invoke authorizer request's Authorizer ID.
Destructuring the Response
data TestInvokeAuthorizerResponse Source #
Represents the response of the test invoke request for a custom Authorizer
See: newTestInvokeAuthorizerResponse smart constructor.
Constructors
| TestInvokeAuthorizerResponse' | |
Fields
| |
Instances
newTestInvokeAuthorizerResponse Source #
Create a value of TestInvokeAuthorizerResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:log:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_log - The API Gateway execution log for the test authorizer request.
$sel:principalId:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_principalId - The principal identity returned by the Authorizer
$sel:latency:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_latency - The execution latency of the test authorizer request.
$sel:authorization:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_authorization - Undocumented member.
$sel:claims:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_claims - The
open identity claims,
with any supported custom attributes, returned from the Cognito Your
User Pool configured for the API.
$sel:clientStatus:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_clientStatus - The HTTP status code that the client would have received. Value is 0 if
the authorizer succeeded.
$sel:policy:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_policy - The JSON policy document returned by the Authorizer
$sel:httpStatus:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_httpStatus - The response's http status code.
Response Lenses
testInvokeAuthorizerResponse_log :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #
The API Gateway execution log for the test authorizer request.
testInvokeAuthorizerResponse_principalId :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #
The principal identity returned by the Authorizer
testInvokeAuthorizerResponse_latency :: Lens' TestInvokeAuthorizerResponse (Maybe Integer) Source #
The execution latency of the test authorizer request.
testInvokeAuthorizerResponse_authorization :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text [Text])) Source #
Undocumented member.
testInvokeAuthorizerResponse_claims :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text Text)) Source #
The open identity claims, with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.
testInvokeAuthorizerResponse_clientStatus :: Lens' TestInvokeAuthorizerResponse (Maybe Int) Source #
The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded.
testInvokeAuthorizerResponse_policy :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #
The JSON policy document returned by the Authorizer
testInvokeAuthorizerResponse_httpStatus :: Lens' TestInvokeAuthorizerResponse Int Source #
The response's http status code.