amazonka-apigateway-1.6.0: Amazon API Gateway SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.APIGateway.TestInvokeAuthorizer

Contents

Description

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

Enable custom authorizers

Synopsis

Creating a Request

testInvokeAuthorizer #

Creates a value of TestInvokeAuthorizer with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • tiaPathWithQueryString - [Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
  • tiaBody - [Optional] The simulated request body of an incoming invocation request.
  • tiaAdditionalContext - [Optional] A key-value map of additional context variables.
  • tiaStageVariables - A key-value map of stage variables to simulate an invocation on a deployed Stage .
  • tiaHeaders - [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.
  • tiaRestAPIId - [Required] The string identifier of the associated RestApi .
  • tiaAuthorizerId - [Required] Specifies a test invoke authorizer request's Authorizer ID.

data TestInvokeAuthorizer #

Make a request to simulate the execution of an Authorizer .

See: testInvokeAuthorizer smart constructor.

Instances
Eq TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Data TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TestInvokeAuthorizer -> c TestInvokeAuthorizer #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TestInvokeAuthorizer #

toConstr :: TestInvokeAuthorizer -> Constr #

dataTypeOf :: TestInvokeAuthorizer -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TestInvokeAuthorizer) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TestInvokeAuthorizer) #

gmapT :: (forall b. Data b => b -> b) -> TestInvokeAuthorizer -> TestInvokeAuthorizer #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TestInvokeAuthorizer -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TestInvokeAuthorizer -> r #

gmapQ :: (forall d. Data d => d -> u) -> TestInvokeAuthorizer -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TestInvokeAuthorizer -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TestInvokeAuthorizer -> m TestInvokeAuthorizer #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TestInvokeAuthorizer -> m TestInvokeAuthorizer #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TestInvokeAuthorizer -> m TestInvokeAuthorizer #

Read TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Show TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Generic TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Associated Types

type Rep TestInvokeAuthorizer :: * -> * #

Hashable TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

ToJSON TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

AWSRequest TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Associated Types

type Rs TestInvokeAuthorizer :: * #

ToHeaders TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

ToPath TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

ToQuery TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

NFData TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Methods

rnf :: TestInvokeAuthorizer -> () #

type Rep TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizer = D1 (MetaData "TestInvokeAuthorizer" "Network.AWS.APIGateway.TestInvokeAuthorizer" "amazonka-apigateway-1.6.0-AZknipQenWKIkkS1rcDzK1" False) (C1 (MetaCons "TestInvokeAuthorizer'" PrefixI True) ((S1 (MetaSel (Just "_tiaPathWithQueryString") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_tiaBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_tiaAdditionalContext") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text))))) :*: ((S1 (MetaSel (Just "_tiaStageVariables") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text))) :*: S1 (MetaSel (Just "_tiaHeaders") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text)))) :*: (S1 (MetaSel (Just "_tiaRestAPIId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_tiaAuthorizerId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs TestInvokeAuthorizer # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Request Lenses

tiaPathWithQueryString :: Lens' TestInvokeAuthorizer (Maybe Text) #

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

tiaBody :: Lens' TestInvokeAuthorizer (Maybe Text) #

Optional
The simulated request body of an incoming invocation request.

tiaAdditionalContext :: Lens' TestInvokeAuthorizer (HashMap Text Text) #

Optional
A key-value map of additional context variables.

tiaStageVariables :: Lens' TestInvokeAuthorizer (HashMap Text Text) #

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

tiaHeaders :: Lens' TestInvokeAuthorizer (HashMap Text Text) #

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.

tiaRestAPIId :: Lens' TestInvokeAuthorizer Text #

Required
The string identifier of the associated RestApi .

tiaAuthorizerId :: Lens' TestInvokeAuthorizer Text #

Required
Specifies a test invoke authorizer request's Authorizer ID.

Destructuring the Response

testInvokeAuthorizerResponse #

Creates a value of TestInvokeAuthorizerResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data TestInvokeAuthorizerResponse #

Represents the response of the test invoke request for a custom Authorizer

See: testInvokeAuthorizerResponse smart constructor.

Instances
Eq TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Data TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TestInvokeAuthorizerResponse -> c TestInvokeAuthorizerResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TestInvokeAuthorizerResponse #

toConstr :: TestInvokeAuthorizerResponse -> Constr #

dataTypeOf :: TestInvokeAuthorizerResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TestInvokeAuthorizerResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TestInvokeAuthorizerResponse) #

gmapT :: (forall b. Data b => b -> b) -> TestInvokeAuthorizerResponse -> TestInvokeAuthorizerResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TestInvokeAuthorizerResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TestInvokeAuthorizerResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> TestInvokeAuthorizerResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TestInvokeAuthorizerResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TestInvokeAuthorizerResponse -> m TestInvokeAuthorizerResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TestInvokeAuthorizerResponse -> m TestInvokeAuthorizerResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TestInvokeAuthorizerResponse -> m TestInvokeAuthorizerResponse #

Read TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Show TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Generic TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

Associated Types

type Rep TestInvokeAuthorizerResponse :: * -> * #

NFData TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizerResponse # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizerResponse = D1 (MetaData "TestInvokeAuthorizerResponse" "Network.AWS.APIGateway.TestInvokeAuthorizer" "amazonka-apigateway-1.6.0-AZknipQenWKIkkS1rcDzK1" False) (C1 (MetaCons "TestInvokeAuthorizerResponse'" PrefixI True) (((S1 (MetaSel (Just "_tiarsLog") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_tiarsPrincipalId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_tiarsLatency") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 (MetaSel (Just "_tiarsAuthorization") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text [Text]))))) :*: ((S1 (MetaSel (Just "_tiarsClaims") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text))) :*: S1 (MetaSel (Just "_tiarsClientStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 (MetaSel (Just "_tiarsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_tiarsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

tiarsLog :: Lens' TestInvokeAuthorizerResponse (Maybe Text) #

The API Gateway execution log for the test authorizer request.

tiarsPrincipalId :: Lens' TestInvokeAuthorizerResponse (Maybe Text) #

The principal identity returned by the Authorizer

tiarsLatency :: Lens' TestInvokeAuthorizerResponse (Maybe Integer) #

The execution latency of the test authorizer request.

tiarsClaims :: Lens' TestInvokeAuthorizerResponse (HashMap Text Text) #

The open identity claims , with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.

tiarsClientStatus :: Lens' TestInvokeAuthorizerResponse (Maybe Int) #

The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded.

tiarsPolicy :: Lens' TestInvokeAuthorizerResponse (Maybe Text) #

The JSON policy document returned by the Authorizer