Interface CfnApi.LambdaAuthorizerConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnApi.LambdaAuthorizerConfigProperty.Jsii$Proxy
- Enclosing class:
CfnApi
LambdaAuthorizerConfig specifies how to authorize AWS AppSync API access when using the AWS_LAMBDA authorizer mode.
Be aware that an AWS AppSync API can have only one AWS Lambda authorizer configured at a time.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
LambdaAuthorizerConfigProperty lambdaAuthorizerConfigProperty = LambdaAuthorizerConfigProperty.builder()
.authorizerUri("authorizerUri")
// the properties below are optional
.authorizerResultTtlInSeconds(123)
.identityValidationExpression("identityValidationExpression")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnApi.LambdaAuthorizerConfigPropertystatic final classAn implementation forCfnApi.LambdaAuthorizerConfigProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default NumberThe number of seconds a response should be cached for.The Amazon Resource Name (ARN) of the Lambda function to be called for authorization.default StringA regular expression for validation of tokens before the Lambda function is called.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAuthorizerUri
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization.This can be a standard Lambda ARN, a version ARN (
.../v3), or an 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 use the AWS Command Line Interface ( AWS 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- See Also:
-
getAuthorizerResultTtlInSeconds
The number of seconds a response should be cached for.The default is 0 seconds, which disables caching. If you don't specify a value for
authorizerResultTtlInSeconds, the default value is used. The maximum value is one hour (3600 seconds). The Lambda function can override this by returning attlOverridekey in its response.- See Also:
-
getIdentityValidationExpression
A regular expression for validation of tokens before the Lambda function is called.- See Also:
-
builder
-