interface CfnFunctionProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudFront.CfnFunctionProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#CfnFunctionProps |
Java | software.amazon.awscdk.services.cloudfront.CfnFunctionProps |
Python | aws_cdk.aws_cloudfront.CfnFunctionProps |
TypeScript | aws-cdk-lib » aws_cloudfront » CfnFunctionProps |
Properties for defining a CfnFunction.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
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 cfnFunctionProps: cloudfront.CfnFunctionProps = {
functionCode: 'functionCode',
functionConfig: {
comment: 'comment',
runtime: 'runtime',
// the properties below are optional
keyValueStoreAssociations: [{
keyValueStoreArn: 'keyValueStoreArn',
}],
},
name: 'name',
// the properties below are optional
autoPublish: false,
functionMetadata: {
functionArn: 'functionArn',
},
};
Properties
| Name | Type | Description |
|---|---|---|
| function | string | The function code. |
| function | IResolvable | Function | Contains configuration information about a CloudFront function. |
| name | string | A name to identify the function. |
| auto | boolean | IResolvable | A flag that determines whether to automatically publish the function to the LIVE stage when it’s created. |
| function | IResolvable | Function | Contains metadata about a CloudFront function. |
functionCode
Type:
string
The function code.
For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .
functionConfig
Type:
IResolvable | Function
Contains configuration information about a CloudFront function.
name
Type:
string
A name to identify the function.
autoPublish?
Type:
boolean | IResolvable
(optional)
A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.
To automatically publish to the LIVE stage, set this property to true .
functionMetadata?
Type:
IResolvable | Function
(optional)
Contains metadata about a CloudFront function.

.NET
Go
Java
Python
TypeScript