interface FunctionAssociation
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.FunctionAssociation |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#FunctionAssociation |
![]() | software.amazon.awscdk.services.cloudfront.FunctionAssociation |
![]() | aws_cdk.aws_cloudfront.FunctionAssociation |
![]() | aws-cdk-lib » aws_cloudfront » FunctionAssociation |
Represents a CloudFront function and event type when using CF Functions.
The type of the AddBehaviorOptions.functionAssociations
property.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
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.