Show / Hide Table of Contents

Class LambdaAuthorizerProps

Base properties for all lambda authorizers.

Inheritance
object
LambdaAuthorizerProps
Implements
ILambdaAuthorizerProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LambdaAuthorizerProps : ILambdaAuthorizerProps
Syntax (vb)
Public Class LambdaAuthorizerProps Implements ILambdaAuthorizerProps
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            using Amazon.CDK.AWS.APIGateway;
            using Amazon.CDK.AWS.IAM;
            using Amazon.CDK.AWS.Lambda;

            Function function_;
            Role role;

            var lambdaAuthorizerProps = new LambdaAuthorizerProps {
                Handler = function_,

                // the properties below are optional
                AssumeRole = role,
                AuthorizerName = "authorizerName",
                ResultsCacheTtl = Duration.Minutes(30)
            };

Synopsis

Constructors

LambdaAuthorizerProps()

Base properties for all lambda authorizers.

Properties

AssumeRole

An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.

AuthorizerName

An optional human friendly name for the authorizer.

Handler

The handler for the authorizer lambda function.

ResultsCacheTtl

How long APIGateway should cache the results.

Constructors

LambdaAuthorizerProps()

Base properties for all lambda authorizers.

public LambdaAuthorizerProps()
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            using Amazon.CDK.AWS.APIGateway;
            using Amazon.CDK.AWS.IAM;
            using Amazon.CDK.AWS.Lambda;

            Function function_;
            Role role;

            var lambdaAuthorizerProps = new LambdaAuthorizerProps {
                Handler = function_,

                // the properties below are optional
                AssumeRole = role,
                AuthorizerName = "authorizerName",
                ResultsCacheTtl = Duration.Minutes(30)
            };

Properties

AssumeRole

An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.

public IRole? AssumeRole { get; set; }
Property Value

IRole

Remarks

The IAM role must be assumable by 'apigateway.amazonaws.com'.

Default: - A resource policy is added to the Lambda function allowing apigateway.amazonaws.com to invoke the function.

AuthorizerName

An optional human friendly name for the authorizer.

public string? AuthorizerName { get; set; }
Property Value

string

Remarks

Note that, this is not the primary identifier of the authorizer.

Default: - the unique construct ID

Handler

The handler for the authorizer lambda function.

public IFunction Handler { get; set; }
Property Value

IFunction

Remarks

The handler must follow a very specific protocol on the input it receives and the output it needs to produce. API Gateway has documented the handler's input specification and output specification.

ResultsCacheTtl

How long APIGateway should cache the results.

public Duration? ResultsCacheTtl { get; set; }
Property Value

Duration

Remarks

Max 1 hour. Disable caching by setting this to 0.

Default: - Duration.minutes(5)

Implements

ILambdaAuthorizerProps
Back to top Generated by DocFX