@Stability(value=Experimental) public static final class NodejsFunctionProps.Builder extends Object
NodejsFunctionProps| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
NodejsFunctionProps.Builder |
allowAllOutbound(Boolean allowAllOutbound)
Sets the value of
FunctionOptions.getAllowAllOutbound() |
NodejsFunctionProps |
build()
Builds the configured instance.
|
NodejsFunctionProps.Builder |
buildDir(String buildDir)
Sets the value of
NodejsFunctionProps.getBuildDir() |
NodejsFunctionProps.Builder |
cacheDir(String cacheDir)
Sets the value of
NodejsFunctionProps.getCacheDir() |
NodejsFunctionProps.Builder |
deadLetterQueue(software.amazon.awscdk.services.sqs.IQueue deadLetterQueue)
Sets the value of
FunctionOptions.getDeadLetterQueue() |
NodejsFunctionProps.Builder |
deadLetterQueueEnabled(Boolean deadLetterQueueEnabled)
Sets the value of
FunctionOptions.getDeadLetterQueueEnabled() |
NodejsFunctionProps.Builder |
description(String description)
Sets the value of
FunctionOptions.getDescription() |
NodejsFunctionProps.Builder |
entry(String entry)
Sets the value of
NodejsFunctionProps.getEntry() |
NodejsFunctionProps.Builder |
environment(Map<String,String> environment)
Sets the value of
FunctionOptions.getEnvironment() |
NodejsFunctionProps.Builder |
events(List<software.amazon.awscdk.services.lambda.IEventSource> events)
Sets the value of
FunctionOptions.getEvents() |
NodejsFunctionProps.Builder |
functionName(String functionName)
Sets the value of
FunctionOptions.getFunctionName() |
NodejsFunctionProps.Builder |
handler(String handler)
Sets the value of
NodejsFunctionProps.getHandler() |
NodejsFunctionProps.Builder |
initialPolicy(List<software.amazon.awscdk.services.iam.PolicyStatement> initialPolicy)
Sets the value of
FunctionOptions.getInitialPolicy() |
NodejsFunctionProps.Builder |
layers(List<software.amazon.awscdk.services.lambda.ILayerVersion> layers)
Sets the value of
FunctionOptions.getLayers() |
NodejsFunctionProps.Builder |
logRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention)
Sets the value of
FunctionOptions.getLogRetention() |
NodejsFunctionProps.Builder |
logRetentionRole(software.amazon.awscdk.services.iam.IRole logRetentionRole)
Sets the value of
FunctionOptions.getLogRetentionRole() |
NodejsFunctionProps.Builder |
maxEventAge(software.amazon.awscdk.core.Duration maxEventAge)
Sets the value of
EventInvokeConfigOptions.getMaxEventAge() |
NodejsFunctionProps.Builder |
memorySize(Number memorySize)
Sets the value of
FunctionOptions.getMemorySize() |
NodejsFunctionProps.Builder |
minify(Boolean minify)
Sets the value of
NodejsFunctionProps.getMinify() |
NodejsFunctionProps.Builder |
onFailure(software.amazon.awscdk.services.lambda.IDestination onFailure)
Sets the value of
EventInvokeConfigOptions.getOnFailure() |
NodejsFunctionProps.Builder |
onSuccess(software.amazon.awscdk.services.lambda.IDestination onSuccess)
Sets the value of
EventInvokeConfigOptions.getOnSuccess() |
NodejsFunctionProps.Builder |
reservedConcurrentExecutions(Number reservedConcurrentExecutions)
Sets the value of
FunctionOptions.getReservedConcurrentExecutions() |
NodejsFunctionProps.Builder |
retryAttempts(Number retryAttempts)
Sets the value of
EventInvokeConfigOptions.getRetryAttempts() |
NodejsFunctionProps.Builder |
role(software.amazon.awscdk.services.iam.IRole role)
Sets the value of
FunctionOptions.getRole() |
NodejsFunctionProps.Builder |
runtime(software.amazon.awscdk.services.lambda.Runtime runtime)
Sets the value of
NodejsFunctionProps.getRuntime() |
NodejsFunctionProps.Builder |
securityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup)
Deprecated.
- This property is deprecated, use securityGroups instead
|
NodejsFunctionProps.Builder |
securityGroups(List<software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups)
Sets the value of
FunctionOptions.getSecurityGroups() |
NodejsFunctionProps.Builder |
sourceMaps(Boolean sourceMaps)
Sets the value of
NodejsFunctionProps.getSourceMaps() |
NodejsFunctionProps.Builder |
timeout(software.amazon.awscdk.core.Duration timeout)
Sets the value of
FunctionOptions.getTimeout() |
NodejsFunctionProps.Builder |
tracing(software.amazon.awscdk.services.lambda.Tracing tracing)
Sets the value of
FunctionOptions.getTracing() |
NodejsFunctionProps.Builder |
vpc(software.amazon.awscdk.services.ec2.IVpc vpc)
Sets the value of
FunctionOptions.getVpc() |
NodejsFunctionProps.Builder |
vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets)
Sets the value of
FunctionOptions.getVpcSubnets() |
@Stability(value=Experimental) public NodejsFunctionProps.Builder buildDir(String buildDir)
NodejsFunctionProps.getBuildDir()buildDir - The build directory.this@Stability(value=Experimental) public NodejsFunctionProps.Builder cacheDir(String cacheDir)
NodejsFunctionProps.getCacheDir()cacheDir - The cache directory.
Parcel uses a filesystem cache for fast rebuilds.this@Stability(value=Experimental) public NodejsFunctionProps.Builder entry(String entry)
NodejsFunctionProps.getEntry()entry - Path to the entry file (JavaScript or TypeScript).this@Stability(value=Experimental) public NodejsFunctionProps.Builder handler(String handler)
NodejsFunctionProps.getHandler()handler - The name of the exported handler in the entry file.this@Stability(value=Experimental) public NodejsFunctionProps.Builder minify(Boolean minify)
NodejsFunctionProps.getMinify()minify - Whether to minify files when bundling.this@Stability(value=Experimental) public NodejsFunctionProps.Builder runtime(software.amazon.awscdk.services.lambda.Runtime runtime)
NodejsFunctionProps.getRuntime()runtime - The runtime environment.
Only runtimes of the Node.js family are
supported.this@Stability(value=Experimental) public NodejsFunctionProps.Builder sourceMaps(Boolean sourceMaps)
NodejsFunctionProps.getSourceMaps()sourceMaps - Whether to include source maps when bundling.this@Stability(value=Stable) public NodejsFunctionProps.Builder allowAllOutbound(Boolean allowAllOutbound)
FunctionOptions.getAllowAllOutbound()allowAllOutbound - Whether to allow the Lambda to send all network traffic.
If set to false, you must individually add traffic rules to allow the
Lambda to connect to network targets.this@Stability(value=Stable) public NodejsFunctionProps.Builder deadLetterQueue(software.amazon.awscdk.services.sqs.IQueue deadLetterQueue)
FunctionOptions.getDeadLetterQueue()deadLetterQueue - The SQS queue to use if DLQ is enabled.this@Stability(value=Stable) public NodejsFunctionProps.Builder deadLetterQueueEnabled(Boolean deadLetterQueueEnabled)
FunctionOptions.getDeadLetterQueueEnabled()deadLetterQueueEnabled - Enabled DLQ.
If deadLetterQueue is undefined,
an SQS queue with default options will be defined for your Function.this@Stability(value=Stable) public NodejsFunctionProps.Builder description(String description)
FunctionOptions.getDescription()description - A description of the function.this@Stability(value=Stable) public NodejsFunctionProps.Builder environment(Map<String,String> environment)
FunctionOptions.getEnvironment()environment - Key-value pairs that Lambda caches and makes available for your Lambda functions.
Use environment variables to apply configuration changes, such
as test and production environment configurations, without changing your
Lambda function source code.this@Stability(value=Stable) public NodejsFunctionProps.Builder events(List<software.amazon.awscdk.services.lambda.IEventSource> events)
FunctionOptions.getEvents()events - Event sources for this function.
You can also add event sources using addEventSource.this@Stability(value=Stable) public NodejsFunctionProps.Builder functionName(String functionName)
FunctionOptions.getFunctionName()functionName - A name for the function.this@Stability(value=Stable) public NodejsFunctionProps.Builder initialPolicy(List<software.amazon.awscdk.services.iam.PolicyStatement> initialPolicy)
FunctionOptions.getInitialPolicy()initialPolicy - Initial policy statements to add to the created Lambda Role.
You can call addToRolePolicy to the created lambda to add statements post creation.this@Stability(value=Stable) public NodejsFunctionProps.Builder layers(List<software.amazon.awscdk.services.lambda.ILayerVersion> layers)
FunctionOptions.getLayers()layers - A list of layers to add to the function's execution environment.
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 mulitple functions.this@Stability(value=Stable) public NodejsFunctionProps.Builder logRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention)
FunctionOptions.getLogRetention()logRetention - The number of days log events are kept in CloudWatch Logs.
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to INFINITE.this@Stability(value=Stable) public NodejsFunctionProps.Builder logRetentionRole(software.amazon.awscdk.services.iam.IRole logRetentionRole)
FunctionOptions.getLogRetentionRole()logRetentionRole - The IAM role for the Lambda function associated with the custom resource that sets the retention policy.this@Stability(value=Stable) public NodejsFunctionProps.Builder memorySize(Number memorySize)
FunctionOptions.getMemorySize()memorySize - The amount of memory, in MB, that is allocated to your Lambda function.
Lambda uses this value to proportionally allocate the amount of CPU
power. For more information, see Resource Model in the AWS Lambda
Developer Guide.this@Stability(value=Stable) public NodejsFunctionProps.Builder reservedConcurrentExecutions(Number reservedConcurrentExecutions)
FunctionOptions.getReservedConcurrentExecutions()reservedConcurrentExecutions - The maximum of concurrent executions you want to reserve for the function.this@Stability(value=Stable) public NodejsFunctionProps.Builder role(software.amazon.awscdk.services.iam.IRole role)
FunctionOptions.getRole()role - Lambda execution role.
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.this@Stability(value=Deprecated) @Deprecated public NodejsFunctionProps.Builder securityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup)
FunctionOptions.getSecurityGroup()securityGroup - What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead.
Only used if 'vpc' is supplied.
Use securityGroups property instead. Function constructor will throw an error if both are specified.
this@Stability(value=Stable) public NodejsFunctionProps.Builder securityGroups(List<software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups)
FunctionOptions.getSecurityGroups()securityGroups - The list of security groups to associate with the Lambda's network interfaces.
Only used if 'vpc' is supplied.this@Stability(value=Stable) public NodejsFunctionProps.Builder timeout(software.amazon.awscdk.core.Duration timeout)
FunctionOptions.getTimeout()timeout - The function execution time (in seconds) after which Lambda terminates the function.
Because the execution time affects cost, set this value
based on the function's expected execution time.this@Stability(value=Stable) public NodejsFunctionProps.Builder tracing(software.amazon.awscdk.services.lambda.Tracing tracing)
FunctionOptions.getTracing()tracing - Enable AWS X-Ray Tracing for Lambda Function.this@Stability(value=Stable) public NodejsFunctionProps.Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc)
FunctionOptions.getVpc()vpc - VPC network to place Lambda network interfaces.
Specify this if the Lambda function needs to access resources in a VPC.this@Stability(value=Stable) public NodejsFunctionProps.Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets)
FunctionOptions.getVpcSubnets()vpcSubnets - Where to place the network interfaces within the VPC.
Only used if 'vpc' is supplied. Note: internet access for Lambdas
requires a NAT gateway, so picking Public subnets is not allowed.this@Stability(value=Stable) public NodejsFunctionProps.Builder maxEventAge(software.amazon.awscdk.core.Duration maxEventAge)
EventInvokeConfigOptions.getMaxEventAge()maxEventAge - The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds
Maximum: 6 hoursthis@Stability(value=Stable) public NodejsFunctionProps.Builder onFailure(software.amazon.awscdk.services.lambda.IDestination onFailure)
EventInvokeConfigOptions.getOnFailure()onFailure - The destination for failed invocations.this@Stability(value=Stable) public NodejsFunctionProps.Builder onSuccess(software.amazon.awscdk.services.lambda.IDestination onSuccess)
EventInvokeConfigOptions.getOnSuccess()onSuccess - The destination for successful invocations.this@Stability(value=Stable) public NodejsFunctionProps.Builder retryAttempts(Number retryAttempts)
EventInvokeConfigOptions.getRetryAttempts()retryAttempts - The maximum number of times to retry when the function returns an error.
Minimum: 0
Maximum: 2this@Stability(value=Experimental) public NodejsFunctionProps build()
NodejsFunctionPropsNullPointerException - if any required attribute was not providedCopyright © 2024. All rights reserved.