Interface CfnFunctionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnFunctionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:16.311Z")
@Stability(Stable)
public interface CfnFunctionProps
extends software.amazon.jsii.JsiiSerializable
Properties for defining a
CfnFunction.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
CfnFunctionProps cfnFunctionProps = CfnFunctionProps.builder()
.functionCode("functionCode")
.functionConfig(FunctionConfigProperty.builder()
.comment("comment")
.runtime("runtime")
// the properties below are optional
.keyValueStoreAssociations(List.of(KeyValueStoreAssociationProperty.builder()
.keyValueStoreArn("keyValueStoreArn")
.build()))
.build())
.name("name")
// the properties below are optional
.autoPublish(false)
.functionMetadata(FunctionMetadataProperty.builder()
.functionArn("functionArn")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnFunctionPropsstatic final classAn implementation forCfnFunctionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnFunctionProps.Builderbuilder()default ObjectA flag that determines whether to automatically publish the function to theLIVEstage when it’s created.The function code.Contains configuration information about a CloudFront function.default ObjectContains metadata about a CloudFront function.getName()A name to identify the function.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getFunctionCode
The function code.For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .
- See Also:
-
getFunctionConfig
Contains configuration information about a CloudFront function.Returns union: either
IResolvableorCfnFunction.FunctionConfigProperty- See Also:
-
getName
A name to identify the function.- See Also:
-
getAutoPublish
A flag that determines whether to automatically publish the function to theLIVEstage when it’s created.To automatically publish to the
LIVEstage, set this property totrue.Returns union: either
BooleanorIResolvable- See Also:
-
getFunctionMetadata
Contains metadata about a CloudFront function.Returns union: either
IResolvableorCfnFunction.FunctionMetadataProperty- See Also:
-
builder
- Returns:
- a
CfnFunctionProps.BuilderofCfnFunctionProps
-