FunctionArgs

data class FunctionArgs(val code: Output<String>? = null, val comment: Output<String>? = null, val keyValueStoreAssociations: Output<List<String>>? = null, val name: Output<String>? = null, val publish: Output<Boolean>? = null, val runtime: Output<String>? = null) : ConvertibleToJava<FunctionArgs>

Provides a CloudFront Function resource. With CloudFront Functions in Amazon CloudFront, you can write lightweight functions in JavaScript for high-scale, latency-sensitive CDN customizations. See CloudFront Functions

NOTE: You cannot delete a function if it’s associated with a cache behavior. First, update your distributions to remove the function association from all cache behaviors, then delete the function.

Example Usage

Import

Using pulumi import, import CloudFront Functions using the name. For example:

$ pulumi import aws:cloudfront/function:Function test my_test_function

Constructors

Link copied to clipboard
constructor(code: Output<String>? = null, comment: Output<String>? = null, keyValueStoreAssociations: Output<List<String>>? = null, name: Output<String>? = null, publish: Output<Boolean>? = null, runtime: Output<String>? = null)

Properties

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

Source code of the function

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

Comment.

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

List of aws.cloudfront.KeyValueStore ARNs to be associated to the function. AWS limits associations to on key value store per function.

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

Unique name for your CloudFront Function.

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

Whether to publish creation/change as Live CloudFront Function Version. Defaults to true.

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

Identifier of the function's runtime. Valid values are cloudfront-js-1.0 and cloudfront-js-2.0. The following arguments are optional:

Functions

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