@Generated(value="jsii-pacmak/0.10.5 (build 46bc9b0)", date="2019-05-06T20:53:37.748Z") public abstract class Code extends software.amazon.jsii.JsiiObject
| Modifier | Constructor and Description |
|---|---|
|
Code() |
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(software.amazon.awscdk.Construct _construct)
Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun.
|
static S3Code |
bucket(software.amazon.awscdk.services.s3.IBucket bucket,
String key) |
static S3Code |
bucket(software.amazon.awscdk.services.s3.IBucket bucket,
String key,
String objectVersion) |
static CfnParametersCode |
cfnParameters()
Creates a new Lambda source defined using CloudFormation parameters.
|
static CfnParametersCode |
cfnParameters(CfnParametersCodeProps props)
Creates a new Lambda source defined using CloudFormation parameters.
|
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)
|
Boolean |
getIsInline()
Determines whether this Code is inline code or not.
|
static InlineCode |
inline(String code) |
jsiiAsyncCall, jsiiCall, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticGet, jsiiStaticSetprotected Code(software.amazon.jsii.JsiiObject.InitializationMode mode)
public Code()
public static AssetCode asset(String path)
path - Either a directory with the Lambda code bundle or a .zip file.public static S3Code bucket(software.amazon.awscdk.services.s3.IBucket bucket, String key, @Nullable String objectVersion)
bucket - The S3 bucket.key - The object key.objectVersion - Optional S3 object version.public static S3Code bucket(software.amazon.awscdk.services.s3.IBucket bucket, String key)
bucket - The S3 bucket.key - The object key.public static CfnParametersCode cfnParameters(@Nullable CfnParametersCodeProps props)
props - optional construction properties of CfnParametersCode.public static CfnParametersCode cfnParameters()
public static AssetCode directory(String directoryToZip)
directoryToZip - The directory to zip.public static AssetCode file(String filePath)
filePath - The file path.public static InlineCode inline(String code)
code - The actual handler code (limited to 4KiB).public void bind(software.amazon.awscdk.Construct _construct)
public Boolean getIsInline()
Copyright © 2019. All rights reserved.