public static interface CreateFunctionRequest.Builder extends LambdaRequest.Builder, CopyableBuilder<CreateFunctionRequest.Builder,CreateFunctionRequest>
Modifier and Type | Method and Description |
---|---|
default CreateFunctionRequest.Builder |
code(Consumer<FunctionCode.Builder> code)
The code for the Lambda function.
|
CreateFunctionRequest.Builder |
code(FunctionCode code)
The code for the Lambda function.
|
default CreateFunctionRequest.Builder |
deadLetterConfig(Consumer<DeadLetterConfig.Builder> deadLetterConfig)
The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS
topic.
|
CreateFunctionRequest.Builder |
deadLetterConfig(DeadLetterConfig deadLetterConfig)
The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS
topic.
|
CreateFunctionRequest.Builder |
description(String description)
A short, user-defined function description.
|
default CreateFunctionRequest.Builder |
environment(Consumer<Environment.Builder> environment)
Sets the value of the Environment property for this object.
|
CreateFunctionRequest.Builder |
environment(Environment environment)
Sets the value of the Environment property for this object.
|
CreateFunctionRequest.Builder |
functionName(String functionName)
The name you want to assign to the function you are uploading.
|
CreateFunctionRequest.Builder |
handler(String handler)
The function within your code that Lambda calls to begin execution.
|
CreateFunctionRequest.Builder |
kmsKeyArn(String kmsKeyArn)
The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables.
|
CreateFunctionRequest.Builder |
memorySize(Integer memorySize)
The amount of memory, in MB, your Lambda function is given.
|
CreateFunctionRequest.Builder |
publish(Boolean publish)
This boolean parameter can be used to request AWS Lambda to create the Lambda function and publish a version
as an atomic operation.
|
CreateFunctionRequest.Builder |
requestOverrideConfig(AwsRequestOverrideConfig awsRequestOverrideConfig)
Add an optional request override configuration.
|
CreateFunctionRequest.Builder |
requestOverrideConfig(Consumer<AwsRequestOverrideConfig.Builder> builderConsumer)
Add an optional request override configuration.
|
CreateFunctionRequest.Builder |
role(String role)
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access
any other Amazon Web Services (AWS) resources.
|
CreateFunctionRequest.Builder |
runtime(Runtime runtime)
The runtime environment for the Lambda function you are uploading.
|
CreateFunctionRequest.Builder |
runtime(String runtime)
The runtime environment for the Lambda function you are uploading.
|
CreateFunctionRequest.Builder |
tags(Map<String,String> tags)
The list of tags (key-value pairs) assigned to the new function.
|
CreateFunctionRequest.Builder |
timeout(Integer timeout)
The function execution time at which Lambda should terminate the function.
|
default CreateFunctionRequest.Builder |
tracingConfig(Consumer<TracingConfig.Builder> tracingConfig)
The parent object that contains your function's tracing settings.
|
CreateFunctionRequest.Builder |
tracingConfig(TracingConfig tracingConfig)
The parent object that contains your function's tracing settings.
|
default CreateFunctionRequest.Builder |
vpcConfig(Consumer<VpcConfig.Builder> vpcConfig)
If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of
security group IDs and subnet IDs.
|
CreateFunctionRequest.Builder |
vpcConfig(VpcConfig vpcConfig)
If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of
security group IDs and subnet IDs.
|
build
requestOverrideConfig
copy
apply, build
CreateFunctionRequest.Builder functionName(String functionName)
The name you want to assign to the function you are uploading. The function names appear in the console and are returned in the ListFunctions API. Function names are used to specify functions to other AWS Lambda API operations, such as Invoke. Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.
functionName
- The name you want to assign to the function you are uploading. The function names appear in the
console and are returned in the ListFunctions API. Function names are used to specify functions
to other AWS Lambda API operations, such as Invoke. Note that the length constraint applies
only to the ARN. If you specify only the function name, it is limited to 64 characters in length.CreateFunctionRequest.Builder runtime(String runtime)
The runtime environment for the Lambda function you are uploading.
To use the Python runtime v3.6, set the value to "python3.6". To use the Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set the value to "nodejs4.3".
Node v0.10.42 is currently marked as deprecated. You must migrate existing functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3 or nodejs6.10) as soon as possible. Failure to do so will result in an invalid parameter error being returned. Note that you will have to follow this procedure for each region that contains functions written in the Node v0.10.42 runtime.
runtime
- The runtime environment for the Lambda function you are uploading.
To use the Python runtime v3.6, set the value to "python3.6". To use the Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set the value to "nodejs4.3".
Node v0.10.42 is currently marked as deprecated. You must migrate existing functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3 or nodejs6.10) as soon as possible. Failure to do so will result in an invalid parameter error being returned. Note that you will have to follow this procedure for each region that contains functions written in the Node v0.10.42 runtime.
Runtime
,
Runtime
CreateFunctionRequest.Builder runtime(Runtime runtime)
The runtime environment for the Lambda function you are uploading.
To use the Python runtime v3.6, set the value to "python3.6". To use the Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set the value to "nodejs4.3".
Node v0.10.42 is currently marked as deprecated. You must migrate existing functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3 or nodejs6.10) as soon as possible. Failure to do so will result in an invalid parameter error being returned. Note that you will have to follow this procedure for each region that contains functions written in the Node v0.10.42 runtime.
runtime
- The runtime environment for the Lambda function you are uploading.
To use the Python runtime v3.6, set the value to "python3.6". To use the Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set the value to "nodejs4.3".
Node v0.10.42 is currently marked as deprecated. You must migrate existing functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3 or nodejs6.10) as soon as possible. Failure to do so will result in an invalid parameter error being returned. Note that you will have to follow this procedure for each region that contains functions written in the Node v0.10.42 runtime.
Runtime
,
Runtime
CreateFunctionRequest.Builder role(String role)
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources. For more information, see AWS Lambda: How it Works.
role
- The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to
access any other Amazon Web Services (AWS) resources. For more information, see AWS Lambda: How it
Works.CreateFunctionRequest.Builder handler(String handler)
The function within your code that Lambda calls to begin execution. For Node.js, it is the
module-name.export value in your function. For Java, it can be
package.class-name::handler
or package.class-name
. For more information, see Lambda Function
Handler (Java).
handler
- The function within your code that Lambda calls to begin execution. For Node.js, it is the
module-name.export value in your function. For Java, it can be
package.class-name::handler
or package.class-name
. For more information, see
Lambda
Function Handler (Java).CreateFunctionRequest.Builder code(FunctionCode code)
The code for the Lambda function.
code
- The code for the Lambda function.default CreateFunctionRequest.Builder code(Consumer<FunctionCode.Builder> code)
The code for the Lambda function.
This is a convenience that creates an instance of theFunctionCode.Builder
avoiding the need to
create one manually via FunctionCode.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to code(FunctionCode)
.code
- a consumer that will call methods on FunctionCode.Builder
code(FunctionCode)
CreateFunctionRequest.Builder description(String description)
A short, user-defined function description. Lambda does not use this value. Assign a meaningful description as you see fit.
description
- A short, user-defined function description. Lambda does not use this value. Assign a meaningful
description as you see fit.CreateFunctionRequest.Builder timeout(Integer timeout)
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
timeout
- The function execution time at which Lambda should terminate the function. Because the execution time
has cost implications, we recommend you set this value based on your expected execution time. The
default is 3 seconds.CreateFunctionRequest.Builder memorySize(Integer memorySize)
The amount of memory, in MB, your Lambda function is given. Lambda uses this memory size to infer the amount of CPU and memory allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.
memorySize
- The amount of memory, in MB, your Lambda function is given. Lambda uses this memory size to infer the
amount of CPU and memory allocated to your function. Your function use-case determines your CPU and
memory requirements. For example, a database operation might need less memory compared to an image
processing function. The default value is 128 MB. The value must be a multiple of 64 MB.CreateFunctionRequest.Builder publish(Boolean publish)
This boolean parameter can be used to request AWS Lambda to create the Lambda function and publish a version as an atomic operation.
publish
- This boolean parameter can be used to request AWS Lambda to create the Lambda function and publish a
version as an atomic operation.CreateFunctionRequest.Builder vpcConfig(VpcConfig vpcConfig)
If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
vpcConfig
- If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list
of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one
security group and one subnet ID.default CreateFunctionRequest.Builder vpcConfig(Consumer<VpcConfig.Builder> vpcConfig)
If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
This is a convenience that creates an instance of theVpcConfig.Builder
avoiding the need to create
one manually via VpcConfig.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its result
is passed to vpcConfig(VpcConfig)
.vpcConfig
- a consumer that will call methods on VpcConfig.Builder
vpcConfig(VpcConfig)
CreateFunctionRequest.Builder deadLetterConfig(DeadLetterConfig deadLetterConfig)
The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
deadLetterConfig
- The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon
SNS topic.default CreateFunctionRequest.Builder deadLetterConfig(Consumer<DeadLetterConfig.Builder> deadLetterConfig)
The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
This is a convenience that creates an instance of theDeadLetterConfig.Builder
avoiding the need to
create one manually via DeadLetterConfig.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to deadLetterConfig(DeadLetterConfig)
.deadLetterConfig
- a consumer that will call methods on DeadLetterConfig.Builder
deadLetterConfig(DeadLetterConfig)
CreateFunctionRequest.Builder environment(Environment environment)
environment
- The new value for the Environment property for this object.default CreateFunctionRequest.Builder environment(Consumer<Environment.Builder> environment)
Environment.Builder
avoiding the need to create
one manually via Environment.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its result
is passed to environment(Environment)
.environment
- a consumer that will call methods on Environment.Builder
environment(Environment)
CreateFunctionRequest.Builder kmsKeyArn(String kmsKeyArn)
The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If not provided, AWS Lambda will use a default service key.
kmsKeyArn
- The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables.
If not provided, AWS Lambda will use a default service key.CreateFunctionRequest.Builder tracingConfig(TracingConfig tracingConfig)
The parent object that contains your function's tracing settings.
tracingConfig
- The parent object that contains your function's tracing settings.default CreateFunctionRequest.Builder tracingConfig(Consumer<TracingConfig.Builder> tracingConfig)
The parent object that contains your function's tracing settings.
This is a convenience that creates an instance of theTracingConfig.Builder
avoiding the need to
create one manually via TracingConfig.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its
result is passed to tracingConfig(TracingConfig)
.tracingConfig
- a consumer that will call methods on TracingConfig.Builder
tracingConfig(TracingConfig)
CreateFunctionRequest.Builder tags(Map<String,String> tags)
The list of tags (key-value pairs) assigned to the new function.
tags
- The list of tags (key-value pairs) assigned to the new function.CreateFunctionRequest.Builder requestOverrideConfig(AwsRequestOverrideConfig awsRequestOverrideConfig)
AwsRequest.Builder
requestOverrideConfig
in interface AwsRequest.Builder
awsRequestOverrideConfig
- The override configuration.CreateFunctionRequest.Builder requestOverrideConfig(Consumer<AwsRequestOverrideConfig.Builder> builderConsumer)
AwsRequest.Builder
requestOverrideConfig
in interface AwsRequest.Builder
builderConsumer
- A Consumer
to which an empty AwsRequestOverrideConfig.Builder
will be given.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.