CfnFunctionProps
- class aws_cdk.aws_cloudfront.CfnFunctionProps(*, function_code, function_config, name, auto_publish=None, function_metadata=None)
Bases:
objectProperties for defining a
CfnFunction.- Parameters:
function_code (
str) – The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .function_config (
Union[IResolvable,FunctionConfigProperty,Dict[str,Any]]) – Contains configuration information about a CloudFront function.name (
str) – A name to identify the function.auto_publish (
Union[bool,IResolvable,None]) – A flag that determines whether to automatically publish the function to theLIVEstage when it’s created. To automatically publish to theLIVEstage, set this property totrue.function_metadata (
Union[IResolvable,FunctionMetadataProperty,Dict[str,Any],None]) – Contains metadata about a CloudFront function.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_cloudfront as cloudfront cfn_function_props = cloudfront.CfnFunctionProps( function_code="functionCode", function_config=cloudfront.CfnFunction.FunctionConfigProperty( comment="comment", runtime="runtime" ), name="name", # the properties below are optional auto_publish=False, function_metadata=cloudfront.CfnFunction.FunctionMetadataProperty( function_arn="functionArn" ) )
Attributes
- auto_publish
A flag that determines whether to automatically publish the function to the
LIVEstage when it’s created.To automatically publish to the
LIVEstage, set this property totrue.
- function_code
The function code.
For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .
- function_config
Contains configuration information about a CloudFront function.
- function_metadata
Contains metadata about a CloudFront function.
- name
A name to identify the function.