Show / Hide Table of Contents

Class EdgeLambda

Represents a Lambda function version and event type when using Lambda@Edge.

Inheritance
object
EdgeLambda
Implements
IEdgeLambda
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.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EdgeLambda : IEdgeLambda
Syntax (vb)
Public Class EdgeLambda Implements IEdgeLambda
Remarks

The type of the AddBehaviorOptions.edgeLambdas property.

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.AWS.CloudFront;
             using Amazon.CDK.AWS.Lambda;

             Version version;

             var edgeLambda = new EdgeLambda {
                 EventType = LambdaEdgeEventType.ORIGIN_REQUEST,
                 FunctionVersion = version,

                 // the properties below are optional
                 IncludeBody = false
             };

Synopsis

Constructors

EdgeLambda()

Represents a Lambda function version and event type when using Lambda@Edge.

Properties

EventType

The type of event in response to which should the function be invoked.

FunctionVersion

The version of the Lambda function that will be invoked.

IncludeBody

Allows a Lambda function to have read access to the body content.

Constructors

EdgeLambda()

Represents a Lambda function version and event type when using Lambda@Edge.

public EdgeLambda()
Remarks

The type of the AddBehaviorOptions.edgeLambdas property.

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.AWS.CloudFront;
             using Amazon.CDK.AWS.Lambda;

             Version version;

             var edgeLambda = new EdgeLambda {
                 EventType = LambdaEdgeEventType.ORIGIN_REQUEST,
                 FunctionVersion = version,

                 // the properties below are optional
                 IncludeBody = false
             };

Properties

EventType

The type of event in response to which should the function be invoked.

public LambdaEdgeEventType EventType { get; set; }
Property Value

LambdaEdgeEventType

Remarks

The type of the AddBehaviorOptions.edgeLambdas property.

ExampleMetadata: fixture=_generated

FunctionVersion

The version of the Lambda function that will be invoked.

public IVersion FunctionVersion { get; set; }
Property Value

IVersion

Remarks

Note: it's not possible to use the '$LATEST' function version for Lambda@Edge!

IncludeBody

Allows a Lambda function to have read access to the body content.

public bool? IncludeBody { get; set; }
Property Value

bool?

Remarks

Only valid for "request" event types (ORIGIN_REQUEST or VIEWER_REQUEST). See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html

Default: false

Implements

IEdgeLambda
Back to top Generated by DocFX