aws-cdk-lib.aws_cloudfront.CfnDistribution.FunctionAssociationProperty

interface FunctionAssociationProperty

LanguageType name
.NETAmazon.CDK.AWS.CloudFront.CfnDistribution.FunctionAssociationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#CfnDistribution_FunctionAssociationProperty
Javasoftware.amazon.awscdk.services.cloudfront.CfnDistribution.FunctionAssociationProperty
Pythonaws_cdk.aws_cloudfront.CfnDistribution.FunctionAssociationProperty
TypeScript aws-cdk-lib » aws_cloudfront » CfnDistribution » FunctionAssociationProperty

A CloudFront function that is associated with a cache behavior in a CloudFront distribution.

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';
const functionAssociationProperty: cloudfront.CfnDistribution.FunctionAssociationProperty = {
  eventType: 'eventType',
  functionArn: 'functionArn',
};

Properties

NameTypeDescription
eventType?stringThe event type of the function, either viewer-request or viewer-response .
functionArn?stringThe Amazon Resource Name (ARN) of the function.

eventType?

Type: string (optional)

The event type of the function, either viewer-request or viewer-response .

You cannot use origin-facing event types ( origin-request and origin-response ) with a CloudFront function.


functionArn?

Type: string (optional)

The Amazon Resource Name (ARN) of the function.