FunctionArgs

data class FunctionArgs(val autoPublish: Output<Boolean>? = null, val functionCode: Output<String>? = null, val functionConfig: Output<FunctionConfigArgs>? = null, val functionMetadata: Output<FunctionMetadataArgs>? = null, val name: Output<String>? = null) : ConvertibleToJava<FunctionArgs>

Creates a CF function. To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage. By default, when you create a function, it’s in the `DEVELOPMENT` stage. In this stage, you can test the function in the CF console (or with `TestFunction` in the CF API). When you’re ready to use your function with a CF distribution, publish the function to the `LIVE` stage. You can do this in the CF console, with `PublishFunction` in the CF API, or by updating the `AWS::CloudFront::Function` resource with the `AutoPublish` property set to `true`. When the function is published to the `LIVE` stage, you can attach it to a distribution’s cache behavior, using the function’s ARN. To automatically publish the function to the `LIVE` stage when it’s created, set the `AutoPublish` property to `true`.

Constructors

Link copied to clipboard
constructor(autoPublish: Output<Boolean>? = null, functionCode: Output<String>? = null, functionConfig: Output<FunctionConfigArgs>? = null, functionMetadata: Output<FunctionMetadataArgs>? = null, name: Output<String>? = null)

Properties

Link copied to clipboard
val autoPublish: Output<Boolean>? = null

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 copied to clipboard
val functionCode: Output<String>? = null

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 copied to clipboard
val functionConfig: Output<FunctionConfigArgs>? = null

Contains configuration information about a CloudFront function.

Link copied to clipboard

Contains metadata about a CloudFront function.

Link copied to clipboard
val name: Output<String>? = null

A name to identify the function.

Functions

Link copied to clipboard
open override fun toJava(): FunctionArgs