@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:21.518Z") @Stability(value=Experimental) public interface FunctionOptions extends software.amazon.jsii.JsiiSerializable, EventInvokeConfigOptions
| Modifier and Type | Interface and Description |
|---|---|
static class |
FunctionOptions.Builder
A builder for
FunctionOptions |
static class |
FunctionOptions.Jsii$Proxy
An implementation for
FunctionOptions |
| Modifier and Type | Method and Description |
|---|---|
static FunctionOptions.Builder |
builder() |
default Boolean |
getAllowAllOutbound()
(experimental) Whether to allow the Lambda to send all network traffic.
|
default Boolean |
getAllowPublicSubnet()
(experimental) Lambda Functions in a public subnet can NOT access the internet.
|
default ICodeSigningConfig |
getCodeSigningConfig()
(experimental) Code signing config associated with this function.
|
default VersionOptions |
getCurrentVersionOptions()
(experimental) Options for the `lambda.Version` resource automatically created by the `fn.currentVersion` method.
|
default IQueue |
getDeadLetterQueue()
(experimental) The SQS queue to use if DLQ is enabled.
|
default Boolean |
getDeadLetterQueueEnabled()
(experimental) Enabled DLQ.
|
default String |
getDescription()
(experimental) A description of the function.
|
default Map<String,String> |
getEnvironment()
(experimental) Key-value pairs that Lambda caches and makes available for your Lambda functions.
|
default IKey |
getEnvironmentEncryption()
(experimental) The AWS KMS key that's used to encrypt your function's environment variables.
|
default List<IEventSource> |
getEvents()
(experimental) Event sources for this function.
|
default FileSystem |
getFilesystem()
(experimental) The filesystem configuration for the lambda function.
|
default String |
getFunctionName()
(experimental) A name for the function.
|
default List<PolicyStatement> |
getInitialPolicy()
(experimental) Initial policy statements to add to the created Lambda Role.
|
default List<ILayerVersion> |
getLayers()
(experimental) A list of layers to add to the function's execution environment.
|
default RetentionDays |
getLogRetention()
(experimental) The number of days log events are kept in CloudWatch Logs.
|
default LogRetentionRetryOptions |
getLogRetentionRetryOptions()
(experimental) When log retention is specified, a custom resource attempts to create the CloudWatch log group.
|
default IRole |
getLogRetentionRole()
(experimental) The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
default Number |
getMemorySize()
(experimental) The amount of memory, in MB, that is allocated to your Lambda function.
|
default Boolean |
getProfiling()
(experimental) Enable profiling.
|
default IProfilingGroup |
getProfilingGroup()
(experimental) Profiling Group.
|
default Number |
getReservedConcurrentExecutions()
(experimental) The maximum of concurrent executions you want to reserve for the function.
|
default IRole |
getRole()
(experimental) Lambda execution role.
|
default List<ISecurityGroup> |
getSecurityGroups()
(experimental) The list of security groups to associate with the Lambda's network interfaces.
|
default Duration |
getTimeout()
(experimental) The function execution time (in seconds) after which Lambda terminates the function.
|
default Tracing |
getTracing()
(experimental) Enable AWS X-Ray Tracing for Lambda Function.
|
default IVpc |
getVpc()
(experimental) VPC network to place Lambda network interfaces.
|
default SubnetSelection |
getVpcSubnets()
(experimental) Where to place the network interfaces within the VPC.
|
getMaxEventAge, getOnFailure, getOnSuccess, getRetryAttempts@Stability(value=Experimental) @Nullable default Boolean getAllowAllOutbound()
If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets.
Default: true
@Stability(value=Experimental) @Nullable default Boolean getAllowPublicSubnet()
Use this property to acknowledge this limitation and still place the function in a public subnet.
Default: false
https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841@Stability(value=Experimental) @Nullable default ICodeSigningConfig getCodeSigningConfig()
Default: - Not Sign the Code
@Stability(value=Experimental) @Nullable default VersionOptions getCurrentVersionOptions()
Default: - default options as described in `VersionOptions`
@Stability(value=Experimental) @Nullable default IQueue getDeadLetterQueue()
Default: - SQS queue with 14 day retention period if `deadLetterQueueEnabled` is `true`
@Stability(value=Experimental) @Nullable default Boolean getDeadLetterQueueEnabled()
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.
@Stability(value=Experimental) @Nullable default String getDescription()
Default: - No description.
@Stability(value=Experimental) @Nullable default Map<String,String> getEnvironment()
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.
@Stability(value=Experimental) @Nullable default IKey getEnvironmentEncryption()
Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK).
@Stability(value=Experimental) @Nullable default List<IEventSource> getEvents()
You can also add event sources using addEventSource.
Default: - No event sources.
@Stability(value=Experimental) @Nullable default FileSystem getFilesystem()
Default: - will not mount any filesystem
@Stability(value=Experimental) @Nullable default String getFunctionName()
Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
@Stability(value=Experimental) @Nullable default List<PolicyStatement> getInitialPolicy()
You can call addToRolePolicy to the created lambda to add statements post creation.
Default: - No policy statements are added to the created Lambda role.
@Stability(value=Experimental) @Nullable default List<ILayerVersion> getLayers()
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.
@Stability(value=Experimental) @Nullable default RetentionDays getLogRetention()
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
@Stability(value=Experimental) @Nullable default LogRetentionRetryOptions getLogRetentionRetryOptions()
These options control the retry policy when interacting with CloudWatch APIs.
Default: - Default AWS SDK retry options.
@Stability(value=Experimental) @Nullable default IRole getLogRetentionRole()
Default: - A new role is created.
@Stability(value=Experimental) @Nullable default Number getMemorySize()
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
@Stability(value=Experimental) @Nullable default Boolean getProfiling()
Default: - No profiling.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html@Stability(value=Experimental) @Nullable default IProfilingGroup getProfilingGroup()
Default: - A new profiling group will be created if `profiling` is set.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html@Stability(value=Experimental) @Nullable default Number getReservedConcurrentExecutions()
Default: - No specific limit - account limit.
https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html@Stability(value=Experimental) @Nullable default IRole getRole()
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`.
@Stability(value=Experimental) @Nullable default List<ISecurityGroup> getSecurityGroups()
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.
@Stability(value=Experimental) @Nullable default Duration getTimeout()
Because the execution time affects cost, set this value based on the function's expected execution time.
Default: Duration.seconds(3)
@Stability(value=Experimental) @Nullable default Tracing getTracing()
Default: Tracing.Disabled
@Stability(value=Experimental) @Nullable default IVpc getVpc()
Specify this if the Lambda function needs to access resources in a VPC.
Default: - Function is not placed within a VPC.
@Stability(value=Experimental) @Nullable default SubnetSelection getVpcSubnets()
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
@Stability(value=Experimental) static FunctionOptions.Builder builder()
builder in interface EventInvokeConfigOptionsFunctionOptions.Builder of FunctionOptionsCopyright © 2021. All rights reserved.