Class CfnFunctionPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
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 CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront 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 .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.cloudfront.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnFunctionPropsMixin cfnFunctionPropsMixin = CfnFunctionPropsMixin.Builder.create(CfnFunctionMixinProps.builder()
.autoPublish(false)
.functionCode("functionCode")
.functionConfig(FunctionConfigProperty.builder()
.comment("comment")
.keyValueStoreAssociations(List.of(KeyValueStoreAssociationProperty.builder()
.keyValueStoreArn("keyValueStoreArn")
.build()))
.runtime("runtime")
.build())
.functionMetadata(FunctionMetadataProperty.builder()
.functionArn("functionArn")
.build())
.name("name")
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnFunctionPropsMixin.static interfaceContains configuration information about a CloudFront function.static interfaceContains metadata about a CloudFront function.static interfaceThe key value store association.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::CloudFront::Function.CfnFunctionPropsMixin(CfnFunctionMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::CloudFront::Function.protectedCfnFunctionPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFunctionPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnFunctionMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnFunctionPropsMixin
protected CfnFunctionPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnFunctionPropsMixin
protected CfnFunctionPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnFunctionPropsMixin
@Stability(Stable) public CfnFunctionPropsMixin(@NotNull CfnFunctionMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::CloudFront::Function.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnFunctionPropsMixin
Create a mixin to apply properties toAWS::CloudFront::Function.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-