Class Function
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudfront.Function
- All Implemented Interfaces:
- IResource,- IFunction,- IFunctionRef,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct,- software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:34.335Z")
@Stability(Stable)
public class Function
extends Resource
implements IFunction
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 SummaryNested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IFunctionIFunction.Jsii$Default, IFunction.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResourceIResource.Jsii$Default
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedFunction(software.amazon.jsii.JsiiObjectRef objRef) Function(software.constructs.Construct scope, String id, FunctionProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic IFunctionfromFunctionAttributes(software.constructs.Construct scope, String id, FunctionAttributes attrs) Imports a function by its name and ARN.the ARN of the CloudFront function.the name of the CloudFront function.A reference to a Function resource.the runtime of the CloudFront function.the deployment stage of the CloudFront function.Methods inherited from class software.amazon.awscdk.ResourceapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.ConstructgetNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.IResourceapplyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
PROPERTY_INJECTION_IDUniquely identifies this class.
 
- 
- 
Constructor Details- 
Functionprotected Function(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Functionprotected Function(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
Function@Stability(Stable) public Function(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FunctionProps props) - Parameters:
- scope- This parameter is required.
- id- This parameter is required.
- props- This parameter is required.
 
 
- 
- 
Method Details- 
fromFunctionAttributes@Stability(Stable) @NotNull public static IFunction fromFunctionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FunctionAttributes attrs) Imports a function by its name and ARN.- Parameters:
- scope- This parameter is required.
- id- This parameter is required.
- attrs- This parameter is required.
 
- 
getFunctionArnthe ARN of the CloudFront function.- Specified by:
- getFunctionArnin interface- IFunction
 
- 
getFunctionNamethe name of the CloudFront function.- Specified by:
- getFunctionNamein interface- IFunction
 
- 
getFunctionRefA reference to a Function resource.- Specified by:
- getFunctionRefin interface- IFunctionRef
 
- 
getFunctionRuntimethe runtime of the CloudFront function.
- 
getFunctionStagethe deployment stage of the CloudFront function.
 
-