amazonka-apigateway-2.0: Amazon API Gateway SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.APIGateway.TestInvokeAuthorizer

Description

Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.

Synopsis

Creating a Request

data TestInvokeAuthorizer Source #

Make a request to simulate the invocation of an Authorizer.

See: newTestInvokeAuthorizer smart constructor.

Constructors

TestInvokeAuthorizer' 

Fields

  • additionalContext :: Maybe (HashMap Text Text)

    A key-value map of additional context variables.

  • body :: Maybe Text

    The simulated request body of an incoming invocation request.

  • headers :: Maybe (HashMap Text Text)

    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.

  • multiValueHeaders :: Maybe (HashMap Text [Text])

    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.

  • pathWithQueryString :: Maybe Text

    The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

  • stageVariables :: Maybe (HashMap Text Text)

    A key-value map of stage variables to simulate an invocation on a deployed Stage.

  • restApiId :: Text

    The string identifier of the associated RestApi.

  • authorizerId :: Text

    Specifies a test invoke authorizer request's Authorizer ID.

Instances

Instances details
ToJSON TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

ToHeaders TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

ToPath TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

ToQuery TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

AWSRequest TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Associated Types

type AWSResponse TestInvokeAuthorizer #

Generic TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Associated Types

type Rep TestInvokeAuthorizer :: Type -> Type #

Read TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Show TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

NFData TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Methods

rnf :: TestInvokeAuthorizer -> () #

Eq TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Hashable TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type AWSResponse TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizer = D1 ('MetaData "TestInvokeAuthorizer" "Amazonka.APIGateway.TestInvokeAuthorizer" "amazonka-apigateway-2.0-zw0Lbt4rUGxZBjJ4Rpfi" 'False) (C1 ('MetaCons "TestInvokeAuthorizer'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "additionalContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "headers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "multiValueHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text [Text]))))) :*: ((S1 ('MetaSel ('Just "pathWithQueryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "stageVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text)))) :*: (S1 ('MetaSel ('Just "restApiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "authorizerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

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.

Constructors

TestInvokeAuthorizerResponse' 

Fields

Instances

Instances details
Generic TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Associated Types

type Rep TestInvokeAuthorizerResponse :: Type -> Type #

Read TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Show TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

NFData TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Eq TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

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_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