@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:11.387Z") @Stability(value=Experimental) public interface FunctionProps extends software.amazon.jsii.JsiiSerializable, FunctionOptions
// Example automatically generated from non-compiling source. May contain errors.
Function myFunctionHandler = Function.Builder.create(this, "MyFunction")
.code(Code.fromAsset("resource/myfunction"))
.runtime(Runtime.NODEJS_12_X)
.handler("index.handler")
.build();
Object eventRule = Trail.onEvent(this, "MyCloudWatchEvent", Map.of(
"target", new LambdaFunction(myFunctionHandler)));
eventRule.addEventPattern(Map.of(
"account", "123456789012",
"source", "aws.s3"));
| Modifier and Type | Interface and Description |
|---|---|
static class |
FunctionProps.Builder
A builder for
FunctionProps |
static class |
FunctionProps.Jsii$Proxy
An implementation for
FunctionProps |
| Modifier and Type | Method and Description |
|---|---|
static FunctionProps.Builder |
builder() |
Code |
getCode()
(experimental) The source code of your Lambda function.
|
String |
getHandler()
(experimental) The name of the method within your code that Lambda calls to execute your function.
|
Runtime |
getRuntime()
(experimental) The runtime environment for the Lambda function that you are uploading.
|
getAllowAllOutbound, getAllowPublicSubnet, getArchitecture, getArchitectures, getCodeSigningConfig, getCurrentVersionOptions, getDeadLetterQueue, getDeadLetterQueueEnabled, getDescription, getEnvironment, getEnvironmentEncryption, getEvents, getFilesystem, getFunctionName, getInitialPolicy, getInsightsVersion, getLayers, getLogRetention, getLogRetentionRetryOptions, getLogRetentionRole, getMemorySize, getProfiling, getProfilingGroup, getReservedConcurrentExecutions, getRole, getSecurityGroup, getSecurityGroups, getTimeout, getTracing, getVpc, getVpcSubnetsgetMaxEventAge, getOnFailure, getOnSuccess, getRetryAttempts@Stability(value=Experimental) @NotNull Code getCode()
You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text.
@Stability(value=Experimental) @NotNull String getHandler()
The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel.
Use Handler.FROM_IMAGE when defining a function from a Docker image.
NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.
@Stability(value=Experimental) @NotNull Runtime getRuntime()
For valid values, see the Runtime property in the AWS Lambda Developer Guide.
Use Runtime.FROM_IMAGE when when defining a function from a Docker image.
@Stability(value=Experimental) static FunctionProps.Builder builder()
builder in interface EventInvokeConfigOptionsbuilder in interface FunctionOptionsFunctionProps.Builder of FunctionPropsCopyright © 2022. All rights reserved.