@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.480Z") @Stability(value=Stable) public interface LayerVersionPermission extends software.amazon.jsii.JsiiSerializable
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 and Type | Interface and Description |
|---|---|
static class |
LayerVersionPermission.Builder
A builder for
LayerVersionPermission |
static class |
LayerVersionPermission.Jsii$Proxy
An implementation for
LayerVersionPermission |
| Modifier and Type | Method and Description |
|---|---|
static LayerVersionPermission.Builder |
builder() |
String |
getAccountId()
The AWS Account id of the account that is authorized to use a Lambda Layer Version.
|
default String |
getOrganizationId()
The ID of the AWS Organization to which the grant is restricted.
|
@Stability(value=Stable) @NotNull String getAccountId()
The wild-card '*' can be
used to grant access to "any" account (or any account in an organization when organizationId is specified).
@Stability(value=Stable) @Nullable default String getOrganizationId()
Can only be specified if accountId is '*'
@Stability(value=Stable) static LayerVersionPermission.Builder builder()
LayerVersionPermission.Builder of LayerVersionPermissionCopyright © 2022. All rights reserved.