CfnFunctionProps
- class aws_cdk.aws_cloudfront.CfnFunctionProps(*, function_code, function_config, name, auto_publish=None, function_metadata=None)
Bases:
object
Properties 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 theLIVE
stage when it’s created. To automatically publish to theLIVE
stage, set this property totrue
.function_metadata (
Union
[IResolvable
,FunctionMetadataProperty
,Dict
[str
,Any
],None
]) – Contains metadata about a CloudFront function.
- See:
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. from aws_cdk import aws_cloudfront as cloudfront cfn_function_props = cloudfront.CfnFunctionProps( function_code="functionCode", function_config=cloudfront.CfnFunction.FunctionConfigProperty( comment="comment", runtime="runtime", # the properties below are optional key_value_store_associations=[cloudfront.CfnFunction.KeyValueStoreAssociationProperty( key_value_store_arn="keyValueStoreArn" )] ), 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
LIVE
stage when it’s created.To automatically publish to the
LIVE
stage, 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.