Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.
Synopsis
- data TestInvokeAuthorizer = TestInvokeAuthorizer' {}
- newTestInvokeAuthorizer :: Text -> Text -> TestInvokeAuthorizer
- testInvokeAuthorizer_additionalContext :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text))
- testInvokeAuthorizer_body :: Lens' TestInvokeAuthorizer (Maybe Text)
- testInvokeAuthorizer_headers :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text))
- testInvokeAuthorizer_multiValueHeaders :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text [Text]))
- testInvokeAuthorizer_pathWithQueryString :: Lens' TestInvokeAuthorizer (Maybe Text)
- testInvokeAuthorizer_stageVariables :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text))
- testInvokeAuthorizer_restApiId :: Lens' TestInvokeAuthorizer Text
- testInvokeAuthorizer_authorizerId :: Lens' TestInvokeAuthorizer Text
- data TestInvokeAuthorizerResponse = TestInvokeAuthorizerResponse' {}
- newTestInvokeAuthorizerResponse :: Int -> TestInvokeAuthorizerResponse
- testInvokeAuthorizerResponse_authorization :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text [Text]))
- testInvokeAuthorizerResponse_claims :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text Text))
- testInvokeAuthorizerResponse_clientStatus :: Lens' TestInvokeAuthorizerResponse (Maybe Int)
- testInvokeAuthorizerResponse_latency :: Lens' TestInvokeAuthorizerResponse (Maybe Integer)
- testInvokeAuthorizerResponse_log :: Lens' TestInvokeAuthorizerResponse (Maybe Text)
- testInvokeAuthorizerResponse_policy :: Lens' TestInvokeAuthorizerResponse (Maybe Text)
- testInvokeAuthorizerResponse_principalId :: Lens' TestInvokeAuthorizerResponse (Maybe Text)
- testInvokeAuthorizerResponse_httpStatus :: Lens' TestInvokeAuthorizerResponse Int
Creating a Request
data TestInvokeAuthorizer Source #
Make a request to simulate the invocation of an Authorizer.
See: newTestInvokeAuthorizer
smart constructor.
TestInvokeAuthorizer' | |
|
Instances
newTestInvokeAuthorizer Source #
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:additionalContext:TestInvokeAuthorizer'
, testInvokeAuthorizer_additionalContext
- A key-value map of additional context variables.
$sel:body:TestInvokeAuthorizer'
, testInvokeAuthorizer_body
- The simulated request body of an incoming invocation request.
$sel:headers:TestInvokeAuthorizer'
, testInvokeAuthorizer_headers
- 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
- 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:pathWithQueryString:TestInvokeAuthorizer'
, testInvokeAuthorizer_pathWithQueryString
- The URI path, including query string, of the simulated invocation
request. Use this to specify path parameters and query string
parameters.
$sel:stageVariables:TestInvokeAuthorizer'
, testInvokeAuthorizer_stageVariables
- A key-value map of stage variables to simulate an invocation on a
deployed Stage.
TestInvokeAuthorizer
, testInvokeAuthorizer_restApiId
- The string identifier of the associated RestApi.
TestInvokeAuthorizer
, testInvokeAuthorizer_authorizerId
- Specifies a test invoke authorizer request's Authorizer ID.
Request Lenses
testInvokeAuthorizer_additionalContext :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #
A key-value map of additional context variables.
testInvokeAuthorizer_body :: Lens' TestInvokeAuthorizer (Maybe Text) Source #
The simulated request body of an incoming invocation request.
testInvokeAuthorizer_headers :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #
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 #
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_pathWithQueryString :: Lens' TestInvokeAuthorizer (Maybe Text) Source #
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
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_restApiId :: Lens' TestInvokeAuthorizer Text Source #
The string identifier of the associated RestApi.
testInvokeAuthorizer_authorizerId :: Lens' TestInvokeAuthorizer Text Source #
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.
TestInvokeAuthorizerResponse' | |
|
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:authorization:TestInvokeAuthorizerResponse'
, testInvokeAuthorizerResponse_authorization
- The authorization response.
$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:latency:TestInvokeAuthorizerResponse'
, testInvokeAuthorizerResponse_latency
- The execution latency of the test authorizer request.
$sel:log:TestInvokeAuthorizerResponse'
, testInvokeAuthorizerResponse_log
- The API Gateway execution log for the test authorizer request.
TestInvokeAuthorizerResponse
, testInvokeAuthorizerResponse_policy
- The JSON policy document returned by the Authorizer
$sel:principalId:TestInvokeAuthorizerResponse'
, testInvokeAuthorizerResponse_principalId
- The principal identity returned by the Authorizer
$sel:httpStatus:TestInvokeAuthorizerResponse'
, testInvokeAuthorizerResponse_httpStatus
- The response's http status code.
Response Lenses
testInvokeAuthorizerResponse_authorization :: Lens' TestInvokeAuthorizerResponse (Maybe (HashMap Text [Text])) Source #
The authorization response.
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_latency :: Lens' TestInvokeAuthorizerResponse (Maybe Integer) Source #
The execution latency of the test authorizer request.
testInvokeAuthorizerResponse_log :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #
The API Gateway execution log for the test authorizer request.
testInvokeAuthorizerResponse_policy :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #
The JSON policy document returned by the Authorizer
testInvokeAuthorizerResponse_principalId :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #
The principal identity returned by the Authorizer
testInvokeAuthorizerResponse_httpStatus :: Lens' TestInvokeAuthorizerResponse Int Source #
The response's http status code.