@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.168Z") @Stability(value=Stable) public interface EdgeFunctionProps extends software.amazon.jsii.JsiiSerializable, FunctionProps
Example:
Bucket myBucket;
// A Lambda@Edge function added to default behavior of a Distribution
// and triggered on every request
EdgeFunction myFunc = EdgeFunction.Builder.create(this, "MyFunction")
.runtime(Runtime.NODEJS_14_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.build();
Distribution.Builder.create(this, "myDist")
.defaultBehavior(BehaviorOptions.builder()
.origin(new S3Origin(myBucket))
.edgeLambdas(List.of(EdgeLambda.builder()
.functionVersion(myFunc.getCurrentVersion())
.eventType(LambdaEdgeEventType.VIEWER_REQUEST)
.build()))
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
EdgeFunctionProps.Builder
A builder for
EdgeFunctionProps |
static class |
EdgeFunctionProps.Jsii$Proxy
An implementation for
EdgeFunctionProps |
| Modifier and Type | Method and Description |
|---|---|
static EdgeFunctionProps.Builder |
builder() |
default String |
getStackId()
The stack ID of Lambda@Edge function.
|
getCode, getHandler, getRuntimegetAllowAllOutbound, getAllowPublicSubnet, getArchitecture, getCodeSigningConfig, getCurrentVersionOptions, getDeadLetterQueue, getDeadLetterQueueEnabled, getDeadLetterTopic, getDescription, getEnvironment, getEnvironmentEncryption, getEphemeralStorageSize, getEvents, getFilesystem, getFunctionName, getInitialPolicy, getInsightsVersion, getLayers, getLogRetention, getLogRetentionRetryOptions, getLogRetentionRole, getMemorySize, getProfiling, getProfilingGroup, getReservedConcurrentExecutions, getRole, getSecurityGroups, getTimeout, getTracing, getVpc, getVpcSubnetsgetMaxEventAge, getOnFailure, getOnSuccess, getRetryAttempts@Stability(value=Stable) @Nullable default String getStackId()
Default: - `edge-lambda-stack-${region}`
@Stability(value=Stable) static EdgeFunctionProps.Builder builder()
builder in interface EventInvokeConfigOptionsbuilder in interface FunctionOptionsbuilder in interface FunctionPropsEdgeFunctionProps.Builder of EdgeFunctionPropsCopyright © 2022. All rights reserved.