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 |
|---|---|
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) |
static AssetCode |
file(String filePath) |
static InlineCode |
inline(String code) |
abstract FunctionResource.CodeProperty |
toJSON()
Called during stack synthesis to render the CodePropery for the
Lambda function.
|
public 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 InlineCode inline(String code)
code - The actual handler code (limited to 4KiB)public static AssetCode directory(String directoryToZip)
directoryToZip - The directory to zippublic static AssetCode file(String filePath)
filePath - The file pathpublic abstract FunctionResource.CodeProperty toJSON()
public void bind(Function _lambda)
Copyright © 2018. All rights reserved.