@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:52.155Z") @Stability(value=Experimental) public class InlineCode extends Code
Example:
LayerVersion layer = LayerVersion.Builder.create(stack, "MyLayer")
.code(Code.fromAsset(join(__dirname, "layer-code")))
.compatibleRuntimes(List.of(Runtime.NODEJS_14_X))
.license("Apache-2.0")
.description("A layer to test the L2 construct")
.build();
// To grant usage by other AWS accounts
layer.addPermission("remote-account-grant", LayerVersionPermission.builder().accountId(awsAccountId).build());
// To grant usage to all accounts in some AWS Ogranization
// layer.grantUsage({ accountId: '*', organizationId });
// To grant usage to all accounts in some AWS Ogranization
// layer.grantUsage({ accountId: '*', organizationId });
Function.Builder.create(stack, "MyLayeredLambda")
.code(new InlineCode("foo"))
.handler("index.handler")
.runtime(Runtime.NODEJS_14_X)
.layers(List.of(layer))
.build();
| Modifier | Constructor and Description |
|---|---|
protected |
InlineCode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InlineCode(software.amazon.jsii.JsiiObjectRef objRef) |
|
InlineCode(String code) |
| Modifier and Type | Method and Description |
|---|---|
CodeConfig |
bind(Construct _scope)
(experimental) Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun.
|
Boolean |
getIsInline()
(experimental) Determines whether this Code is inline code or not.
|
asset, bindToResource, bindToResource, bucket, bucket, cfnParameters, cfnParameters, fromAsset, fromAsset, fromAssetImage, fromAssetImage, fromBucket, fromBucket, fromCfnParameters, fromCfnParameters, fromDockerBuild, fromDockerBuild, fromEcrImage, fromEcrImage, fromInline, inlinejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected InlineCode(software.amazon.jsii.JsiiObjectRef objRef)
protected InlineCode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public InlineCode(@NotNull
String code)
code - This parameter is required.@Stability(value=Experimental) @NotNull public CodeConfig bind(@NotNull Construct _scope)
@Stability(value=Experimental) @NotNull public Boolean getIsInline()
getIsInline in class CodeCopyright © 2022. All rights reserved.