amazonka-apigateway-1.6.1: 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.TestInvokeMethod

Contents

Description

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

Synopsis

Creating a Request

testInvokeMethod Source #

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

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

  • timPathWithQueryString - The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
  • timBody - The simulated request body of an incoming invocation request.
  • timClientCertificateId - A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
  • timStageVariables - A key-value map of stage variables to simulate an invocation on a deployed Stage .
  • timHeaders - A key-value map of headers to simulate an incoming invocation request.
  • timRestAPIId - [Required] The string identifier of the associated RestApi .
  • timResourceId - [Required] Specifies a test invoke method request's resource ID.
  • timHttpMethod - [Required] Specifies a test invoke method request's HTTP method.

data TestInvokeMethod Source #

Make a request to simulate the execution of a Method .

See: testInvokeMethod smart constructor.

Instances
Eq TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Data TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Methods

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

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

toConstr :: TestInvokeMethod -> Constr #

dataTypeOf :: TestInvokeMethod -> DataType #

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

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

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

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

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

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

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

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

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

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

Read TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Show TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Generic TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Associated Types

type Rep TestInvokeMethod :: Type -> Type #

Hashable TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

ToJSON TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

AWSRequest TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Associated Types

type Rs TestInvokeMethod :: Type #

ToHeaders TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

ToPath TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

ToQuery TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

NFData TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Methods

rnf :: TestInvokeMethod -> () #

type Rep TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

type Rep TestInvokeMethod = D1 (MetaData "TestInvokeMethod" "Network.AWS.APIGateway.TestInvokeMethod" "amazonka-apigateway-1.6.1-BCCM2RP3l9Q2ENgHvKrj59" False) (C1 (MetaCons "TestInvokeMethod'" PrefixI True) (((S1 (MetaSel (Just "_timPathWithQueryString") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_timBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_timClientCertificateId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_timStageVariables") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text))))) :*: ((S1 (MetaSel (Just "_timHeaders") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text))) :*: S1 (MetaSel (Just "_timRestAPIId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :*: (S1 (MetaSel (Just "_timResourceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_timHttpMethod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs TestInvokeMethod Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Request Lenses

timPathWithQueryString :: Lens' TestInvokeMethod (Maybe Text) Source #

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

timBody :: Lens' TestInvokeMethod (Maybe Text) Source #

The simulated request body of an incoming invocation request.

timClientCertificateId :: Lens' TestInvokeMethod (Maybe Text) Source #

A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.

timStageVariables :: Lens' TestInvokeMethod (HashMap Text Text) Source #

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

timHeaders :: Lens' TestInvokeMethod (HashMap Text Text) Source #

A key-value map of headers to simulate an incoming invocation request.

timRestAPIId :: Lens' TestInvokeMethod Text Source #

Required
The string identifier of the associated RestApi .

timResourceId :: Lens' TestInvokeMethod Text Source #

Required
Specifies a test invoke method request's resource ID.

timHttpMethod :: Lens' TestInvokeMethod Text Source #

Required
Specifies a test invoke method request's HTTP method.

Destructuring the Response

testInvokeMethodResponse Source #

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

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

data TestInvokeMethodResponse Source #

Represents the response of the test invoke request in the HTTP method.

Test API using the API Gateway console

See: testInvokeMethodResponse smart constructor.

Instances
Eq TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Data TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Methods

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

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

toConstr :: TestInvokeMethodResponse -> Constr #

dataTypeOf :: TestInvokeMethodResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Show TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Generic TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

Associated Types

type Rep TestInvokeMethodResponse :: Type -> Type #

NFData TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

type Rep TestInvokeMethodResponse Source # 
Instance details

Defined in Network.AWS.APIGateway.TestInvokeMethod

type Rep TestInvokeMethodResponse = D1 (MetaData "TestInvokeMethodResponse" "Network.AWS.APIGateway.TestInvokeMethod" "amazonka-apigateway-1.6.1-BCCM2RP3l9Q2ENgHvKrj59" False) (C1 (MetaCons "TestInvokeMethodResponse'" PrefixI True) ((S1 (MetaSel (Just "_timrsLog") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_timrsStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "_timrsBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_timrsLatency") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 (MetaSel (Just "_timrsHeaders") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text Text))) :*: S1 (MetaSel (Just "_timrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

timrsLog :: Lens' TestInvokeMethodResponse (Maybe Text) Source #

The API Gateway execution log for the test invoke request.

timrsBody :: Lens' TestInvokeMethodResponse (Maybe Text) Source #

The body of the HTTP response.

timrsLatency :: Lens' TestInvokeMethodResponse (Maybe Integer) Source #

The execution latency of the test invoke request.

timrsHeaders :: Lens' TestInvokeMethodResponse (HashMap Text Text) Source #

The headers of the HTTP response.