Interface ILayerVersion

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IEnvironmentAware, ILayerVersionRef, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ILayerVersion.Jsii$Default
All Known Implementing Classes:
AwsCliLayer, ILayerVersion.Jsii$Proxy, LayerVersion, NodeProxyAgentLayer, PythonLayerVersion

@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)", date="2025-12-05T22:26:39.408Z") @Stability(Stable) public interface ILayerVersion extends software.amazon.jsii.JsiiSerializable, IResource, ILayerVersionRef
  • Method Details

    • getLayerVersionArn

      @Stability(Stable) @NotNull String getLayerVersionArn()
      The ARN of the Lambda Layer version that this Layer defines.
    • getCompatibleRuntimes

      @Stability(Stable) @Nullable default List<Runtime> getCompatibleRuntimes()
      The runtimes compatible with this Layer.

      Default: - All supported runtimes. Setting this to Runtime.ALL is equivalent to leaving it undefined.

    • addPermission

      @Stability(Stable) void addPermission(@NotNull String id, @NotNull LayerVersionPermission permission)
      Add permission for this layer version to specific entities.

      Usage within the same account where the layer is defined is always allowed and does not require calling this method. Note that the principal that creates the Lambda function using the layer (for example, a CloudFormation changeset execution role) also needs to have the lambda:GetLayerVersion permission on the layer version.

      Parameters:
      id - the ID of the grant in the construct tree. This parameter is required.
      permission - the identification of the grantee. This parameter is required.
    • getNode

      @Stability(Stable) @NotNull software.constructs.Node getNode()
      The tree node.
      Specified by:
      getNode in interface software.constructs.IConstruct
    • getEnv

      @Stability(Stable) @NotNull ResourceEnvironment getEnv()
      The environment this resource belongs to.

      For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

      For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

      Specified by:
      getEnv in interface IEnvironmentAware