Interface FunctionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FunctionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:47.084Z")
@Stability(Stable)
public interface FunctionProps
extends software.amazon.jsii.JsiiSerializable
Properties for creating a CloudFront Function.
Example:
KeyValueStore store = new KeyValueStore(this, "KeyValueStore");
Function.Builder.create(this, "Function")
.code(FunctionCode.fromInline("function handler(event) { return event.request }"))
// Note that JS_2_0 must be used for Key Value Store support
.runtime(FunctionRuntime.JS_2_0)
.keyValueStore(store)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forFunctionPropsstatic final classAn implementation forFunctionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionProps.Builderbuilder()default BooleanA flag that determines whether to automatically publish the function to the LIVE stage when it’s created.getCode()The source code of the function.default StringA comment to describe the function.default StringA name to identify the function.default IKeyValueStoreRefThe Key Value Store to associate with this function.default FunctionRuntimeThe runtime environment for the function.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCode
The source code of the function. -
getAutoPublish
A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.Default: - true
-
getComment
A comment to describe the function.Default: - same as `functionName`
-
getFunctionName
A name to identify the function.Default: - generated from the `id`
-
getKeyValueStore
The Key Value Store to associate with this function.In order to associate a Key Value Store, the
runtimemust becloudfront-js-2.0or newer.Default: - no key value store is associated
-
getRuntime
The runtime environment for the function.Default: FunctionRuntime.JS_1_0 (unless `keyValueStore` is specified, then `FunctionRuntime.JS_2_0`)
-
builder
- Returns:
- a
FunctionProps.BuilderofFunctionProps
-