Interface ILambdaFunctionAssociation
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILambdaFunctionAssociation
Syntax (vb)
Public Interface ILambdaFunctionAssociation
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.AWS.CloudFront;
using Amazon.CDK.AWS.Lambda;
Version version;
var lambdaFunctionAssociation = new LambdaFunctionAssociation {
EventType = LambdaEdgeEventType.ORIGIN_REQUEST,
LambdaFunction = version,
// the properties below are optional
IncludeBody = false
};
Synopsis
Properties
| EventType | The lambda event type defines at which event the lambda is called during the request lifecycle. |
| IncludeBody | Allows a Lambda function to have read access to the body content. |
| LambdaFunction | A version of the lambda to associate. |
Properties
EventType
The lambda event type defines at which event the lambda is called during the request lifecycle.
LambdaEdgeEventType EventType { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
IncludeBody
Allows a Lambda function to have read access to the body content.
bool? IncludeBody { get; }
Property Value
bool?
Remarks
Only valid for "request" event types (ORIGIN_REQUEST or VIEWER_REQUEST).
Default: false
See: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html
LambdaFunction
A version of the lambda to associate.
IVersion LambdaFunction { get; }
Property Value
Remarks
ExampleMetadata: fixture=_generated