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.TestInvokeAuthorizer

Description

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

Use Lambda Function as Authorizer Use Cognito User Pool as Authorizer

Synopsis

Creating a Request

data TestInvokeAuthorizer Source #

Make a request to simulate the execution of an Authorizer.

See: newTestInvokeAuthorizer smart constructor.

Constructors

TestInvokeAuthorizer' 

Fields

  • pathWithQueryString :: Maybe Text
    Optional
    The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
  • body :: Maybe Text
    Optional
    The simulated request body of an incoming invocation request.
  • additionalContext :: Maybe (HashMap Text Text)
    Optional
    A key-value map of additional context variables.
  • 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)
    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.
  • multiValueHeaders :: Maybe (HashMap Text [Text])
    Optional
    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.
  • restApiId :: Text
    Required
    The string identifier of the associated RestApi.
  • authorizerId :: Text
    Required
    Specifies a test invoke authorizer request's Authorizer ID.

Instances

Instances details
Eq TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Read TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Show TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Generic TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Associated Types

type Rep TestInvokeAuthorizer :: Type -> Type #

NFData TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Methods

rnf :: TestInvokeAuthorizer -> () #

Hashable TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

ToJSON TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

AWSRequest TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Associated Types

type AWSResponse 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

type Rep TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizer = D1 ('MetaData "TestInvokeAuthorizer" "Amazonka.APIGateway.TestInvokeAuthorizer" "libZSservicesZSamazonka-apigatewayZSamazonka-apigateway" 'False) (C1 ('MetaCons "TestInvokeAuthorizer'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "pathWithQueryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "additionalContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "stageVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text 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 "restApiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "authorizerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse TestInvokeAuthorizer Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

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:pathWithQueryString:TestInvokeAuthorizer', testInvokeAuthorizer_pathWithQueryString - [Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

$sel:body:TestInvokeAuthorizer', testInvokeAuthorizer_body - [Optional] The simulated request body of an incoming invocation request.

$sel:additionalContext:TestInvokeAuthorizer', testInvokeAuthorizer_additionalContext - [Optional] A key-value map of additional context variables.

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

$sel:headers:TestInvokeAuthorizer', testInvokeAuthorizer_headers - [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.

$sel:multiValueHeaders:TestInvokeAuthorizer', testInvokeAuthorizer_multiValueHeaders - [Optional] 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:restApiId:TestInvokeAuthorizer', testInvokeAuthorizer_restApiId - [Required] The string identifier of the associated RestApi.

$sel:authorizerId:TestInvokeAuthorizer', testInvokeAuthorizer_authorizerId - [Required] Specifies a test invoke authorizer request's Authorizer ID.

Request Lenses

testInvokeAuthorizer_pathWithQueryString :: Lens' TestInvokeAuthorizer (Maybe Text) Source #

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

testInvokeAuthorizer_body :: Lens' TestInvokeAuthorizer (Maybe Text) Source #

Optional
The simulated request body of an incoming invocation request.

testInvokeAuthorizer_additionalContext :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #

Optional
A key-value map of additional context variables.

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_headers :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text Text)) Source #

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.

testInvokeAuthorizer_multiValueHeaders :: Lens' TestInvokeAuthorizer (Maybe (HashMap Text [Text])) Source #

Optional
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_restApiId :: Lens' TestInvokeAuthorizer Text Source #

Required
The string identifier of the associated RestApi.

testInvokeAuthorizer_authorizerId :: Lens' TestInvokeAuthorizer Text Source #

Required
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
Eq TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Read TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Show TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Generic TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

Associated Types

type Rep TestInvokeAuthorizerResponse :: Type -> Type #

NFData TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizerResponse Source # 
Instance details

Defined in Amazonka.APIGateway.TestInvokeAuthorizer

type Rep TestInvokeAuthorizerResponse = D1 ('MetaData "TestInvokeAuthorizerResponse" "Amazonka.APIGateway.TestInvokeAuthorizer" "libZSservicesZSamazonka-apigatewayZSamazonka-apigateway" 'False) (C1 ('MetaCons "TestInvokeAuthorizerResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "log") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "principalId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "latency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "authorization") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text [Text]))))) :*: ((S1 ('MetaSel ('Just "claims") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "clientStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

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:log:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_log - The API Gateway execution log for the test authorizer request.

$sel:principalId:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_principalId - The principal identity returned by the Authorizer

$sel:latency:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_latency - The execution latency of the test authorizer request.

$sel:authorization:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_authorization - Undocumented member.

$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:policy:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_policy - The JSON policy document returned by the Authorizer

$sel:httpStatus:TestInvokeAuthorizerResponse', testInvokeAuthorizerResponse_httpStatus - The response's http status code.

Response Lenses

testInvokeAuthorizerResponse_log :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #

The API Gateway execution log for the test authorizer request.

testInvokeAuthorizerResponse_principalId :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #

The principal identity returned by the Authorizer

testInvokeAuthorizerResponse_latency :: Lens' TestInvokeAuthorizerResponse (Maybe Integer) Source #

The execution latency of the test authorizer request.

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_policy :: Lens' TestInvokeAuthorizerResponse (Maybe Text) Source #

The JSON policy document returned by the Authorizer