interface FunctionAssociationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.CfnDistribution.FunctionAssociationProperty |
![]() | software.amazon.awscdk.services.cloudfront.CfnDistribution.FunctionAssociationProperty |
![]() | aws_cdk.aws_cloudfront.CfnDistribution.FunctionAssociationProperty |
![]() | @aws-cdk/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 * as cloudfront from '@aws-cdk/aws-cloudfront';
const functionAssociationProperty: cloudfront.CfnDistribution.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 | 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
(optional)
The Amazon Resource Name (ARN) of the function.