AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the PublishLayerVersion operation. Creates an Lambda layer from a ZIP archive. Each time you call PublishLayerVersion with the same layer name, a new version is created.

Add layers to your function with CreateFunction or UpdateFunctionConfiguration.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Lambda.AmazonLambdaRequest
      Amazon.Lambda.Model.PublishLayerVersionRequest

Namespace: Amazon.Lambda.Model
Assembly: AWSSDK.Lambda.dll
Version: 3.x.y.z

Syntax

C#
public class PublishLayerVersionRequest : AmazonLambdaRequest
         IAmazonWebServiceRequest

The PublishLayerVersionRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property CompatibleArchitectures System.Collections.Generic.List<System.String>

Gets and sets the property CompatibleArchitectures.

A list of compatible instruction set architectures.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property CompatibleRuntimes System.Collections.Generic.List<System.String>

Gets and sets the property CompatibleRuntimes.

A list of compatible function runtimes. Used for filtering with ListLayers and ListLayerVersions.

The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property Content Amazon.Lambda.Model.LayerVersionContentInput

Gets and sets the property Content.

The function layer archive.

Public Property Description System.String

Gets and sets the property Description.

The description of the version.

Public Property LayerName System.String

Gets and sets the property LayerName.

The name or Amazon Resource Name (ARN) of the layer.

Public Property LicenseInfo System.String

Gets and sets the property LicenseInfo.

The layer's software license. It can be any of the following:

  • An SPDX license identifier. For example, MIT.

  • The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT.

  • The full text of the license.

Examples

The following example creates a new Python library layer version. The command retrieves the layer content a file named layer.zip in the specified S3 bucket.

To create a Lambda layer version


var client = new AmazonLambdaClient();
var response = client.AddLayerVersionPermission(new AddLayerVersionPermissionRequest 
{
    Action = "lambda:GetLayerVersion",
    LayerName = "my-layer",
    Principal = "223456789012",
    StatementId = "xaccount",
    VersionNumber = 1
});

string revisionId = response.RevisionId;
string statement = response.Statement;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer