@Stability(value=Experimental) @Internal public static final class GoFunctionProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GoFunctionProps
GoFunctionPropssoftware.amazon.jsii.JsiiObject.InitializationModeGoFunctionProps.Builder, GoFunctionProps.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(GoFunctionProps.Builder builder)
Constructor that initializes the object based on literal property values passed by the
GoFunctionProps.Builder. |
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(Object o) |
Boolean |
getAllowAllOutbound()
(experimental) Whether to allow the Lambda to send all network traffic.
|
Boolean |
getAllowPublicSubnet()
(experimental) Lambda Functions in a public subnet can NOT access the internet.
|
Architecture |
getArchitecture()
(experimental) The system architectures compatible with this lambda function.
|
List<Architecture> |
getArchitectures()
(deprecated) DEPRECATED.
|
BundlingOptions |
getBundling()
(experimental) Bundling options.
|
ICodeSigningConfig |
getCodeSigningConfig()
(experimental) Code signing config associated with this function.
|
VersionOptions |
getCurrentVersionOptions()
(experimental) Options for the `lambda.Version` resource automatically created by the `fn.currentVersion` method.
|
IQueue |
getDeadLetterQueue()
(experimental) The SQS queue to use if DLQ is enabled.
|
Boolean |
getDeadLetterQueueEnabled()
(experimental) Enabled DLQ.
|
String |
getDescription()
(experimental) A description of the function.
|
String |
getEntry()
(experimental) The path to the folder or file that contains the main application entry point files for the project.
|
Map<String,String> |
getEnvironment()
(experimental) Key-value pairs that Lambda caches and makes available for your Lambda functions.
|
IKey |
getEnvironmentEncryption()
(experimental) The AWS KMS key that's used to encrypt your function's environment variables.
|
List<IEventSource> |
getEvents()
(experimental) Event sources for this function.
|
FileSystem |
getFilesystem()
(experimental) The filesystem configuration for the lambda function.
|
String |
getFunctionName()
(experimental) A name for the function.
|
List<PolicyStatement> |
getInitialPolicy()
(experimental) Initial policy statements to add to the created Lambda Role.
|
LambdaInsightsVersion |
getInsightsVersion()
(experimental) Specify the version of CloudWatch Lambda insights to use for monitoring.
|
List<ILayerVersion> |
getLayers()
(experimental) A list of layers to add to the function's execution environment.
|
RetentionDays |
getLogRetention()
(experimental) The number of days log events are kept in CloudWatch Logs.
|
LogRetentionRetryOptions |
getLogRetentionRetryOptions()
(experimental) When log retention is specified, a custom resource attempts to create the CloudWatch log group.
|
IRole |
getLogRetentionRole()
(experimental) The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
Duration |
getMaxEventAge()
(experimental) The maximum age of a request that Lambda sends to a function for processing.
|
Number |
getMemorySize()
(experimental) The amount of memory, in MB, that is allocated to your Lambda function.
|
String |
getModuleDir()
(experimental) Directory containing your go.mod file.
|
IDestination |
getOnFailure()
(experimental) The destination for failed invocations.
|
IDestination |
getOnSuccess()
(experimental) The destination for successful invocations.
|
Boolean |
getProfiling()
(experimental) Enable profiling.
|
IProfilingGroup |
getProfilingGroup()
(experimental) Profiling Group.
|
Number |
getReservedConcurrentExecutions()
(experimental) The maximum of concurrent executions you want to reserve for the function.
|
Number |
getRetryAttempts()
(experimental) The maximum number of times to retry when the function returns an error.
|
IRole |
getRole()
(experimental) Lambda execution role.
|
Runtime |
getRuntime()
(experimental) The runtime environment.
|
ISecurityGroup |
getSecurityGroup()
(deprecated) What security group to associate with the Lambda's network interfaces.
|
List<ISecurityGroup> |
getSecurityGroups()
(experimental) The list of security groups to associate with the Lambda's network interfaces.
|
Duration |
getTimeout()
(experimental) The function execution time (in seconds) after which Lambda terminates the function.
|
Tracing |
getTracing()
(experimental) Enable AWS X-Ray Tracing for Lambda Function.
|
IVpc |
getVpc()
(experimental) VPC network to place Lambda network interfaces.
|
SubnetSelection |
getVpcSubnets()
(experimental) Where to place the network interfaces within the VPC.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(GoFunctionProps.Builder builder)
GoFunctionProps.Builder.public final String getEntry()
GoFunctionPropsThis accepts either a path to a directory or file.
If a directory path is provided then it will assume there is a Go entry file (i.e. main.go) and
will construct the build command using the directory path.
For example, if you provide the entry as:
entry: 'my-lambda-app/cmd/api'
Then the go build command would be:
`go build ./cmd/api`
If a path to a file is provided then it will use the filepath in the build command.
For example, if you provide the entry as:
entry: 'my-lambda-app/cmd/api/main.go'
Then the go build command would be:
`go build ./cmd/api/main.go`
getEntry in interface GoFunctionPropspublic final BundlingOptions getBundling()
GoFunctionPropsDefault: - use default bundling options
getBundling in interface GoFunctionPropspublic final String getModuleDir()
GoFunctionProps
This will accept either a directory path containing a go.mod file
or a filepath to your go.mod file (i.e. path/to/go.mod).
This will be used as the source of the volume mounted in the Docker
container and will be the directory where it will run go build from.
Default: - the path is found by walking up parent directories searching for a `go.mod` file from the location of `entry`
getModuleDir in interface GoFunctionPropspublic final Runtime getRuntime()
GoFunctionPropsOnly runtimes of the Golang family and provided family are supported.
Default: lambda.Runtime.PROVIDED_AL2
getRuntime in interface GoFunctionPropspublic final Boolean getAllowAllOutbound()
FunctionOptionsIf set to false, you must individually add traffic rules to allow the Lambda to connect to network targets.
Default: true
getAllowAllOutbound in interface FunctionOptionspublic final Boolean getAllowPublicSubnet()
FunctionOptionsUse this property to acknowledge this limitation and still place the function in a public subnet.
Default: false
getAllowPublicSubnet in interface FunctionOptionshttps://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841public final Architecture getArchitecture()
FunctionOptionsDefault: Architecture.X86_64
getArchitecture in interface FunctionOptionspublic final List<Architecture> getArchitectures()
FunctionOptionsDefault: [Architecture.X86_64]
getArchitectures in interface FunctionOptionspublic final ICodeSigningConfig getCodeSigningConfig()
FunctionOptionsDefault: - Not Sign the Code
getCodeSigningConfig in interface FunctionOptionspublic final VersionOptions getCurrentVersionOptions()
FunctionOptionsDefault: - default options as described in `VersionOptions`
getCurrentVersionOptions in interface FunctionOptionspublic final IQueue getDeadLetterQueue()
FunctionOptionsDefault: - SQS queue with 14 day retention period if `deadLetterQueueEnabled` is `true`
getDeadLetterQueue in interface FunctionOptionspublic final 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 FunctionOptionspublic final String getDescription()
FunctionOptionsDefault: - No description.
getDescription in interface FunctionOptionspublic final Map<String,String> getEnvironment()
FunctionOptionsUse 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 FunctionOptionspublic final IKey getEnvironmentEncryption()
FunctionOptionsDefault: - AWS Lambda creates and uses an AWS managed customer master key (CMK).
getEnvironmentEncryption in interface FunctionOptionspublic final List<IEventSource> getEvents()
FunctionOptions
You can also add event sources using addEventSource.
Default: - No event sources.
getEvents in interface FunctionOptionspublic final FileSystem getFilesystem()
FunctionOptionsDefault: - will not mount any filesystem
getFilesystem in interface FunctionOptionspublic final String getFunctionName()
FunctionOptionsDefault: - 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 FunctionOptionspublic final 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 FunctionOptionspublic final LambdaInsightsVersion getInsightsVersion()
FunctionOptionsDefault: - No Lambda Insights
getInsightsVersion in interface FunctionOptionshttps://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-Getting-Started-docker.htmlpublic final List<ILayerVersion> getLayers()
FunctionOptionsYou 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 FunctionOptionspublic 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 FunctionOptionspublic final LogRetentionRetryOptions getLogRetentionRetryOptions()
FunctionOptionsThese options control the retry policy when interacting with CloudWatch APIs.
Default: - Default AWS SDK retry options.
getLogRetentionRetryOptions in interface FunctionOptionspublic final IRole getLogRetentionRole()
FunctionOptionsDefault: - A new role is created.
getLogRetentionRole in interface FunctionOptionspublic final Number getMemorySize()
FunctionOptionsLambda 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 FunctionOptionspublic final Boolean getProfiling()
FunctionOptionsDefault: - No profiling.
getProfiling in interface FunctionOptionshttps://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.htmlpublic final IProfilingGroup getProfilingGroup()
FunctionOptionsDefault: - A new profiling group will be created if `profiling` is set.
getProfilingGroup in interface FunctionOptionshttps://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.htmlpublic final Number getReservedConcurrentExecutions()
FunctionOptionsDefault: - No specific limit - account limit.
getReservedConcurrentExecutions in interface FunctionOptionshttps://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.htmlpublic final IRole getRole()
FunctionOptionsThis 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 FunctionOptionspublic final ISecurityGroup getSecurityGroup()
FunctionOptionsOnly 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 FunctionOptionspublic final List<ISecurityGroup> getSecurityGroups()
FunctionOptionsOnly 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 FunctionOptionspublic final Duration getTimeout()
FunctionOptionsBecause the execution time affects cost, set this value based on the function's expected execution time.
Default: Duration.seconds(3)
getTimeout in interface FunctionOptionspublic final Tracing getTracing()
FunctionOptionsDefault: Tracing.Disabled
getTracing in interface FunctionOptionspublic final IVpc getVpc()
FunctionOptionsSpecify this if the Lambda function needs to access resources in a VPC.
Default: - Function is not placed within a VPC.
getVpc in interface FunctionOptionspublic final SubnetSelection getVpcSubnets()
FunctionOptionsOnly 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 FunctionOptionspublic final Duration getMaxEventAge()
EventInvokeConfigOptionsMinimum: 60 seconds Maximum: 6 hours
Default: Duration.hours(6)
getMaxEventAge in interface EventInvokeConfigOptionspublic final IDestination getOnFailure()
EventInvokeConfigOptionsDefault: - no destination
getOnFailure in interface EventInvokeConfigOptionspublic final IDestination getOnSuccess()
EventInvokeConfigOptionsDefault: - no destination
getOnSuccess in interface EventInvokeConfigOptionspublic final Number getRetryAttempts()
EventInvokeConfigOptionsMinimum: 0 Maximum: 2
Default: 2
getRetryAttempts in interface EventInvokeConfigOptions@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2022. All rights reserved.