@Generated(value="jsii-pacmak/0.7.8 (build 100f5ad)", date="2018-10-26T17:58:07.462Z") public abstract class Code extends software.amazon.jsii.JsiiObject
| Modifier | Constructor and Description |
|---|---|
protected |
Code(software.amazon.jsii.JsiiObject.InitializationMode mode) |
| Modifier and Type | Method and Description |
|---|---|
static AssetCode |
asset(String path)
Loads the function code from a local disk asset.
|
void |
bind(Function _lambda)
Called when the lambda is initialized to allow this object to
bind to the stack, add resources and have fun.
|
static S3Code |
bucket(software.amazon.awscdk.services.s3.BucketRef bucket,
String key) |
static S3Code |
bucket(software.amazon.awscdk.services.s3.BucketRef bucket,
String key,
String objectVersion) |
static AssetCode |
directory(String directoryToZip)
Deprecated.
use `lambda.Code.asset(path)` (no need to specify if it's a file or a directory)
|
static AssetCode |
file(String filePath)
Deprecated.
use `lambda.Code.asset(path)` (no need to specify if it's a file or a directory)
|
static InlineCode |
inline(String code) |
abstract FunctionResource.CodeProperty |
toJSON()
Called during stack synthesis to render the CodePropery for the
Lambda function.
|
public static AssetCode asset(String path)
path - Either a directory with the Lambda code bundle or a .zip filepublic static S3Code bucket(software.amazon.awscdk.services.s3.BucketRef bucket, String key, @Nullable String objectVersion)
bucket - The S3 bucketkey - The object keyobjectVersion - Optional S3 object versionpublic static S3Code bucket(software.amazon.awscdk.services.s3.BucketRef bucket, String key)
bucket - The S3 bucketkey - The object keypublic static AssetCode directory(String directoryToZip)
directoryToZip - The directory to zippublic static AssetCode file(String filePath)
filePath - The file pathpublic static InlineCode inline(String code)
code - The actual handler code (limited to 4KiB)public void bind(Function _lambda)
public abstract FunctionResource.CodeProperty toJSON()
Copyright © 2018. All rights reserved.