@Generated(value="software.amazon.awssdk:codegen") public final class CreateFunctionRequest extends LambdaRequest implements ToCopyableBuilder<CreateFunctionRequest.Builder,CreateFunctionRequest>
Modifier and Type | Class and Description |
---|---|
static interface |
CreateFunctionRequest.Builder |
Modifier and Type | Method and Description |
---|---|
static CreateFunctionRequest.Builder |
builder() |
FunctionCode |
code()
The code for the function.
|
DeadLetterConfig |
deadLetterConfig()
A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when
they fail processing.
|
String |
description()
A description of the function.
|
Environment |
environment()
Environment variables that are accessible from function code during execution.
|
boolean |
equals(Object obj) |
String |
functionName()
The name of the Lambda function.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
String |
handler()
The name of the method within your code that Lambda calls to execute your function.
|
int |
hashCode() |
String |
kmsKeyArn()
The ARN of the KMS key used to encrypt your function's environment variables.
|
List<String> |
layers()
A list of function layers to
add to the function's execution environment.
|
Integer |
memorySize()
The amount of memory that your function has access to.
|
Boolean |
publish()
Set to true to publish the first version of the function during creation.
|
String |
role()
The Amazon Resource Name (ARN) of the function's execution role.
|
Runtime |
runtime()
The runtime version for the function.
|
String |
runtimeAsString()
The runtime version for the function.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends CreateFunctionRequest.Builder> |
serializableBuilderClass() |
Map<String,String> |
tags()
The list of tags (key-value pairs) assigned to the new function.
|
Integer |
timeout()
The amount of time that Lambda allows a function to run before terminating it.
|
CreateFunctionRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
TracingConfig |
tracingConfig()
Set
Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray. |
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.
|
overrideConfiguration
copy
public String functionName()
The name of the Lambda function.
Name formats
Function name - MyFunction
.
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.
Partial ARN - 123456789012:function:MyFunction
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Name formats
Function name - MyFunction
.
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.
Partial ARN - 123456789012:function:MyFunction
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
public Runtime runtime()
The runtime version for the function.
If the service returns an enum value that is not available in the current SDK version, runtime
will
return Runtime.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
runtimeAsString()
.
Runtime
public String runtimeAsString()
The runtime version for the function.
If the service returns an enum value that is not available in the current SDK version, runtime
will
return Runtime.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
runtimeAsString()
.
Runtime
public String role()
The Amazon Resource Name (ARN) of the function's execution role.
public String handler()
The name of the method within your code that Lambda calls to execute your function. For more information, see Programming Model.
public FunctionCode code()
The code for the function.
public String description()
A description of the function.
public Integer timeout()
The amount of time that Lambda allows a function to run before terminating it. The default is 3 seconds. The maximum allowed value is 900 seconds.
public Integer memorySize()
The amount of memory that your function has access to. Increasing the function's memory also increases it's CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
public Boolean publish()
Set to true to publish the first version of the function during creation.
public 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.
public DeadLetterConfig 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.
public Environment environment()
Environment variables that are accessible from function code during execution.
public String kmsKeyArn()
The ARN of the KMS key used to encrypt your function's environment variables. If not provided, AWS Lambda will use a default service key.
public TracingConfig tracingConfig()
Set Mode
to Active
to sample and trace a subset of incoming requests with AWS X-Ray.
Mode
to Active
to sample and trace a subset of incoming requests with AWS
X-Ray.public Map<String,String> tags()
The list of tags (key-value pairs) assigned to the new function. For more information, see Tagging Lambda Functions in the AWS Lambda Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<String> layers()
A list of function layers to add to the function's execution environment.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public CreateFunctionRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<CreateFunctionRequest.Builder,CreateFunctionRequest>
toBuilder
in class LambdaRequest
public static CreateFunctionRequest.Builder builder()
public static Class<? extends CreateFunctionRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.