libZSservicesZSamazonka-appsyncZSamazonka-appsync
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.AppSync.Types.LambdaAuthorizerConfig

Description

 
Synopsis

Documentation

data LambdaAuthorizerConfig Source #

A LambdaAuthorizerConfig holds configuration on how to authorize AppSync API access when using the AWS_LAMBDA authorizer mode. Be aware that an AppSync API may have only one Lambda authorizer configured at a time.

See: newLambdaAuthorizerConfig smart constructor.

Constructors

LambdaAuthorizerConfig' 

Fields

  • identityValidationExpression :: Maybe Text

    A regular expression for validation of tokens before the Lambda function is called.

  • authorizerResultTtlInSeconds :: Maybe Natural

    The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

  • authorizerUri :: Text

    The ARN of the Lambda function to be called for authorization. This may be a standard Lambda ARN, a version ARN (.../v3) or alias ARN.

    Note: This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the Console, this is done for you. To do so with the Amazon Web Services CLI, run the following:

    aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

Instances

Instances details
Eq LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

Read LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

Show LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

Generic LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

Associated Types

type Rep LambdaAuthorizerConfig :: Type -> Type #

NFData LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

Methods

rnf :: LambdaAuthorizerConfig -> () #

Hashable LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

ToJSON LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

FromJSON LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

type Rep LambdaAuthorizerConfig Source # 
Instance details

Defined in Amazonka.AppSync.Types.LambdaAuthorizerConfig

type Rep LambdaAuthorizerConfig = D1 ('MetaData "LambdaAuthorizerConfig" "Amazonka.AppSync.Types.LambdaAuthorizerConfig" "libZSservicesZSamazonka-appsyncZSamazonka-appsync" 'False) (C1 ('MetaCons "LambdaAuthorizerConfig'" 'PrefixI 'True) (S1 ('MetaSel ('Just "identityValidationExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "authorizerResultTtlInSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "authorizerUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newLambdaAuthorizerConfig Source #

Create a value of LambdaAuthorizerConfig 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:identityValidationExpression:LambdaAuthorizerConfig', lambdaAuthorizerConfig_identityValidationExpression - A regular expression for validation of tokens before the Lambda function is called.

$sel:authorizerResultTtlInSeconds:LambdaAuthorizerConfig', lambdaAuthorizerConfig_authorizerResultTtlInSeconds - The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

$sel:authorizerUri:LambdaAuthorizerConfig', lambdaAuthorizerConfig_authorizerUri - The ARN of the Lambda function to be called for authorization. This may be a standard Lambda ARN, a version ARN (.../v3) or alias ARN.

Note: This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the Console, this is done for you. To do so with the Amazon Web Services CLI, run the following:

aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

lambdaAuthorizerConfig_identityValidationExpression :: Lens' LambdaAuthorizerConfig (Maybe Text) Source #

A regular expression for validation of tokens before the Lambda function is called.

lambdaAuthorizerConfig_authorizerResultTtlInSeconds :: Lens' LambdaAuthorizerConfig (Maybe Natural) Source #

The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

lambdaAuthorizerConfig_authorizerUri :: Lens' LambdaAuthorizerConfig Text Source #

The ARN of the Lambda function to be called for authorization. This may be a standard Lambda ARN, a version ARN (.../v3) or alias ARN.

Note: This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the Console, this is done for you. To do so with the Amazon Web Services CLI, run the following:

aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction