@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-14T16:25:29.826Z")
public interface LayerVersionPermission
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() |
java.lang.String |
getAccountId()
The AWS Account id of the account that is authorized to use a Lambda Layer Version.
|
default java.lang.String |
getOrganizationId()
The ID of the AWS Organization to which the grant is restricted.
|
java.lang.String getAccountId()
The wild-card '*'
can be
used to grant access to "any" account (or any account in an organization when organizationId
is specified).
default java.lang.String getOrganizationId()
Can only be specified if accountId
is '*'
static LayerVersionPermission.Builder builder()
LayerVersionPermission.Builder
of LayerVersionPermission