Show / Hide Table of Contents

Class LayerVersion

Defines a new Lambda Layer version.

Inheritance
System.Object
Construct
Resource
LayerVersion
PythonLayerVersion
AwsCliLayer
KubectlLayer
Implements
ILayerVersion
IResource
IConstruct
Constructs.IConstruct
IDependable
Inherited Members
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.AWS.Lambda.dll
Syntax (csharp)
public class LayerVersion : Resource, ILayerVersion, IResource, IConstruct, IConstruct, IDependable
Syntax (vb)
Public Class LayerVersion
    Inherits Resource
    Implements ILayerVersion, IResource, IConstruct, IConstruct, IDependable

Synopsis

Constructors

LayerVersion(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

LayerVersion(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

LayerVersion(Construct, String, ILayerVersionProps)

Properties

CompatibleRuntimes

The runtimes compatible with this Layer.

LayerVersionArn

The ARN of the Lambda Layer version that this Layer defines.

Methods

AddPermission(String, ILayerVersionPermission)

Add permission for this layer version to specific entities.

FromLayerVersionArn(Construct, String, String)

Imports a layer version by ARN.

FromLayerVersionAttributes(Construct, String, ILayerVersionAttributes)

Imports a Layer that has been defined externally.

Constructors

LayerVersion(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected LayerVersion(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

LayerVersion(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected LayerVersion(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

LayerVersion(Construct, String, ILayerVersionProps)

public LayerVersion(Construct scope, string id, ILayerVersionProps props)
Parameters
scope Constructs.Construct
id System.String
props ILayerVersionProps

Properties

CompatibleRuntimes

The runtimes compatible with this Layer.

public virtual Runtime[] CompatibleRuntimes { get; }
Property Value

Runtime[]

LayerVersionArn

The ARN of the Lambda Layer version that this Layer defines.

public virtual string LayerVersionArn { get; }
Property Value

System.String

Methods

AddPermission(String, ILayerVersionPermission)

Add permission for this layer version to specific entities.

public virtual void AddPermission(string id, ILayerVersionPermission permission)
Parameters
id System.String
permission ILayerVersionPermission
Remarks

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.

FromLayerVersionArn(Construct, String, String)

Imports a layer version by ARN.

public static ILayerVersion FromLayerVersionArn(Construct scope, string id, string layerVersionArn)
Parameters
scope Constructs.Construct
id System.String
layerVersionArn System.String
Returns

ILayerVersion

Remarks

Assumes it is compatible with all Lambda runtimes.

FromLayerVersionAttributes(Construct, String, ILayerVersionAttributes)

Imports a Layer that has been defined externally.

public static ILayerVersion FromLayerVersionAttributes(Construct scope, string id, ILayerVersionAttributes attrs)
Parameters
scope Constructs.Construct

the parent Construct that will use the imported layer.

id System.String

the id of the imported layer in the construct tree.

attrs ILayerVersionAttributes

the properties of the imported layer.

Returns

ILayerVersion

Implements

ILayerVersion
IResource
IConstruct
Constructs.IConstruct
IDependable
Back to top Generated by DocFX