interface FunctionAssociation
This page is available in another version. Click here for the v2 documentation.
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.FunctionAssociation |
![]() | software.amazon.awscdk.services.cloudfront.FunctionAssociation |
![]() | aws_cdk.aws_cloudfront.FunctionAssociation |
![]() | @aws-cdk/aws-cloudfront » FunctionAssociation |
Represents a CloudFront function and event type when using CF Functions.
The type of the {@link AddBehaviorOptions.functionAssociations} property.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cloudfront from '@aws-cdk/aws-cloudfront';
declare const function_: cloudfront.Function;
const functionAssociation: cloudfront.FunctionAssociation = {
eventType: cloudfront.FunctionEventType.VIEWER_REQUEST,
function: function_,
};
Properties
Name | Type | Description |
---|---|---|
event | Function | The type of event which should invoke the function. |
function | IFunction | The CloudFront function that will be invoked. |
eventType
Type:
Function
The type of event which should invoke the function.
function
Type:
IFunction
The CloudFront function that will be invoked.