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 the LIVE stage when it’s created. To automatically publish to the LIVE stage, set this property to true .

  • 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 to true .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html#cfn-cloudfront-function-autopublish

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html#cfn-cloudfront-function-functioncode

Return type

Optional[str]

function_config

Contains configuration information about a CloudFront function.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html#cfn-cloudfront-function-functionconfig

Return type

Union[IResolvable, FunctionConfigProperty, None]

name

A name to identify the function.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html#cfn-cloudfront-function-name

Return type

str