interface FunctionAssociationProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CfnPropertyMixins.AWS.CloudFront.CfnDistributionPropsMixin.FunctionAssociationProperty |
Go | github.com/aws/aws-cdk-go/awscdkcfnpropertymixins/v2/awscloudfront#CfnDistributionPropsMixin_FunctionAssociationProperty |
Java | software.amazon.awscdk.cfnpropertymixins.services.cloudfront.CfnDistributionPropsMixin.FunctionAssociationProperty |
Python | aws_cdk.cfn_property_mixins.aws_cloudfront.CfnDistributionPropsMixin.FunctionAssociationProperty |
TypeScript | @aws-cdk/cfn-property-mixins » aws_cloudfront » CfnDistributionPropsMixin » 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/cfn-property-mixins';
const functionAssociationProperty: cloudfront.CfnDistributionPropsMixin.FunctionAssociationProperty = {
eventType: 'eventType',
functionArn: 'functionArn',
};
Properties
| Name | Type | Description |
|---|---|---|
| event | string | The event type of the function, either viewer-request or viewer-response . |
| function | string | IFunction | The 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 | IFunction
(optional)
The Amazon Resource Name (ARN) of the function.

.NET
Go
Java
Python
TypeScript