interface FunctionAssociation
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudFront.FunctionAssociation |
Java | software.amazon.awscdk.services.cloudfront.FunctionAssociation |
Python | aws_cdk.aws_cloudfront.FunctionAssociation |
TypeScript (source) | @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.