Interface IBehaviorOptions
Options for creating a new behavior.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBehaviorOptions : IAddBehaviorOptions
Syntax (vb)
Public Interface IBehaviorOptions
Inherits IAddBehaviorOptions
Remarks
ExampleMetadata: infused
Examples
// Adding an existing Lambda@Edge function created in a different stack
// to a CloudFront distribution.
Bucket s3Bucket;
var functionVersion = Version.FromVersionArn(this, "Version", "arn:aws:lambda:us-east-1:123456789012:function:functionName:1");
new Distribution(this, "distro", new DistributionProps {
DefaultBehavior = new BehaviorOptions {
Origin = new S3Origin(s3Bucket),
EdgeLambdas = new [] { new EdgeLambda {
FunctionVersion = functionVersion,
EventType = LambdaEdgeEventType.VIEWER_REQUEST
} }
}
});
Synopsis
Properties
Origin | The origin that you want CloudFront to route requests to when they match this behavior. |
Properties
Origin
The origin that you want CloudFront to route requests to when they match this behavior.
IOrigin Origin { get; }
Property Value