Class RustFunction.Builder
- java.lang.Object
-
- io.github.cdklabs.awslambdarust.RustFunction.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<RustFunction>
- Enclosing class:
- RustFunction
@Stability(Experimental) public static final class RustFunction.Builder extends Object implements software.amazon.jsii.Builder<RustFunction>
(experimental) A fluent builder forRustFunction.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RustFunction.BuilderadotInstrumentation(software.amazon.awscdk.services.lambda.AdotInstrumentationConfig adotInstrumentation)Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.RustFunction.BuilderallowAllOutbound(Boolean allowAllOutbound)Whether to allow the Lambda to send all network traffic.RustFunction.BuilderallowPublicSubnet(Boolean allowPublicSubnet)Lambda Functions in a public subnet can NOT access the internet.RustFunction.BuilderapplicationLogLevel(String applicationLogLevel)Sets the application log level for the function.RustFunction.Builderarchitecture(software.amazon.awscdk.services.lambda.Architecture architecture)The system architectures compatible with this lambda function.RustFunction.BuilderbinaryName(String binaryName)(experimental) The name of the binary to build, in case that it's different that the package's name.RustFunctionbuild()RustFunction.Builderbundling(BundlingOptions bundling)(experimental) Bundling options.RustFunction.BuildercodeSigningConfig(software.amazon.awscdk.services.lambda.ICodeSigningConfig codeSigningConfig)Code signing config associated with this function.static RustFunction.Buildercreate(software.constructs.Construct scope, String id)RustFunction.BuildercurrentVersionOptions(software.amazon.awscdk.services.lambda.VersionOptions currentVersionOptions)Options for thelambda.Versionresource automatically created by thefn.currentVersionmethod.RustFunction.BuilderdeadLetterQueue(software.amazon.awscdk.services.sqs.IQueue deadLetterQueue)The SQS queue to use if DLQ is enabled.RustFunction.BuilderdeadLetterQueueEnabled(Boolean deadLetterQueueEnabled)Enabled DLQ.RustFunction.BuilderdeadLetterTopic(software.amazon.awscdk.services.sns.ITopic deadLetterTopic)The SNS topic to use as a DLQ.RustFunction.Builderdescription(String description)A description of the function.RustFunction.Builderentry(String entry)(experimental) Path to the entry Cargo.toml file.RustFunction.Builderenvironment(Map<String,String> environment)Key-value pairs that Lambda caches and makes available for your Lambda functions.RustFunction.BuilderenvironmentEncryption(software.amazon.awscdk.services.kms.IKey environmentEncryption)The AWS KMS key that's used to encrypt your function's environment variables.RustFunction.BuilderephemeralStorageSize(software.amazon.awscdk.Size ephemeralStorageSize)The size of the function’s /tmp directory in MiB.RustFunction.Builderevents(List<? extends software.amazon.awscdk.services.lambda.IEventSource> events)Event sources for this function.RustFunction.Builderfilesystem(software.amazon.awscdk.services.lambda.FileSystem filesystem)The filesystem configuration for the lambda function.RustFunction.BuilderfunctionName(String functionName)A name for the function.RustFunction.BuilderinitialPolicy(List<? extends software.amazon.awscdk.services.iam.PolicyStatement> initialPolicy)Initial policy statements to add to the created Lambda Role.RustFunction.BuilderinsightsVersion(software.amazon.awscdk.services.lambda.LambdaInsightsVersion insightsVersion)Specify the version of CloudWatch Lambda insights to use for monitoring.RustFunction.Builderlayers(List<? extends software.amazon.awscdk.services.lambda.ILayerVersion> layers)A list of layers to add to the function's execution environment.RustFunction.BuilderlogFormat(String logFormat)Sets the logFormat for the function.RustFunction.BuilderlogGroup(software.amazon.awscdk.services.logs.ILogGroup logGroup)Sets the log group name for the function.RustFunction.BuilderlogRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention)The number of days log events are kept in CloudWatch Logs.RustFunction.BuilderlogRetentionRetryOptions(software.amazon.awscdk.services.lambda.LogRetentionRetryOptions logRetentionRetryOptions)When log retention is specified, a custom resource attempts to create the CloudWatch log group.RustFunction.BuilderlogRetentionRole(software.amazon.awscdk.services.iam.IRole logRetentionRole)The IAM role for the Lambda function associated with the custom resource that sets the retention policy.RustFunction.BuildermaxEventAge(software.amazon.awscdk.Duration maxEventAge)The maximum age of a request that Lambda sends to a function for processing.RustFunction.BuildermemorySize(Number memorySize)The amount of memory, in MB, that is allocated to your Lambda function.RustFunction.BuilderonFailure(software.amazon.awscdk.services.lambda.IDestination onFailure)The destination for failed invocations.RustFunction.BuilderonSuccess(software.amazon.awscdk.services.lambda.IDestination onSuccess)The destination for successful invocations.RustFunction.BuilderparamsAndSecrets(software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion paramsAndSecrets)Specify the configuration of Parameters and Secrets Extension.RustFunction.Builderprofiling(Boolean profiling)Enable profiling.RustFunction.BuilderprofilingGroup(software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup profilingGroup)Profiling Group.RustFunction.BuilderprojectRoot(String projectRoot)(experimental) The path to the directory containing project Manifest file.RustFunction.BuilderreservedConcurrentExecutions(Number reservedConcurrentExecutions)The maximum of concurrent executions you want to reserve for the function.RustFunction.BuilderretryAttempts(Number retryAttempts)The maximum number of times to retry when the function returns an error.RustFunction.Builderrole(software.amazon.awscdk.services.iam.IRole role)Lambda execution role.RustFunction.Builderruntime(software.amazon.awscdk.services.lambda.Runtime runtime)(experimental) The runtime environment.RustFunction.BuilderruntimeManagementMode(software.amazon.awscdk.services.lambda.RuntimeManagementMode runtimeManagementMode)Sets the runtime management configuration for a function's version.RustFunction.BuildersecurityGroups(List<? extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups)The list of security groups to associate with the Lambda's network interfaces.RustFunction.BuildersnapStart(software.amazon.awscdk.services.lambda.SnapStartConf snapStart)Enable SnapStart for Lambda Function.RustFunction.BuildersystemLogLevel(String systemLogLevel)Sets the system log level for the function.RustFunction.Buildertimeout(software.amazon.awscdk.Duration timeout)The function execution time (in seconds) after which Lambda terminates the function.RustFunction.Buildertracing(software.amazon.awscdk.services.lambda.Tracing tracing)Enable AWS X-Ray Tracing for Lambda Function.RustFunction.Buildervpc(software.amazon.awscdk.services.ec2.IVpc vpc)VPC network to place Lambda network interfaces.RustFunction.BuildervpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets)Where to place the network interfaces within the VPC.
-
-
-
Method Detail
-
create
@Stability(Experimental) public static RustFunction.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
RustFunction.Builder.
-
maxEventAge
@Stability(Stable) public RustFunction.Builder maxEventAge(software.amazon.awscdk.Duration maxEventAge)
The maximum age of a request that Lambda sends to a function for processing.Minimum: 60 seconds Maximum: 6 hours
Default: Duration.hours(6)
- Parameters:
maxEventAge- The maximum age of a request that Lambda sends to a function for processing. This parameter is required.- Returns:
this
-
onFailure
@Stability(Stable) public RustFunction.Builder onFailure(software.amazon.awscdk.services.lambda.IDestination onFailure)
The destination for failed invocations.Default: - no destination
- Parameters:
onFailure- The destination for failed invocations. This parameter is required.- Returns:
this
-
onSuccess
@Stability(Stable) public RustFunction.Builder onSuccess(software.amazon.awscdk.services.lambda.IDestination onSuccess)
The destination for successful invocations.Default: - no destination
- Parameters:
onSuccess- The destination for successful invocations. This parameter is required.- Returns:
this
-
retryAttempts
@Stability(Stable) public RustFunction.Builder retryAttempts(Number retryAttempts)
The maximum number of times to retry when the function returns an error.Minimum: 0 Maximum: 2
Default: 2
- Parameters:
retryAttempts- The maximum number of times to retry when the function returns an error. This parameter is required.- Returns:
this
-
adotInstrumentation
@Stability(Stable) public RustFunction.Builder adotInstrumentation(software.amazon.awscdk.services.lambda.AdotInstrumentationConfig adotInstrumentation)
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.Default: - No ADOT instrumentation
- Parameters:
adotInstrumentation- Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation. This parameter is required.- Returns:
this- See Also:
- https://aws-otel.github.io/docs/getting-started/lambda
-
allowAllOutbound
@Stability(Stable) public RustFunction.Builder allowAllOutbound(Boolean 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.
Do not specify this property if the
securityGroupsorsecurityGroupproperty is set. Instead, configureallowAllOutbounddirectly on the security group.Default: true
- Parameters:
allowAllOutbound- Whether to allow the Lambda to send all network traffic. This parameter is required.- Returns:
this
-
allowPublicSubnet
@Stability(Stable) public RustFunction.Builder allowPublicSubnet(Boolean allowPublicSubnet)
Lambda Functions in a public subnet can NOT access the internet.Use this property to acknowledge this limitation and still place the function in a public subnet.
Default: false
- Parameters:
allowPublicSubnet- Lambda Functions in a public subnet can NOT access the internet. This parameter is required.- Returns:
this- See Also:
- https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841
-
applicationLogLevel
@Stability(Stable) public RustFunction.Builder applicationLogLevel(String applicationLogLevel)
Sets the application log level for the function.Default: INFO
- Parameters:
applicationLogLevel- Sets the application log level for the function. This parameter is required.- Returns:
this
-
architecture
@Stability(Stable) public RustFunction.Builder architecture(software.amazon.awscdk.services.lambda.Architecture architecture)
The system architectures compatible with this lambda function.Default: Architecture.X86_64
- Parameters:
architecture- The system architectures compatible with this lambda function. This parameter is required.- Returns:
this
-
codeSigningConfig
@Stability(Stable) public RustFunction.Builder codeSigningConfig(software.amazon.awscdk.services.lambda.ICodeSigningConfig codeSigningConfig)
Code signing config associated with this function.Default: - Not Sign the Code
- Parameters:
codeSigningConfig- Code signing config associated with this function. This parameter is required.- Returns:
this
-
currentVersionOptions
@Stability(Stable) public RustFunction.Builder currentVersionOptions(software.amazon.awscdk.services.lambda.VersionOptions currentVersionOptions)
Options for thelambda.Versionresource automatically created by thefn.currentVersionmethod.Default: - default options as described in `VersionOptions`
- Parameters:
currentVersionOptions- Options for thelambda.Versionresource automatically created by thefn.currentVersionmethod. This parameter is required.- Returns:
this
-
deadLetterQueue
@Stability(Stable) public RustFunction.Builder deadLetterQueue(software.amazon.awscdk.services.sqs.IQueue deadLetterQueue)
The SQS queue to use if DLQ is enabled.If SNS topic is desired, specify
deadLetterTopicproperty instead.Default: - SQS queue with 14 day retention period if `deadLetterQueueEnabled` is `true`
- Parameters:
deadLetterQueue- The SQS queue to use if DLQ is enabled. This parameter is required.- Returns:
this
-
deadLetterQueueEnabled
@Stability(Stable) public RustFunction.Builder deadLetterQueueEnabled(Boolean deadLetterQueueEnabled)
Enabled DLQ.If
deadLetterQueueis undefined, an SQS queue with default options will be defined for your Function.Default: - false unless `deadLetterQueue` is set, which implies DLQ is enabled.
- Parameters:
deadLetterQueueEnabled- Enabled DLQ. This parameter is required.- Returns:
this
-
deadLetterTopic
@Stability(Stable) public RustFunction.Builder deadLetterTopic(software.amazon.awscdk.services.sns.ITopic deadLetterTopic)
The SNS topic to use as a DLQ.Note that if
deadLetterQueueEnabledis set totrue, 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
- Parameters:
deadLetterTopic- The SNS topic to use as a DLQ. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public RustFunction.Builder description(String description)
A description of the function.Default: - No description.
- Parameters:
description- A description of the function. This parameter is required.- Returns:
this
-
environment
@Stability(Stable) public RustFunction.Builder environment(Map<String,String> 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.
Default: - No environment variables.
- Parameters:
environment- Key-value pairs that Lambda caches and makes available for your Lambda functions. This parameter is required.- Returns:
this
-
environmentEncryption
@Stability(Stable) public RustFunction.Builder environmentEncryption(software.amazon.awscdk.services.kms.IKey environmentEncryption)
The AWS KMS key that's used to encrypt your function's environment variables.Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK).
- Parameters:
environmentEncryption- The AWS KMS key that's used to encrypt your function's environment variables. This parameter is required.- Returns:
this
-
ephemeralStorageSize
@Stability(Stable) public RustFunction.Builder ephemeralStorageSize(software.amazon.awscdk.Size ephemeralStorageSize)
The size of the function’s /tmp directory in MiB.Default: 512 MiB
- Parameters:
ephemeralStorageSize- The size of the function’s /tmp directory in MiB. This parameter is required.- Returns:
this
-
events
@Stability(Stable) public RustFunction.Builder events(List<? extends software.amazon.awscdk.services.lambda.IEventSource> events)
Event sources for this function.You can also add event sources using
addEventSource.Default: - No event sources.
- Parameters:
events- Event sources for this function. This parameter is required.- Returns:
this
-
filesystem
@Stability(Stable) public RustFunction.Builder filesystem(software.amazon.awscdk.services.lambda.FileSystem filesystem)
The filesystem configuration for the lambda function.Default: - will not mount any filesystem
- Parameters:
filesystem- The filesystem configuration for the lambda function. This parameter is required.- Returns:
this
-
functionName
@Stability(Stable) public RustFunction.Builder functionName(String functionName)
A name for the function.Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
- Parameters:
functionName- A name for the function. This parameter is required.- Returns:
this
-
initialPolicy
@Stability(Stable) public RustFunction.Builder initialPolicy(List<? extends software.amazon.awscdk.services.iam.PolicyStatement> initialPolicy)
Initial policy statements to add to the created Lambda Role.You can call
addToRolePolicyto the created lambda to add statements post creation.Default: - No policy statements are added to the created Lambda role.
- Parameters:
initialPolicy- Initial policy statements to add to the created Lambda Role. This parameter is required.- Returns:
this
-
insightsVersion
@Stability(Stable) public RustFunction.Builder insightsVersion(software.amazon.awscdk.services.lambda.LambdaInsightsVersion insightsVersion)
Specify the version of CloudWatch Lambda insights to use for monitoring.Default: - No Lambda Insights
- Parameters:
insightsVersion- Specify the version of CloudWatch Lambda insights to use for monitoring. This parameter is required.- Returns:
this- See Also:
- https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-Getting-Started-docker.html
-
layers
@Stability(Stable) public RustFunction.Builder layers(List<? extends software.amazon.awscdk.services.lambda.ILayerVersion> 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 multiple functions.
Default: - No layers.
- Parameters:
layers- A list of layers to add to the function's execution environment. This parameter is required.- Returns:
this
-
logFormat
@Stability(Stable) public RustFunction.Builder logFormat(String logFormat)
Sets the logFormat for the function.Default: Text format
- Parameters:
logFormat- Sets the logFormat for the function. This parameter is required.- Returns:
this
-
logGroup
@Stability(Stable) public RustFunction.Builder logGroup(software.amazon.awscdk.services.logs.ILogGroup logGroup)
Sets the log group name for the function.Default: `/aws/lambda/${this.functionName}` default log group name created by Lambda
- Parameters:
logGroup- Sets the log group name for the function. This parameter is required.- Returns:
this
-
logRetention
@Stability(Stable) public RustFunction.Builder logRetention(software.amazon.awscdk.services.logs.RetentionDays 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.Default: logs.RetentionDays.INFINITE
- Parameters:
logRetention- The number of days log events are kept in CloudWatch Logs. This parameter is required.- Returns:
this
-
logRetentionRetryOptions
@Stability(Stable) public RustFunction.Builder logRetentionRetryOptions(software.amazon.awscdk.services.lambda.LogRetentionRetryOptions logRetentionRetryOptions)
When log retention is specified, a custom resource attempts to create the CloudWatch log group.These options control the retry policy when interacting with CloudWatch APIs.
Default: - Default AWS SDK retry options.
- Parameters:
logRetentionRetryOptions- When log retention is specified, a custom resource attempts to create the CloudWatch log group. This parameter is required.- Returns:
this
-
logRetentionRole
@Stability(Stable) public RustFunction.Builder logRetentionRole(software.amazon.awscdk.services.iam.IRole logRetentionRole)
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.Default: - A new role is created.
- Parameters:
logRetentionRole- The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This parameter is required.- Returns:
this
-
memorySize
@Stability(Stable) public RustFunction.Builder memorySize(Number 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.
Default: 128
- Parameters:
memorySize- The amount of memory, in MB, that is allocated to your Lambda function. This parameter is required.- Returns:
this
-
paramsAndSecrets
@Stability(Stable) public RustFunction.Builder paramsAndSecrets(software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion paramsAndSecrets)
Specify the configuration of Parameters and Secrets Extension.Default: - No Parameters and Secrets Extension
- Parameters:
paramsAndSecrets- Specify the configuration of Parameters and Secrets Extension. This parameter is required.- Returns:
this- See Also:
- https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html
-
profiling
@Stability(Stable) public RustFunction.Builder profiling(Boolean profiling)
Enable profiling.Default: - No profiling.
- Parameters:
profiling- Enable profiling. This parameter is required.- Returns:
this- See Also:
- https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
-
profilingGroup
@Stability(Stable) public RustFunction.Builder profilingGroup(software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup profilingGroup)
Profiling Group.Default: - A new profiling group will be created if `profiling` is set.
- Parameters:
profilingGroup- Profiling Group. This parameter is required.- Returns:
this- See Also:
- https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
-
reservedConcurrentExecutions
@Stability(Stable) public RustFunction.Builder reservedConcurrentExecutions(Number reservedConcurrentExecutions)
The maximum of concurrent executions you want to reserve for the function.Default: - No specific limit - account limit.
- Parameters:
reservedConcurrentExecutions- The maximum of concurrent executions you want to reserve for the function. This parameter is required.- Returns:
this- See Also:
- https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
-
role
@Stability(Stable) public RustFunction.Builder role(software.amazon.awscdk.services.iam.IRole 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.
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`.
- Parameters:
role- Lambda execution role. This parameter is required.- Returns:
this
-
runtimeManagementMode
@Stability(Stable) public RustFunction.Builder runtimeManagementMode(software.amazon.awscdk.services.lambda.RuntimeManagementMode runtimeManagementMode)
Sets the runtime management configuration for a function's version.Default: Auto
- Parameters:
runtimeManagementMode- Sets the runtime management configuration for a function's version. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public RustFunction.Builder securityGroups(List<? extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups)
The list of security groups to associate with the Lambda's network interfaces.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.
- Parameters:
securityGroups- The list of security groups to associate with the Lambda's network interfaces. This parameter is required.- Returns:
this
-
snapStart
@Stability(Stable) public RustFunction.Builder snapStart(software.amazon.awscdk.services.lambda.SnapStartConf snapStart)
Enable SnapStart for Lambda Function.SnapStart is currently supported only for Java 11, 17 runtime
Default: - No snapstart
- Parameters:
snapStart- Enable SnapStart for Lambda Function. This parameter is required.- Returns:
this
-
systemLogLevel
@Stability(Stable) public RustFunction.Builder systemLogLevel(String systemLogLevel)
Sets the system log level for the function.Default: INFO
- Parameters:
systemLogLevel- Sets the system log level for the function. This parameter is required.- Returns:
this
-
timeout
@Stability(Stable) public RustFunction.Builder timeout(software.amazon.awscdk.Duration 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.
Default: Duration.seconds(3)
- Parameters:
timeout- The function execution time (in seconds) after which Lambda terminates the function. This parameter is required.- Returns:
this
-
tracing
@Stability(Stable) public RustFunction.Builder tracing(software.amazon.awscdk.services.lambda.Tracing tracing)
Enable AWS X-Ray Tracing for Lambda Function.Default: Tracing.Disabled
- Parameters:
tracing- Enable AWS X-Ray Tracing for Lambda Function. This parameter is required.- Returns:
this
-
vpc
@Stability(Stable) public RustFunction.Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc)
VPC network to place Lambda network interfaces.Specify this if the Lambda function needs to access resources in a VPC. This is required when
vpcSubnetsis specified.Default: - Function is not placed within a VPC.
- Parameters:
vpc- VPC network to place Lambda network interfaces. This parameter is required.- Returns:
this
-
vpcSubnets
@Stability(Stable) public RustFunction.Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets)
Where to place the network interfaces within the VPC.This requires
vpcto be specified in order for interfaces to actually be placed in the subnets. Ifvpcis not specify, this will raise an error.Note: Internet access for Lambda Functions requires a NAT Gateway, so picking public subnets is not allowed (unless
allowPublicSubnetis set totrue).Default: - the Vpc default strategy if not specified
- Parameters:
vpcSubnets- Where to place the network interfaces within the VPC. This parameter is required.- Returns:
this
-
binaryName
@Stability(Experimental) public RustFunction.Builder binaryName(String binaryName)
(experimental) The name of the binary to build, in case that it's different that the package's name.Default: Build all binaries
- Parameters:
binaryName- The name of the binary to build, in case that it's different that the package's name. This parameter is required.- Returns:
this
-
bundling
@Stability(Experimental) public RustFunction.Builder bundling(BundlingOptions bundling)
(experimental) Bundling options.Default: - use default bundling options: all binaries and packages are bundled.
- Parameters:
bundling- Bundling options. This parameter is required.- Returns:
this
-
entry
@Stability(Experimental) public RustFunction.Builder entry(String entry)
(experimental) Path to the entry Cargo.toml file.Default: - Derived from the name of the defining file and the construct's id. If the `RustsFunction` is defined in `stack.ts` with `my-binary` as id (`new RustFunction(this, 'my-binary')`), the construct will look at `stack.my-binary/Cargo.toml`
- Parameters:
entry- Path to the entry Cargo.toml file. This parameter is required.- Returns:
this
-
projectRoot
@Stability(Experimental) public RustFunction.Builder projectRoot(String projectRoot)
(experimental) The path to the directory containing project Manifest file.Default: - the directory containing the `depsLockFilePath`
- Parameters:
projectRoot- The path to the directory containing project Manifest file. This parameter is required.- Returns:
this
-
runtime
@Stability(Experimental) public RustFunction.Builder runtime(software.amazon.awscdk.services.lambda.Runtime runtime)
(experimental) The runtime environment.Only OS-only runtimes are supported.
Default: `Runtime.PROVIDED_AL2023`
- Parameters:
runtime- The runtime environment. This parameter is required.- Returns:
this
-
build
@Stability(Experimental) public RustFunction build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<RustFunction>- Returns:
- a newly built instance of
RustFunction.
-
-