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

Amazonka.APIGateway.TestInvokeMethod

Description

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

Synopsis

Creating a Request

data TestInvokeMethod Source #

Make a request to simulate the execution of a Method.

See: newTestInvokeMethod smart constructor.

Constructors

TestInvokeMethod' 

Fields

  • pathWithQueryString :: Maybe Text

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

  • body :: Maybe Text

    The simulated request body of an incoming invocation request.

  • clientCertificateId :: Maybe Text

    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.

  • stageVariables :: Maybe (HashMap Text Text)

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

  • headers :: Maybe (HashMap Text Text)

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

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

    The headers as a map from string to list of values to simulate an incoming invocation request.

  • restApiId :: Text
    Required
    The string identifier of the associated RestApi.
  • resourceId :: Text
    Required
    Specifies a test invoke method request's resource ID.
  • httpMethod :: Text
    Required
    Specifies a test invoke method request's HTTP method.

Instances

Instances details
Eq TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Read TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Show TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Generic TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Associated Types

type Rep TestInvokeMethod :: Type -> Type #

NFData TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Methods

rnf :: TestInvokeMethod -> () #

Hashable TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

ToJSON TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

AWSRequest TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Associated Types

type AWSResponse TestInvokeMethod #

ToHeaders TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

ToPath TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

ToQuery TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

type Rep TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

type AWSResponse TestInvokeMethod Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

newTestInvokeMethod Source #

Create a value of TestInvokeMethod 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:TestInvokeMethod', testInvokeMethod_pathWithQueryString - The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

$sel:body:TestInvokeMethod', testInvokeMethod_body - The simulated request body of an incoming invocation request.

$sel:clientCertificateId:TestInvokeMethod', testInvokeMethod_clientCertificateId - 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.

$sel:stageVariables:TestInvokeMethod', testInvokeMethod_stageVariables - A key-value map of stage variables to simulate an invocation on a deployed Stage.

$sel:headers:TestInvokeMethod', testInvokeMethod_headers - A key-value map of headers to simulate an incoming invocation request.

$sel:multiValueHeaders:TestInvokeMethod', testInvokeMethod_multiValueHeaders - The headers as a map from string to list of values to simulate an incoming invocation request.

$sel:restApiId:TestInvokeMethod', testInvokeMethod_restApiId - [Required] The string identifier of the associated RestApi.

$sel:resourceId:TestInvokeMethod', testInvokeMethod_resourceId - [Required] Specifies a test invoke method request's resource ID.

$sel:httpMethod:TestInvokeMethod', testInvokeMethod_httpMethod - [Required] Specifies a test invoke method request's HTTP method.

Request Lenses

testInvokeMethod_pathWithQueryString :: 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.

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

The simulated request body of an incoming invocation request.

testInvokeMethod_clientCertificateId :: 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.

testInvokeMethod_stageVariables :: Lens' TestInvokeMethod (Maybe (HashMap Text Text)) Source #

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

testInvokeMethod_headers :: Lens' TestInvokeMethod (Maybe (HashMap Text Text)) Source #

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

testInvokeMethod_multiValueHeaders :: Lens' TestInvokeMethod (Maybe (HashMap Text [Text])) Source #

The headers as a map from string to list of values to simulate an incoming invocation request.

testInvokeMethod_restApiId :: Lens' TestInvokeMethod Text Source #

Required
The string identifier of the associated RestApi.

testInvokeMethod_resourceId :: Lens' TestInvokeMethod Text Source #

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

testInvokeMethod_httpMethod :: Lens' TestInvokeMethod Text Source #

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

Destructuring the Response

data TestInvokeMethodResponse Source #

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

Test API using the API Gateway console

See: newTestInvokeMethodResponse smart constructor.

Constructors

TestInvokeMethodResponse' 

Fields

Instances

Instances details
Eq TestInvokeMethodResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Read TestInvokeMethodResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Show TestInvokeMethodResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Generic TestInvokeMethodResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

Associated Types

type Rep TestInvokeMethodResponse :: Type -> Type #

NFData TestInvokeMethodResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

type Rep TestInvokeMethodResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeMethod

type Rep TestInvokeMethodResponse = D1 ('MetaData "TestInvokeMethodResponse" "Amazonka.APIGateway.TestInvokeMethod" "libZSservicesZSamazonka-apigatewayZSamazonka-apigateway" 'False) (C1 ('MetaCons "TestInvokeMethodResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "log") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "latency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: 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 "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newTestInvokeMethodResponse Source #

Create a value of TestInvokeMethodResponse 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:TestInvokeMethodResponse', testInvokeMethodResponse_log - The API Gateway execution log for the test invoke request.

$sel:status:TestInvokeMethodResponse', testInvokeMethodResponse_status - The HTTP status code.

$sel:body:TestInvokeMethod', testInvokeMethodResponse_body - The body of the HTTP response.

$sel:latency:TestInvokeMethodResponse', testInvokeMethodResponse_latency - The execution latency of the test invoke request.

$sel:headers:TestInvokeMethod', testInvokeMethodResponse_headers - The headers of the HTTP response.

$sel:multiValueHeaders:TestInvokeMethod', testInvokeMethodResponse_multiValueHeaders - The headers of the HTTP response as a map from string to list of values.

$sel:httpStatus:TestInvokeMethodResponse', testInvokeMethodResponse_httpStatus - The response's http status code.

Response Lenses

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

The API Gateway execution log for the test invoke request.

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

The execution latency of the test invoke request.

testInvokeMethodResponse_multiValueHeaders :: Lens' TestInvokeMethodResponse (Maybe (HashMap Text [Text])) Source #

The headers of the HTTP response as a map from string to list of values.