public static final class NodejsFunctionProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NodejsFunctionProps
NodejsFunctionProps
NodejsFunctionProps.Builder, NodejsFunctionProps.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getAllowAllOutbound()
Whether to allow the Lambda to send all network traffic.
|
java.lang.Boolean |
getAllowPublicSubnet()
Lambda Functions in a public subnet can NOT access the internet.
|
Architecture |
getArchitecture()
The system architectures compatible with this lambda function.
|
java.util.List<Architecture> |
getArchitectures()
(deprecated) DEPRECATED.
|
java.lang.Boolean |
getAwsSdkConnectionReuse()
Whether to automatically reuse TCP connections when working with the AWS SDK for JavaScript.
|
BundlingOptions |
getBundling()
Bundling options.
|
ICodeSigningConfig |
getCodeSigningConfig()
Code signing config associated with this function.
|
VersionOptions |
getCurrentVersionOptions()
Options for the `lambda.Version` resource automatically created by the `fn.currentVersion` method.
|
IQueue |
getDeadLetterQueue()
The SQS queue to use if DLQ is enabled.
|
java.lang.Boolean |
getDeadLetterQueueEnabled()
Enabled DLQ.
|
ITopic |
getDeadLetterTopic()
The SNS topic to use as a DLQ.
|
java.lang.String |
getDepsLockFilePath()
The path to the dependencies lock file (`yarn.lock` or `package-lock.json`).
|
java.lang.String |
getDescription()
A description of the function.
|
java.lang.String |
getEntry()
Path to the entry file (JavaScript or TypeScript).
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
Key-value pairs that Lambda caches and makes available for your Lambda functions.
|
IKey |
getEnvironmentEncryption()
The AWS KMS key that's used to encrypt your function's environment variables.
|
Size |
getEphemeralStorageSize()
The size of the function’s /tmp directory in MiB.
|
java.util.List<IEventSource> |
getEvents()
Event sources for this function.
|
FileSystem |
getFilesystem()
The filesystem configuration for the lambda function.
|
java.lang.String |
getFunctionName()
A name for the function.
|
java.lang.String |
getHandler()
The name of the exported handler in the entry file.
|
java.util.List<PolicyStatement> |
getInitialPolicy()
Initial policy statements to add to the created Lambda Role.
|
LambdaInsightsVersion |
getInsightsVersion()
Specify the version of CloudWatch Lambda insights to use for monitoring.
|
java.util.List<ILayerVersion> |
getLayers()
A list of layers to add to the function's execution environment.
|
RetentionDays |
getLogRetention()
The number of days log events are kept in CloudWatch Logs.
|
LogRetentionRetryOptions |
getLogRetentionRetryOptions()
When log retention is specified, a custom resource attempts to create the CloudWatch log group.
|
IRole |
getLogRetentionRole()
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
Duration |
getMaxEventAge()
The maximum age of a request that Lambda sends to a function for processing.
|
java.lang.Number |
getMemorySize()
The amount of memory, in MB, that is allocated to your Lambda function.
|
IDestination |
getOnFailure()
The destination for failed invocations.
|
IDestination |
getOnSuccess()
The destination for successful invocations.
|
java.lang.Boolean |
getProfiling()
Enable profiling.
|
IProfilingGroup |
getProfilingGroup()
Profiling Group.
|
java.lang.String |
getProjectRoot()
The path to the directory containing project config files (`package.json` or `tsconfig.json`).
|
java.lang.Number |
getReservedConcurrentExecutions()
The maximum of concurrent executions you want to reserve for the function.
|
java.lang.Number |
getRetryAttempts()
The maximum number of times to retry when the function returns an error.
|
IRole |
getRole()
Lambda execution role.
|
Runtime |
getRuntime()
The runtime environment.
|
ISecurityGroup |
getSecurityGroup()
(deprecated) What security group to associate with the Lambda's network interfaces.
|
java.util.List<ISecurityGroup> |
getSecurityGroups()
The list of security groups to associate with the Lambda's network interfaces.
|
Duration |
getTimeout()
The function execution time (in seconds) after which Lambda terminates the function.
|
Tracing |
getTracing()
Enable AWS X-Ray Tracing for Lambda Function.
|
IVpc |
getVpc()
VPC network to place Lambda network interfaces.
|
SubnetSelection |
getVpcSubnets()
Where to place the network interfaces within the VPC.
|
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
builder
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef
- Reference to the JSII managed object.public final java.lang.Boolean getAwsSdkConnectionReuse()
NodejsFunctionProps
This sets the AWS_NODEJS_CONNECTION_REUSE_ENABLED
environment variable
to 1
.
Default: true
getAwsSdkConnectionReuse
in interface NodejsFunctionProps
public final BundlingOptions getBundling()
NodejsFunctionProps
Default: - use default bundling options: no minify, no sourcemap, all modules are bundled.
getBundling
in interface NodejsFunctionProps
public final java.lang.String getDepsLockFilePath()
NodejsFunctionProps
This will be used as the source for the volume mounted in the Docker container.
Modules specified in nodeModules
will be installed using the right
installer (npm
or yarn
) along with this lock file.
Default: - the path is found by walking up parent directories searching for a `yarn.lock` or `package-lock.json` file
getDepsLockFilePath
in interface NodejsFunctionProps
public final java.lang.String getEntry()
NodejsFunctionProps
Default: - Derived from the name of the defining file and the construct's id. If the `NodejsFunction` is defined in `stack.ts` with `my-handler` as id (`new NodejsFunction(this, 'my-handler')`), the construct will look at `stack.my-handler.ts` and `stack.my-handler.js`.
getEntry
in interface NodejsFunctionProps
public final java.lang.String getHandler()
NodejsFunctionProps
Default: handler
getHandler
in interface NodejsFunctionProps
public final java.lang.String getProjectRoot()
NodejsFunctionProps
Default: - the directory containing the `depsLockFilePath`
getProjectRoot
in interface NodejsFunctionProps
public final Runtime getRuntime()
NodejsFunctionProps
Only runtimes of the Node.js family are supported.
Default: Runtime.NODEJS_14_X
getRuntime
in interface NodejsFunctionProps
public final java.lang.Boolean getAllowAllOutbound()
FunctionOptions
If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets.
Default: true
getAllowAllOutbound
in interface FunctionOptions
public final java.lang.Boolean getAllowPublicSubnet()
FunctionOptions
Use this property to acknowledge this limitation and still place the function in a public subnet.
Default: false
public final Architecture getArchitecture()
FunctionOptions
Default: Architecture.X86_64
getArchitecture
in interface FunctionOptions
public final java.util.List<Architecture> getArchitectures()
FunctionOptions
Default: [Architecture.X86_64]
getArchitectures
in interface FunctionOptions
public final ICodeSigningConfig getCodeSigningConfig()
FunctionOptions
Default: - Not Sign the Code
getCodeSigningConfig
in interface FunctionOptions
public final VersionOptions getCurrentVersionOptions()
FunctionOptions
Default: - default options as described in `VersionOptions`
getCurrentVersionOptions
in interface FunctionOptions
public final IQueue getDeadLetterQueue()
FunctionOptions
If SNS topic is desired, specify deadLetterTopic
property instead.
Default: - SQS queue with 14 day retention period if `deadLetterQueueEnabled` is `true`
getDeadLetterQueue
in interface FunctionOptions
public final java.lang.Boolean getDeadLetterQueueEnabled()
FunctionOptions
If deadLetterQueue
is undefined,
an SQS queue with default options will be defined for your Function.
Default: - false unless `deadLetterQueue` is set, which implies DLQ is enabled.
getDeadLetterQueueEnabled
in interface FunctionOptions
public final ITopic getDeadLetterTopic()
FunctionOptions
Note that if deadLetterQueueEnabled
is set to true
, an SQS queue will be created
rather than an SNS topic. Using an SNS topic as a DLQ requires this property to be set explicitly.
Default: - no SNS topic
getDeadLetterTopic
in interface FunctionOptions
public final java.lang.String getDescription()
FunctionOptions
Default: - No description.
getDescription
in interface FunctionOptions
public final java.util.Map<java.lang.String,java.lang.String> getEnvironment()
FunctionOptions
Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code.
Default: - No environment variables.
getEnvironment
in interface FunctionOptions
public final IKey getEnvironmentEncryption()
FunctionOptions
Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK).
getEnvironmentEncryption
in interface FunctionOptions
public final Size getEphemeralStorageSize()
FunctionOptions
Default: 512 MiB
getEphemeralStorageSize
in interface FunctionOptions
public final java.util.List<IEventSource> getEvents()
FunctionOptions
You can also add event sources using addEventSource
.
Default: - No event sources.
getEvents
in interface FunctionOptions
public final FileSystem getFilesystem()
FunctionOptions
Default: - will not mount any filesystem
getFilesystem
in interface FunctionOptions
public final java.lang.String getFunctionName()
FunctionOptions
Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
getFunctionName
in interface FunctionOptions
public final java.util.List<PolicyStatement> getInitialPolicy()
FunctionOptions
You can call addToRolePolicy
to the created lambda to add statements post creation.
Default: - No policy statements are added to the created Lambda role.
getInitialPolicy
in interface FunctionOptions
public final LambdaInsightsVersion getInsightsVersion()
FunctionOptions
Default: - No Lambda Insights
getInsightsVersion
in interface FunctionOptions
public final java.util.List<ILayerVersion> getLayers()
FunctionOptions
You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions.
Default: - No layers.
getLayers
in interface FunctionOptions
public final RetentionDays getLogRetention()
FunctionOptions
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to INFINITE
.
Default: logs.RetentionDays.INFINITE
getLogRetention
in interface FunctionOptions
public final LogRetentionRetryOptions getLogRetentionRetryOptions()
FunctionOptions
These options control the retry policy when interacting with CloudWatch APIs.
Default: - Default AWS SDK retry options.
getLogRetentionRetryOptions
in interface FunctionOptions
public final IRole getLogRetentionRole()
FunctionOptions
Default: - A new role is created.
getLogRetentionRole
in interface FunctionOptions
public final java.lang.Number getMemorySize()
FunctionOptions
Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide.
Default: 128
getMemorySize
in interface FunctionOptions
public final java.lang.Boolean getProfiling()
FunctionOptions
Default: - No profiling.
getProfiling
in interface FunctionOptions
public final IProfilingGroup getProfilingGroup()
FunctionOptions
Default: - A new profiling group will be created if `profiling` is set.
getProfilingGroup
in interface FunctionOptions
public final java.lang.Number getReservedConcurrentExecutions()
FunctionOptions
Default: - No specific limit - account limit.
getReservedConcurrentExecutions
in interface FunctionOptions
public final IRole getRole()
FunctionOptions
This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal.
The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself.
The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole".
Default: - A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling `addToRolePolicy`.
getRole
in interface FunctionOptions
public final ISecurityGroup getSecurityGroup()
FunctionOptions
Only used if 'vpc' is supplied.
Use securityGroups property instead. Function constructor will throw an error if both are specified.
Default: - If the function is placed within a VPC and a security group is not specified, either by this or securityGroups prop, a dedicated security group will be created for this function.
getSecurityGroup
in interface FunctionOptions
public final java.util.List<ISecurityGroup> getSecurityGroups()
FunctionOptions
Only used if 'vpc' is supplied.
Default: - If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function.
getSecurityGroups
in interface FunctionOptions
public final Duration getTimeout()
FunctionOptions
Because the execution time affects cost, set this value based on the function's expected execution time.
Default: Duration.seconds(3)
getTimeout
in interface FunctionOptions
public final Tracing getTracing()
FunctionOptions
Default: Tracing.Disabled
getTracing
in interface FunctionOptions
public final IVpc getVpc()
FunctionOptions
Specify this if the Lambda function needs to access resources in a VPC.
Default: - Function is not placed within a VPC.
getVpc
in interface FunctionOptions
public final SubnetSelection getVpcSubnets()
FunctionOptions
Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed.
Default: - the Vpc default strategy if not specified
getVpcSubnets
in interface FunctionOptions
public final Duration getMaxEventAge()
EventInvokeConfigOptions
Minimum: 60 seconds Maximum: 6 hours
Default: Duration.hours(6)
getMaxEventAge
in interface EventInvokeConfigOptions
public final IDestination getOnFailure()
EventInvokeConfigOptions
Default: - no destination
getOnFailure
in interface EventInvokeConfigOptions
public final IDestination getOnSuccess()
EventInvokeConfigOptions
Default: - no destination
getOnSuccess
in interface EventInvokeConfigOptions
public final java.lang.Number getRetryAttempts()
EventInvokeConfigOptions
Minimum: 0 Maximum: 2
Default: 2
getRetryAttempts
in interface EventInvokeConfigOptions
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
public final boolean equals(java.lang.Object o)
public final int hashCode()