public class UploadFunctionRequest extends AmazonWebServiceRequest implements Serializable
UploadFunction operation
.
Creates a new Lambda function or updates an existing function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the existing Lambda function is updated with the new code and metadata.
This operation requires permission for the
lambda:UploadFunction
action.
NOOP
Constructor and Description |
---|
UploadFunctionRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDescription()
A short, user-defined function description.
|
String |
getFunctionName()
The name you want to assign to the function you are uploading.
|
InputStream |
getFunctionZip()
A .zip file containing your packaged source code.
|
String |
getHandler()
The function that Lambda calls to begin execution.
|
Integer |
getMemorySize()
The amount of memory, in MB, your Lambda function is given.
|
String |
getMode()
How the Lambda function will be invoked.
|
String |
getRole()
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.
|
String |
getRuntime()
The runtime environment for the Lambda function you are uploading.
|
Integer |
getTimeout()
The function execution time at which Lambda should terminate the
function.
|
int |
hashCode() |
void |
setDescription(String description)
A short, user-defined function description.
|
void |
setFunctionName(String functionName)
The name you want to assign to the function you are uploading.
|
void |
setFunctionZip(InputStream functionZip)
A .zip file containing your packaged source code.
|
void |
setHandler(String handler)
The function that Lambda calls to begin execution.
|
void |
setMemorySize(Integer memorySize)
The amount of memory, in MB, your Lambda function is given.
|
void |
setMode(Mode mode)
How the Lambda function will be invoked.
|
void |
setMode(String mode)
How the Lambda function will be invoked.
|
void |
setRole(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.
|
void |
setRuntime(Runtime runtime)
The runtime environment for the Lambda function you are uploading.
|
void |
setRuntime(String runtime)
The runtime environment for the Lambda function you are uploading.
|
void |
setTimeout(Integer timeout)
The function execution time at which Lambda should terminate the
function.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UploadFunctionRequest |
withDescription(String description)
A short, user-defined function description.
|
UploadFunctionRequest |
withFunctionName(String functionName)
The name you want to assign to the function you are uploading.
|
UploadFunctionRequest |
withFunctionZip(InputStream functionZip)
A .zip file containing your packaged source code.
|
UploadFunctionRequest |
withHandler(String handler)
The function that Lambda calls to begin execution.
|
UploadFunctionRequest |
withMemorySize(Integer memorySize)
The amount of memory, in MB, your Lambda function is given.
|
UploadFunctionRequest |
withMode(Mode mode)
How the Lambda function will be invoked.
|
UploadFunctionRequest |
withMode(String mode)
How the Lambda function will be invoked.
|
UploadFunctionRequest |
withRole(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.
|
UploadFunctionRequest |
withRuntime(Runtime runtime)
The runtime environment for the Lambda function you are uploading.
|
UploadFunctionRequest |
withRuntime(String runtime)
The runtime environment for the Lambda function you are uploading.
|
UploadFunctionRequest |
withTimeout(Integer timeout)
The function execution time at which Lambda should terminate the
function.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getFunctionName()
Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9-_]+
public void setFunctionName(String functionName)
Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9-_]+
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 APIs, such as InvokeAsync.public UploadFunctionRequest withFunctionName(String functionName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 64
Pattern: [a-zA-Z0-9-_]+
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 APIs, such as InvokeAsync.public InputStream getFunctionZip()
public void setFunctionZip(InputStream functionZip)
functionZip
- A .zip file containing your packaged source code. For more information
about creating a .zip file, go to AWS
LambdaL How it Works in the AWS Lambda Developer Guide.public UploadFunctionRequest withFunctionZip(InputStream functionZip)
Returns a reference to this object so that method calls can be chained together.
functionZip
- A .zip file containing your packaged source code. For more information
about creating a .zip file, go to AWS
LambdaL How it Works in the AWS Lambda Developer Guide.public String getRuntime()
Constraints:
Allowed Values: nodejs
Runtime
public void setRuntime(String runtime)
Constraints:
Allowed Values: nodejs
runtime
- The runtime environment for the Lambda function you are uploading.
Currently, Lambda supports only "nodejs" as the runtime.Runtime
public UploadFunctionRequest withRuntime(String runtime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: nodejs
runtime
- The runtime environment for the Lambda function you are uploading.
Currently, Lambda supports only "nodejs" as the runtime.Runtime
public void setRuntime(Runtime runtime)
Constraints:
Allowed Values: nodejs
runtime
- The runtime environment for the Lambda function you are uploading.
Currently, Lambda supports only "nodejs" as the runtime.Runtime
public UploadFunctionRequest withRuntime(Runtime runtime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: nodejs
runtime
- The runtime environment for the Lambda function you are uploading.
Currently, Lambda supports only "nodejs" as the runtime.Runtime
public String getRole()
Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
public void setRole(String role)
Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
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.public UploadFunctionRequest withRole(String role)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
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.public String getHandler()
Constraints:
Pattern: [a-zA-Z0-9./\-_]+
public void setHandler(String handler)
Constraints:
Pattern: [a-zA-Z0-9./\-_]+
handler
- The function that Lambda calls to begin execution. For Node.js, it is
the module-name.export value in your function.public UploadFunctionRequest withHandler(String handler)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: [a-zA-Z0-9./\-_]+
handler
- The function that Lambda calls to begin execution. For Node.js, it is
the module-name.export value in your function.public String getMode()
Constraints:
Allowed Values: event
Mode
public void setMode(String mode)
Constraints:
Allowed Values: event
mode
- How the Lambda function will be invoked. Lambda supports only the
"event" mode.Mode
public UploadFunctionRequest withMode(String mode)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: event
mode
- How the Lambda function will be invoked. Lambda supports only the
"event" mode.Mode
public void setMode(Mode mode)
Constraints:
Allowed Values: event
mode
- How the Lambda function will be invoked. Lambda supports only the
"event" mode.Mode
public UploadFunctionRequest withMode(Mode mode)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: event
mode
- How the Lambda function will be invoked. Lambda supports only the
"event" mode.Mode
public String getDescription()
Constraints:
Length: 0 - 256
public void setDescription(String description)
Constraints:
Length: 0 - 256
description
- A short, user-defined function description. Lambda does not use this
value. Assign a meaningful description as you see fit.public UploadFunctionRequest withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 256
description
- A short, user-defined function description. Lambda does not use this
value. Assign a meaningful description as you see fit.public Integer getTimeout()
Constraints:
Range: 1 - 60
public void setTimeout(Integer timeout)
Constraints:
Range: 1 - 60
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.public UploadFunctionRequest withTimeout(Integer timeout)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 60
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.public Integer getMemorySize()
Constraints:
Range: 128 - 1024
public void setMemorySize(Integer memorySize)
Constraints:
Range: 128 - 1024
memorySize
- The amount of memory, in MB, your Lambda function is given. Lambda
uses this memory size to infer the amount of CPU allocated to your
function. Your function use-case determines your CPU and memory
requirements. For example, database operation might need less memory
compared to image processing function. The default value is 128 MB.
The value must be a multiple of 64 MB.public UploadFunctionRequest withMemorySize(Integer memorySize)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 128 - 1024
memorySize
- The amount of memory, in MB, your Lambda function is given. Lambda
uses this memory size to infer the amount of CPU allocated to your
function. Your function use-case determines your CPU and memory
requirements. For example, database operation might need less memory
compared to image processing function. The default value is 128 MB.
The value must be a multiple of 64 MB.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.