interface CfnFunctionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudFront.CfnFunctionProps |
Java | software.amazon.awscdk.services.cloudfront.CfnFunctionProps |
Python | aws_cdk.aws_cloudfront.CfnFunctionProps |
TypeScript | @aws-cdk/aws-cloudfront » CfnFunctionProps |
Properties for defining a CfnFunction
.
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 cfnFunctionProps: cloudfront.CfnFunctionProps = {
functionCode: 'functionCode',
functionConfig: {
comment: 'comment',
runtime: 'runtime',
},
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.