Interface CreateFunctionRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,Buildable
,CopyableBuilder<CreateFunctionRequest.Builder,
,CreateFunctionRequest> LambdaRequest.Builder
,SdkBuilder<CreateFunctionRequest.Builder,
,CreateFunctionRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
CreateFunctionRequest
-
Method Summary
Modifier and TypeMethodDescriptionarchitectures
(Collection<Architecture> architectures) The instruction set architecture that the function supports.architectures
(Architecture... architectures) The instruction set architecture that the function supports.architecturesWithStrings
(String... architectures) The instruction set architecture that the function supports.architecturesWithStrings
(Collection<String> architectures) The instruction set architecture that the function supports.default CreateFunctionRequest.Builder
code
(Consumer<FunctionCode.Builder> code) The code for the function.code
(FunctionCode code) The code for the function.codeSigningConfigArn
(String codeSigningConfigArn) To enable code signing for this function, specify the ARN of a code-signing configuration.default CreateFunctionRequest.Builder
deadLetterConfig
(Consumer<DeadLetterConfig.Builder> deadLetterConfig) A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.deadLetterConfig
(DeadLetterConfig deadLetterConfig) A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.description
(String description) A description of the function.default CreateFunctionRequest.Builder
environment
(Consumer<Environment.Builder> environment) Environment variables that are accessible from function code during execution.environment
(Environment environment) Environment variables that are accessible from function code during execution.default CreateFunctionRequest.Builder
ephemeralStorage
(Consumer<EphemeralStorage.Builder> ephemeralStorage) The size of the function's/tmp
directory in MB.ephemeralStorage
(EphemeralStorage ephemeralStorage) The size of the function's/tmp
directory in MB.fileSystemConfigs
(Collection<FileSystemConfig> fileSystemConfigs) Connection settings for an Amazon EFS file system.fileSystemConfigs
(Consumer<FileSystemConfig.Builder>... fileSystemConfigs) Connection settings for an Amazon EFS file system.fileSystemConfigs
(FileSystemConfig... fileSystemConfigs) Connection settings for an Amazon EFS file system.functionName
(String functionName) The name or ARN of the Lambda function.The name of the method within your code that Lambda calls to run your function.default CreateFunctionRequest.Builder
imageConfig
(Consumer<ImageConfig.Builder> imageConfig) Container image configuration values that override the values in the container image Dockerfile.imageConfig
(ImageConfig imageConfig) Container image configuration values that override the values in the container image Dockerfile.The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables.A list of function layers to add to the function's execution environment.layers
(Collection<String> layers) A list of function layers to add to the function's execution environment.default CreateFunctionRequest.Builder
loggingConfig
(Consumer<LoggingConfig.Builder> loggingConfig) The function's Amazon CloudWatch Logs configuration settings.loggingConfig
(LoggingConfig loggingConfig) The function's Amazon CloudWatch Logs configuration settings.memorySize
(Integer memorySize) The amount of memory available to the function at runtime.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.packageType
(String packageType) The type of deployment package.packageType
(PackageType packageType) The type of deployment package.Set to true to publish the first version of the function during creation.The Amazon Resource Name (ARN) of the function's execution role.The identifier of the function's runtime.The identifier of the function's runtime.default CreateFunctionRequest.Builder
snapStart
(Consumer<SnapStart.Builder> snapStart) The function's SnapStart setting.The function's SnapStart setting.A list of tags to apply to the function.The amount of time (in seconds) that Lambda allows a function to run before stopping it.default CreateFunctionRequest.Builder
tracingConfig
(Consumer<TracingConfig.Builder> tracingConfig) tracingConfig
(TracingConfig tracingConfig) default CreateFunctionRequest.Builder
vpcConfig
(Consumer<VpcConfig.Builder> vpcConfig) For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC.For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.services.lambda.model.LambdaRequest.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
functionName
The name or ARN of the Lambda function.
Name formats
-
Function name –
my-function
. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
- Parameters:
functionName
- The name or ARN of the Lambda function.Name formats
-
Function name –
my-function
. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
runtime
The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive.
The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
- Parameters:
runtime
- The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive.The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
runtime
The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive.
The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
- Parameters:
runtime
- The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive.The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
role
The Amazon Resource Name (ARN) of the function's execution role.
- Parameters:
role
- The Amazon Resource Name (ARN) of the function's execution role.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
handler
The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
- Parameters:
handler
- The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
code
The code for the function.
- Parameters:
code
- The code for the function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
code
The code for the function.
This is a convenience method that creates an instance of theFunctionCode.Builder
avoiding the need to create one manually viaFunctionCode.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocode(FunctionCode)
.- Parameters:
code
- a consumer that will call methods onFunctionCode.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
description
A description of the function.
- Parameters:
description
- A description of the function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
timeout
The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
- Parameters:
timeout
- The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memorySize
The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
- Parameters:
memorySize
- The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
publish
Set to true to publish the first version of the function during creation.
- Parameters:
publish
- Set to true to publish the first version of the function during creation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
vpcConfig
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
- Parameters:
vpcConfig
- For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
vpcConfig
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
This is a convenience method that creates an instance of theVpcConfig.Builder
avoiding the need to create one manually viaVpcConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tovpcConfig(VpcConfig)
.- Parameters:
vpcConfig
- a consumer that will call methods onVpcConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
packageType
The type of deployment package. Set to
Image
for container image and set toZip
for .zip file archive.- Parameters:
packageType
- The type of deployment package. Set toImage
for container image and set toZip
for .zip file archive.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
packageType
The type of deployment package. Set to
Image
for container image and set toZip
for .zip file archive.- Parameters:
packageType
- The type of deployment package. Set toImage
for container image and set toZip
for .zip file archive.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
deadLetterConfig
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
- Parameters:
deadLetterConfig
- A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deadLetterConfig
default CreateFunctionRequest.Builder deadLetterConfig(Consumer<DeadLetterConfig.Builder> deadLetterConfig) A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
This is a convenience method that creates an instance of theDeadLetterConfig.Builder
avoiding the need to create one manually viaDeadLetterConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todeadLetterConfig(DeadLetterConfig)
.- Parameters:
deadLetterConfig
- a consumer that will call methods onDeadLetterConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
environment
Environment variables that are accessible from function code during execution.
- Parameters:
environment
- Environment variables that are accessible from function code during execution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
Environment variables that are accessible from function code during execution.
This is a convenience method that creates an instance of theEnvironment.Builder
avoiding the need to create one manually viaEnvironment.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toenvironment(Environment)
.- Parameters:
environment
- a consumer that will call methods onEnvironment.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
kmsKeyArn
The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.
- Parameters:
kmsKeyArn
- The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tracingConfig
Set
Mode
toActive
to sample and trace a subset of incoming requests with X-Ray.- Parameters:
tracingConfig
- SetMode
toActive
to sample and trace a subset of incoming requests with X-Ray.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tracingConfig
Set
This is a convenience method that creates an instance of theMode
toActive
to sample and trace a subset of incoming requests with X-Ray.TracingConfig.Builder
avoiding the need to create one manually viaTracingConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totracingConfig(TracingConfig)
.- Parameters:
tracingConfig
- a consumer that will call methods onTracingConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
tags
A list of tags to apply to the function.
- Parameters:
tags
- A list of tags to apply to the function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
layers
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- Parameters:
layers
- A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
layers
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
- Parameters:
layers
- A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fileSystemConfigs
Connection settings for an Amazon EFS file system.
- Parameters:
fileSystemConfigs
- Connection settings for an Amazon EFS file system.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fileSystemConfigs
Connection settings for an Amazon EFS file system.
- Parameters:
fileSystemConfigs
- Connection settings for an Amazon EFS file system.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fileSystemConfigs
CreateFunctionRequest.Builder fileSystemConfigs(Consumer<FileSystemConfig.Builder>... fileSystemConfigs) Connection settings for an Amazon EFS file system.
This is a convenience method that creates an instance of theFileSystemConfig.Builder
avoiding the need to create one manually viaFileSystemConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tofileSystemConfigs(List<FileSystemConfig>)
.- Parameters:
fileSystemConfigs
- a consumer that will call methods onFileSystemConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
imageConfig
Container image configuration values that override the values in the container image Dockerfile.
- Parameters:
imageConfig
- Container image configuration values that override the values in the container image Dockerfile.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageConfig
Container image configuration values that override the values in the container image Dockerfile.
This is a convenience method that creates an instance of theImageConfig.Builder
avoiding the need to create one manually viaImageConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toimageConfig(ImageConfig)
.- Parameters:
imageConfig
- a consumer that will call methods onImageConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
codeSigningConfigArn
To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
- Parameters:
codeSigningConfigArn
- To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
architecturesWithStrings
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is
x86_64
.- Parameters:
architectures
- The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value isx86_64
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
architecturesWithStrings
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is
x86_64
.- Parameters:
architectures
- The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value isx86_64
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
architectures
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is
x86_64
.- Parameters:
architectures
- The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value isx86_64
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
architectures
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is
x86_64
.- Parameters:
architectures
- The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value isx86_64
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ephemeralStorage
The size of the function's
/tmp
directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).- Parameters:
ephemeralStorage
- The size of the function's/tmp
directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ephemeralStorage
default CreateFunctionRequest.Builder ephemeralStorage(Consumer<EphemeralStorage.Builder> ephemeralStorage) The size of the function's
This is a convenience method that creates an instance of the/tmp
directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).EphemeralStorage.Builder
avoiding the need to create one manually viaEphemeralStorage.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toephemeralStorage(EphemeralStorage)
.- Parameters:
ephemeralStorage
- a consumer that will call methods onEphemeralStorage.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
snapStart
The function's SnapStart setting.
- Parameters:
snapStart
- The function's SnapStart setting.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
snapStart
The function's SnapStart setting.
This is a convenience method that creates an instance of theSnapStart.Builder
avoiding the need to create one manually viaSnapStart.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosnapStart(SnapStart)
.- Parameters:
snapStart
- a consumer that will call methods onSnapStart.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
loggingConfig
The function's Amazon CloudWatch Logs configuration settings.
- Parameters:
loggingConfig
- The function's Amazon CloudWatch Logs configuration settings.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loggingConfig
The function's Amazon CloudWatch Logs configuration settings.
This is a convenience method that creates an instance of theLoggingConfig.Builder
avoiding the need to create one manually viaLoggingConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tologgingConfig(LoggingConfig)
.- Parameters:
loggingConfig
- a consumer that will call methods onLoggingConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
CreateFunctionRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateFunctionRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-