@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.478Z") @Stability(value=Stable) 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(software.constructs.Construct _scope)
Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun.
|
Boolean |
getIsInline()
Determines whether this Code is inline code or not.
|
bindToResource, bindToResource, fromAsset, fromAsset, fromAssetImage, fromAssetImage, fromBucket, fromBucket, fromCfnParameters, fromCfnParameters, fromDockerBuild, fromDockerBuild, fromEcrImage, fromEcrImage, fromInlinejsiiAsyncCall, 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=Stable)
public InlineCode(@NotNull
String code)
code - This parameter is required.@Stability(value=Stable) @NotNull public CodeConfig bind(@NotNull software.constructs.Construct _scope)
@Stability(value=Stable) @NotNull public Boolean getIsInline()
Copyright © 2022. All rights reserved.