CfnFunctionProps¶
-
class
aws_cdk.aws_cloudfront.
CfnFunctionProps
(*, name, auto_publish=None, function_code=None, function_config=None)¶ Bases:
object
Properties for defining a
CfnFunction
.- Parameters
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_code (
Optional
[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
,None
]) – Contains configuration information 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( name="name", # the properties below are optional auto_publish=False, function_code="functionCode", function_config=cloudfront.CfnFunction.FunctionConfigProperty( comment="comment", runtime="runtime" ) )
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
.- Link
- Return type
Union
[bool
,IResolvable
,None
]
-
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.
-
name
¶ A name to identify the function.