Class EdgeLambda
Represents a Lambda function version and event type when using Lambda@Edge.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EdgeLambda : Object, IEdgeLambda
Syntax (vb)
Public Class EdgeLambda
Inherits Object
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() |
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()
public EdgeLambda()
Properties
EventType
The type of event in response to which should the function be invoked.
public LambdaEdgeEventType EventType { get; set; }
Property Value
FunctionVersion
The version of the Lambda function that will be invoked.
public IVersion FunctionVersion { get; set; }
Property Value
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 Nullable<bool> IncludeBody { get; set; }
Property Value
System.Nullable<System.Boolean>
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