public static final class FunctionProps.Builder extends Object
FunctionProps| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
FunctionProps |
build()
Builds the configured instance.
|
FunctionProps.Builder |
withAllowAllOutbound(Boolean value)
Sets the value of AllowAllOutbound
|
FunctionProps.Builder |
withCode(Code value)
Sets the value of Code
|
FunctionProps.Builder |
withDeadLetterQueue(software.amazon.awscdk.services.sqs.QueueRef value)
Sets the value of DeadLetterQueue
|
FunctionProps.Builder |
withDeadLetterQueueEnabled(Boolean value)
Sets the value of DeadLetterQueueEnabled
|
FunctionProps.Builder |
withDescription(String value)
Sets the value of Description
|
FunctionProps.Builder |
withEnvironment(Map<String,Object> value)
Sets the value of Environment
|
FunctionProps.Builder |
withFunctionName(String value)
Sets the value of FunctionName
|
FunctionProps.Builder |
withHandler(String value)
Sets the value of Handler
|
FunctionProps.Builder |
withInitialPolicy(List<software.amazon.awscdk.services.iam.PolicyStatement> value)
Sets the value of InitialPolicy
|
FunctionProps.Builder |
withMemorySize(Number value)
Sets the value of MemorySize
|
FunctionProps.Builder |
withRole(software.amazon.awscdk.services.iam.Role value)
Sets the value of Role
|
FunctionProps.Builder |
withRuntime(Runtime value)
Sets the value of Runtime
|
FunctionProps.Builder |
withSecurityGroup(software.amazon.awscdk.services.ec2.SecurityGroupRef value)
Sets the value of SecurityGroup
|
FunctionProps.Builder |
withTimeout(Number value)
Sets the value of Timeout
|
FunctionProps.Builder |
withTracing(Tracing value)
Sets the value of Tracing
|
FunctionProps.Builder |
withVpc(software.amazon.awscdk.services.ec2.VpcNetworkRef value)
Sets the value of Vpc
|
FunctionProps.Builder |
withVpcPlacement(software.amazon.awscdk.services.ec2.VpcPlacementStrategy value)
Sets the value of VpcPlacement
|
public FunctionProps.Builder withCode(Code value)
value - The source code of your Lambda function. You can point to a file in an
Amazon Simple Storage Service (Amazon S3) bucket or specify your source
code as inline text.thispublic FunctionProps.Builder withHandler(String value)
value - The name of the function (within your source code) that Lambda calls to
start running your code. For more information, see the Handler property
in the AWS Lambda Developer Guide.
NOTE: If you specify your source code as inline text by specifying the
ZipFile property within the Code property, specify index.function_name as
the handler.thispublic FunctionProps.Builder withRuntime(Runtime value)
value - The runtime environment for the Lambda function that you are uploading.
For valid values, see the Runtime property in the AWS Lambda Developer
Guide.thispublic FunctionProps.Builder withAllowAllOutbound(@Nullable Boolean value)
value - 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.thispublic FunctionProps.Builder withDeadLetterQueue(@Nullable software.amazon.awscdk.services.sqs.QueueRef value)
value - The SQS queue to use if DLQ is enabled.thispublic FunctionProps.Builder withDeadLetterQueueEnabled(@Nullable Boolean value)
value - Enabled DLQ. If `deadLetterQueue` is undefined,
an SQS queue with default options will be defined for your Function.thispublic FunctionProps.Builder withDescription(@Nullable String value)
value - A description of the function.thispublic FunctionProps.Builder withEnvironment(@Nullable Map<String,Object> value)
value - 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.thispublic FunctionProps.Builder withFunctionName(@Nullable String value)
value - A name for the function. If you don't specify a name, AWS CloudFormation
generates a unique physical ID and uses that ID for the function's name.
For more information, see Name Type.thispublic FunctionProps.Builder withInitialPolicy(@Nullable List<software.amazon.awscdk.services.iam.PolicyStatement> value)
value - Initial policy statements to add to the created Lambda Role.
You can call `addToRolePolicy` to the created lambda to add statements post creation.thispublic FunctionProps.Builder withMemorySize(@Nullable Number value)
value - 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.thispublic FunctionProps.Builder withRole(@Nullable software.amazon.awscdk.services.iam.Role value)
value - 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.thispublic FunctionProps.Builder withSecurityGroup(@Nullable software.amazon.awscdk.services.ec2.SecurityGroupRef value)
value - What security group to associate with the Lambda's network interfaces.
Only used if 'vpc' is supplied.thispublic FunctionProps.Builder withTimeout(@Nullable Number value)
value - 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.thispublic FunctionProps.Builder withTracing(@Nullable Tracing value)
value - Enable AWS X-Ray Tracing for Lambda Function.thispublic FunctionProps.Builder withVpc(@Nullable software.amazon.awscdk.services.ec2.VpcNetworkRef value)
value - VPC network to place Lambda network interfaces
Specify this if the Lambda function needs to access resources in a VPC.thispublic FunctionProps.Builder withVpcPlacement(@Nullable software.amazon.awscdk.services.ec2.VpcPlacementStrategy value)
value - Where to place the network interfaces within the VPC.
Only used if 'vpc' is supplied. Note: internet access for Lambdas
requires a NAT gateway, so picking Public subnets is not allowed.thispublic FunctionProps build()
FunctionPropsNullPointerException - if any required attribute was not providedCopyright © 2018. All rights reserved.