@Generated(value="jsii-pacmak/1.14.0 (build 729554b)", date="2020-10-29T17:34:18.496Z") @Stability(value=Stable) public abstract class Code extends software.amazon.jsii.JsiiObject
| Modifier | Constructor and Description |
|---|---|
protected |
Code() |
protected |
Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Code(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static AssetCode |
asset(String path)
Deprecated.
use `fromAsset`
|
abstract CodeConfig |
bind(Construct scope)
Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun.
|
void |
bindToResource(CfnResource _resource)
Called after the CFN function resource has been created to allow the code class to bind to it.
|
void |
bindToResource(CfnResource _resource,
ResourceBindOptions _options)
Called after the CFN function resource has been created to allow the code class to bind to it.
|
static S3Code |
bucket(IBucket bucket,
String key)
Deprecated.
use `fromBucket`
|
static S3Code |
bucket(IBucket bucket,
String key,
String objectVersion)
Deprecated.
use `fromBucket`
|
static CfnParametersCode |
cfnParameters()
Deprecated.
use `fromCfnParameters`
|
static CfnParametersCode |
cfnParameters(CfnParametersCodeProps props)
Deprecated.
use `fromCfnParameters`
|
static AssetCode |
fromAsset(String path)
Loads the function code from a local disk path.
|
static AssetCode |
fromAsset(String path,
AssetOptions options)
Loads the function code from a local disk path.
|
static S3Code |
fromBucket(IBucket bucket,
String key) |
static S3Code |
fromBucket(IBucket bucket,
String key,
String objectVersion) |
static CfnParametersCode |
fromCfnParameters()
Creates a new Lambda source defined using CloudFormation parameters.
|
static CfnParametersCode |
fromCfnParameters(CfnParametersCodeProps props)
Creates a new Lambda source defined using CloudFormation parameters.
|
static InlineCode |
fromInline(String code) |
abstract Boolean |
getIsInline()
Deprecated.
this value is ignored since inline is now determined based on the
the `inlineCode` field of `CodeConfig` returned from `bind()`.
|
static InlineCode |
inline(String code)
Deprecated.
use `fromInline`
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Code(software.amazon.jsii.JsiiObjectRef objRef)
protected Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected Code()
@Stability(value=Deprecated) @Deprecated @NotNull public static AssetCode asset(@NotNull String path)
path - This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public static S3Code bucket(@NotNull IBucket bucket, @NotNull String key, @Nullable String objectVersion)
bucket - This parameter is required.key - This parameter is required.objectVersion - @Stability(value=Deprecated) @Deprecated @NotNull public static S3Code bucket(@NotNull IBucket bucket, @NotNull String key)
bucket - This parameter is required.key - This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public static CfnParametersCode cfnParameters(@Nullable CfnParametersCodeProps props)
props - @Stability(value=Deprecated) @Deprecated @NotNull public static CfnParametersCode cfnParameters()
@Stability(value=Stable) @NotNull public static AssetCode fromAsset(@NotNull String path, @Nullable AssetOptions options)
path - Either a directory with the Lambda code bundle or a .zip file. This parameter is required.options - @Stability(value=Stable) @NotNull public static AssetCode fromAsset(@NotNull String path)
path - Either a directory with the Lambda code bundle or a .zip file. This parameter is required.@Stability(value=Stable) @NotNull public static S3Code fromBucket(@NotNull IBucket bucket, @NotNull String key, @Nullable String objectVersion)
bucket - The S3 bucket. This parameter is required.key - The object key. This parameter is required.objectVersion - Optional S3 object version.@Stability(value=Stable) @NotNull public static S3Code fromBucket(@NotNull IBucket bucket, @NotNull String key)
bucket - The S3 bucket. This parameter is required.key - The object key. This parameter is required.@Stability(value=Stable) @NotNull public static CfnParametersCode fromCfnParameters(@Nullable CfnParametersCodeProps props)
props - optional construction properties of CfnParametersCode.@Stability(value=Stable) @NotNull public static CfnParametersCode fromCfnParameters()
@Stability(value=Stable) @NotNull public static InlineCode fromInline(@NotNull String code)
code - The actual handler code (limited to 4KiB). This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public static InlineCode inline(@NotNull String code)
code - This parameter is required.@Stability(value=Stable) @NotNull public abstract CodeConfig bind(@NotNull Construct scope)
scope - The binding scope. This parameter is required.@Stability(value=Stable)
public void bindToResource(@NotNull
CfnResource _resource,
@Nullable
ResourceBindOptions _options)
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.
_resource - This parameter is required._options - @Stability(value=Stable)
public void bindToResource(@NotNull
CfnResource _resource)
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.
_resource - This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public abstract Boolean getIsInline()
Copyright © 2020. All rights reserved.