1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. fc
  5. LayerVersion
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.fc.LayerVersion

Explore with Pulumi AI

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";

const _default = new random.index.Integer("default", {
    max: 99999,
    min: 10000,
});
const defaultBucket = new alicloud.oss.Bucket("default", {bucket: `terraform-example-${_default.result}`});
// If you upload the function by OSS Bucket, you need to specify path can't upload by content.
const defaultBucketObject = new alicloud.oss.BucketObject("default", {
    bucket: defaultBucket.id,
    key: "index.py",
    content: `import logging 
def handler(event, context): 
logger = logging.getLogger() 
logger.info('hello world') 
return 'hello world'`,
});
const example = new alicloud.fc.LayerVersion("example", {
    layerName: `terraform-example-${_default.result}`,
    compatibleRuntimes: ["python2.7"],
    ossBucketName: defaultBucket.bucket,
    ossObjectName: defaultBucketObject.key,
});
Copy
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random

default = random.index.Integer("default",
    max=99999,
    min=10000)
default_bucket = alicloud.oss.Bucket("default", bucket=f"terraform-example-{default['result']}")
# If you upload the function by OSS Bucket, you need to specify path can't upload by content.
default_bucket_object = alicloud.oss.BucketObject("default",
    bucket=default_bucket.id,
    key="index.py",
    content="""import logging 
def handler(event, context): 
logger = logging.getLogger() 
logger.info('hello world') 
return 'hello world'""")
example = alicloud.fc.LayerVersion("example",
    layer_name=f"terraform-example-{default['result']}",
    compatible_runtimes=["python2.7"],
    oss_bucket_name=default_bucket.bucket,
    oss_object_name=default_bucket_object.key)
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Max: 99999,
			Min: 10000,
		})
		if err != nil {
			return err
		}
		defaultBucket, err := oss.NewBucket(ctx, "default", &oss.BucketArgs{
			Bucket: pulumi.Sprintf("terraform-example-%v", _default.Result),
		})
		if err != nil {
			return err
		}
		// If you upload the function by OSS Bucket, you need to specify path can't upload by content.
		defaultBucketObject, err := oss.NewBucketObject(ctx, "default", &oss.BucketObjectArgs{
			Bucket:  defaultBucket.ID(),
			Key:     pulumi.String("index.py"),
			Content: pulumi.String("import logging \ndef handler(event, context): \nlogger = logging.getLogger() \nlogger.info('hello world') \nreturn 'hello world'"),
		})
		if err != nil {
			return err
		}
		_, err = fc.NewLayerVersion(ctx, "example", &fc.LayerVersionArgs{
			LayerName: pulumi.Sprintf("terraform-example-%v", _default.Result),
			CompatibleRuntimes: pulumi.StringArray{
				pulumi.String("python2.7"),
			},
			OssBucketName: defaultBucket.Bucket,
			OssObjectName: defaultBucketObject.Key,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var @default = new Random.Index.Integer("default", new()
    {
        Max = 99999,
        Min = 10000,
    });

    var defaultBucket = new AliCloud.Oss.Bucket("default", new()
    {
        BucketName = $"terraform-example-{@default.Result}",
    });

    // If you upload the function by OSS Bucket, you need to specify path can't upload by content.
    var defaultBucketObject = new AliCloud.Oss.BucketObject("default", new()
    {
        Bucket = defaultBucket.Id,
        Key = "index.py",
        Content = @"import logging 
def handler(event, context): 
logger = logging.getLogger() 
logger.info('hello world') 
return 'hello world'",
    });

    var example = new AliCloud.FC.LayerVersion("example", new()
    {
        LayerName = $"terraform-example-{@default.Result}",
        CompatibleRuntimes = new[]
        {
            "python2.7",
        },
        OssBucketName = defaultBucket.BucketName,
        OssObjectName = defaultBucketObject.Key,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.oss.Bucket;
import com.pulumi.alicloud.oss.BucketArgs;
import com.pulumi.alicloud.oss.BucketObject;
import com.pulumi.alicloud.oss.BucketObjectArgs;
import com.pulumi.alicloud.fc.LayerVersion;
import com.pulumi.alicloud.fc.LayerVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Integer("default", IntegerArgs.builder()
            .max(99999)
            .min(10000)
            .build());

        var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()
            .bucket(String.format("terraform-example-%s", default_.result()))
            .build());

        // If you upload the function by OSS Bucket, you need to specify path can't upload by content.
        var defaultBucketObject = new BucketObject("defaultBucketObject", BucketObjectArgs.builder()
            .bucket(defaultBucket.id())
            .key("index.py")
            .content("""
import logging 
def handler(event, context): 
logger = logging.getLogger() 
logger.info('hello world') 
return 'hello world'            """)
            .build());

        var example = new LayerVersion("example", LayerVersionArgs.builder()
            .layerName(String.format("terraform-example-%s", default_.result()))
            .compatibleRuntimes("python2.7")
            .ossBucketName(defaultBucket.bucket())
            .ossObjectName(defaultBucketObject.key())
            .build());

    }
}
Copy
resources:
  default:
    type: random:integer
    properties:
      max: 99999
      min: 10000
  defaultBucket:
    type: alicloud:oss:Bucket
    name: default
    properties:
      bucket: terraform-example-${default.result}
  # If you upload the function by OSS Bucket, you need to specify path can't upload by content.
  defaultBucketObject:
    type: alicloud:oss:BucketObject
    name: default
    properties:
      bucket: ${defaultBucket.id}
      key: index.py
      content: "import logging \ndef handler(event, context): \nlogger = logging.getLogger() \nlogger.info('hello world') \nreturn 'hello world'"
  example:
    type: alicloud:fc:LayerVersion
    properties:
      layerName: terraform-example-${default.result}
      compatibleRuntimes:
        - python2.7
      ossBucketName: ${defaultBucket.bucket}
      ossObjectName: ${defaultBucketObject.key}
Copy

Create LayerVersion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LayerVersion(name: string, args: LayerVersionArgs, opts?: CustomResourceOptions);
@overload
def LayerVersion(resource_name: str,
                 args: LayerVersionArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def LayerVersion(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 compatible_runtimes: Optional[Sequence[str]] = None,
                 layer_name: Optional[str] = None,
                 description: Optional[str] = None,
                 oss_bucket_name: Optional[str] = None,
                 oss_object_name: Optional[str] = None,
                 skip_destroy: Optional[bool] = None,
                 zip_file: Optional[str] = None)
func NewLayerVersion(ctx *Context, name string, args LayerVersionArgs, opts ...ResourceOption) (*LayerVersion, error)
public LayerVersion(string name, LayerVersionArgs args, CustomResourceOptions? opts = null)
public LayerVersion(String name, LayerVersionArgs args)
public LayerVersion(String name, LayerVersionArgs args, CustomResourceOptions options)
type: alicloud:fc:LayerVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LayerVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LayerVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LayerVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LayerVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LayerVersionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var layerVersionResource = new AliCloud.FC.LayerVersion("layerVersionResource", new()
{
    CompatibleRuntimes = new[]
    {
        "string",
    },
    LayerName = "string",
    Description = "string",
    OssBucketName = "string",
    OssObjectName = "string",
    SkipDestroy = false,
    ZipFile = "string",
});
Copy
example, err := fc.NewLayerVersion(ctx, "layerVersionResource", &fc.LayerVersionArgs{
	CompatibleRuntimes: pulumi.StringArray{
		pulumi.String("string"),
	},
	LayerName:     pulumi.String("string"),
	Description:   pulumi.String("string"),
	OssBucketName: pulumi.String("string"),
	OssObjectName: pulumi.String("string"),
	SkipDestroy:   pulumi.Bool(false),
	ZipFile:       pulumi.String("string"),
})
Copy
var layerVersionResource = new LayerVersion("layerVersionResource", LayerVersionArgs.builder()
    .compatibleRuntimes("string")
    .layerName("string")
    .description("string")
    .ossBucketName("string")
    .ossObjectName("string")
    .skipDestroy(false)
    .zipFile("string")
    .build());
Copy
layer_version_resource = alicloud.fc.LayerVersion("layerVersionResource",
    compatible_runtimes=["string"],
    layer_name="string",
    description="string",
    oss_bucket_name="string",
    oss_object_name="string",
    skip_destroy=False,
    zip_file="string")
Copy
const layerVersionResource = new alicloud.fc.LayerVersion("layerVersionResource", {
    compatibleRuntimes: ["string"],
    layerName: "string",
    description: "string",
    ossBucketName: "string",
    ossObjectName: "string",
    skipDestroy: false,
    zipFile: "string",
});
Copy
type: alicloud:fc:LayerVersion
properties:
    compatibleRuntimes:
        - string
    description: string
    layerName: string
    ossBucketName: string
    ossObjectName: string
    skipDestroy: false
    zipFile: string
Copy

LayerVersion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LayerVersion resource accepts the following input properties:

CompatibleRuntimes
This property is required.
Changes to this property will trigger replacement.
List<string>
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
LayerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the layer.
Description Changes to this property will trigger replacement. string
The description of the layer version.
OssBucketName Changes to this property will trigger replacement. string
The name of the OSS bucket that stores the ZIP package of the function code.
OssObjectName Changes to this property will trigger replacement. string
The name of the OSS object (ZIP package) that contains the function code.
SkipDestroy bool
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
ZipFile Changes to this property will trigger replacement. string

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

CompatibleRuntimes
This property is required.
Changes to this property will trigger replacement.
[]string
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
LayerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the layer.
Description Changes to this property will trigger replacement. string
The description of the layer version.
OssBucketName Changes to this property will trigger replacement. string
The name of the OSS bucket that stores the ZIP package of the function code.
OssObjectName Changes to this property will trigger replacement. string
The name of the OSS object (ZIP package) that contains the function code.
SkipDestroy bool
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
ZipFile Changes to this property will trigger replacement. string

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

compatibleRuntimes
This property is required.
Changes to this property will trigger replacement.
List<String>
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
layerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the layer.
description Changes to this property will trigger replacement. String
The description of the layer version.
ossBucketName Changes to this property will trigger replacement. String
The name of the OSS bucket that stores the ZIP package of the function code.
ossObjectName Changes to this property will trigger replacement. String
The name of the OSS object (ZIP package) that contains the function code.
skipDestroy Boolean
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
zipFile Changes to this property will trigger replacement. String

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

compatibleRuntimes
This property is required.
Changes to this property will trigger replacement.
string[]
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
layerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the layer.
description Changes to this property will trigger replacement. string
The description of the layer version.
ossBucketName Changes to this property will trigger replacement. string
The name of the OSS bucket that stores the ZIP package of the function code.
ossObjectName Changes to this property will trigger replacement. string
The name of the OSS object (ZIP package) that contains the function code.
skipDestroy boolean
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
zipFile Changes to this property will trigger replacement. string

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

compatible_runtimes
This property is required.
Changes to this property will trigger replacement.
Sequence[str]
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
layer_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the layer.
description Changes to this property will trigger replacement. str
The description of the layer version.
oss_bucket_name Changes to this property will trigger replacement. str
The name of the OSS bucket that stores the ZIP package of the function code.
oss_object_name Changes to this property will trigger replacement. str
The name of the OSS object (ZIP package) that contains the function code.
skip_destroy bool
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
zip_file Changes to this property will trigger replacement. str

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

compatibleRuntimes
This property is required.
Changes to this property will trigger replacement.
List<String>
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
layerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the layer.
description Changes to this property will trigger replacement. String
The description of the layer version.
ossBucketName Changes to this property will trigger replacement. String
The name of the OSS bucket that stores the ZIP package of the function code.
ossObjectName Changes to this property will trigger replacement. String
The name of the OSS object (ZIP package) that contains the function code.
skipDestroy Boolean
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
zipFile Changes to this property will trigger replacement. String

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

Outputs

All input properties are implicitly available as output properties. Additionally, the LayerVersion resource produces the following output properties:

Acl string
The access mode of Layer Version.
Arn string
The arn of Layer Version.
CodeCheckSum string
The checksum of the layer code package.
Id string
The provider-assigned unique ID for this managed resource.
Version string
The version of Layer Version.
Acl string
The access mode of Layer Version.
Arn string
The arn of Layer Version.
CodeCheckSum string
The checksum of the layer code package.
Id string
The provider-assigned unique ID for this managed resource.
Version string
The version of Layer Version.
acl String
The access mode of Layer Version.
arn String
The arn of Layer Version.
codeCheckSum String
The checksum of the layer code package.
id String
The provider-assigned unique ID for this managed resource.
version String
The version of Layer Version.
acl string
The access mode of Layer Version.
arn string
The arn of Layer Version.
codeCheckSum string
The checksum of the layer code package.
id string
The provider-assigned unique ID for this managed resource.
version string
The version of Layer Version.
acl str
The access mode of Layer Version.
arn str
The arn of Layer Version.
code_check_sum str
The checksum of the layer code package.
id str
The provider-assigned unique ID for this managed resource.
version str
The version of Layer Version.
acl String
The access mode of Layer Version.
arn String
The arn of Layer Version.
codeCheckSum String
The checksum of the layer code package.
id String
The provider-assigned unique ID for this managed resource.
version String
The version of Layer Version.

Look up Existing LayerVersion Resource

Get an existing LayerVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LayerVersionState, opts?: CustomResourceOptions): LayerVersion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl: Optional[str] = None,
        arn: Optional[str] = None,
        code_check_sum: Optional[str] = None,
        compatible_runtimes: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        layer_name: Optional[str] = None,
        oss_bucket_name: Optional[str] = None,
        oss_object_name: Optional[str] = None,
        skip_destroy: Optional[bool] = None,
        version: Optional[str] = None,
        zip_file: Optional[str] = None) -> LayerVersion
func GetLayerVersion(ctx *Context, name string, id IDInput, state *LayerVersionState, opts ...ResourceOption) (*LayerVersion, error)
public static LayerVersion Get(string name, Input<string> id, LayerVersionState? state, CustomResourceOptions? opts = null)
public static LayerVersion get(String name, Output<String> id, LayerVersionState state, CustomResourceOptions options)
resources:  _:    type: alicloud:fc:LayerVersion    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Acl string
The access mode of Layer Version.
Arn string
The arn of Layer Version.
CodeCheckSum string
The checksum of the layer code package.
CompatibleRuntimes Changes to this property will trigger replacement. List<string>
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
Description Changes to this property will trigger replacement. string
The description of the layer version.
LayerName Changes to this property will trigger replacement. string
The name of the layer.
OssBucketName Changes to this property will trigger replacement. string
The name of the OSS bucket that stores the ZIP package of the function code.
OssObjectName Changes to this property will trigger replacement. string
The name of the OSS object (ZIP package) that contains the function code.
SkipDestroy bool
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
Version string
The version of Layer Version.
ZipFile Changes to this property will trigger replacement. string

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

Acl string
The access mode of Layer Version.
Arn string
The arn of Layer Version.
CodeCheckSum string
The checksum of the layer code package.
CompatibleRuntimes Changes to this property will trigger replacement. []string
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
Description Changes to this property will trigger replacement. string
The description of the layer version.
LayerName Changes to this property will trigger replacement. string
The name of the layer.
OssBucketName Changes to this property will trigger replacement. string
The name of the OSS bucket that stores the ZIP package of the function code.
OssObjectName Changes to this property will trigger replacement. string
The name of the OSS object (ZIP package) that contains the function code.
SkipDestroy bool
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
Version string
The version of Layer Version.
ZipFile Changes to this property will trigger replacement. string

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

acl String
The access mode of Layer Version.
arn String
The arn of Layer Version.
codeCheckSum String
The checksum of the layer code package.
compatibleRuntimes Changes to this property will trigger replacement. List<String>
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
description Changes to this property will trigger replacement. String
The description of the layer version.
layerName Changes to this property will trigger replacement. String
The name of the layer.
ossBucketName Changes to this property will trigger replacement. String
The name of the OSS bucket that stores the ZIP package of the function code.
ossObjectName Changes to this property will trigger replacement. String
The name of the OSS object (ZIP package) that contains the function code.
skipDestroy Boolean
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
version String
The version of Layer Version.
zipFile Changes to this property will trigger replacement. String

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

acl string
The access mode of Layer Version.
arn string
The arn of Layer Version.
codeCheckSum string
The checksum of the layer code package.
compatibleRuntimes Changes to this property will trigger replacement. string[]
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
description Changes to this property will trigger replacement. string
The description of the layer version.
layerName Changes to this property will trigger replacement. string
The name of the layer.
ossBucketName Changes to this property will trigger replacement. string
The name of the OSS bucket that stores the ZIP package of the function code.
ossObjectName Changes to this property will trigger replacement. string
The name of the OSS object (ZIP package) that contains the function code.
skipDestroy boolean
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
version string
The version of Layer Version.
zipFile Changes to this property will trigger replacement. string

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

acl str
The access mode of Layer Version.
arn str
The arn of Layer Version.
code_check_sum str
The checksum of the layer code package.
compatible_runtimes Changes to this property will trigger replacement. Sequence[str]
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
description Changes to this property will trigger replacement. str
The description of the layer version.
layer_name Changes to this property will trigger replacement. str
The name of the layer.
oss_bucket_name Changes to this property will trigger replacement. str
The name of the OSS bucket that stores the ZIP package of the function code.
oss_object_name Changes to this property will trigger replacement. str
The name of the OSS object (ZIP package) that contains the function code.
skip_destroy bool
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
version str
The version of Layer Version.
zip_file Changes to this property will trigger replacement. str

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

acl String
The access mode of Layer Version.
arn String
The arn of Layer Version.
codeCheckSum String
The checksum of the layer code package.
compatibleRuntimes Changes to this property will trigger replacement. List<String>
The list of runtime environments that are supported by the layer. Valid values: nodejs14, nodejs12, nodejs10, nodejs8, nodejs6, python3.9, python3, python2.7, java11, java8, php7.2, go1,dotnetcore2.1, custom.
description Changes to this property will trigger replacement. String
The description of the layer version.
layerName Changes to this property will trigger replacement. String
The name of the layer.
ossBucketName Changes to this property will trigger replacement. String
The name of the OSS bucket that stores the ZIP package of the function code.
ossObjectName Changes to this property will trigger replacement. String
The name of the OSS object (ZIP package) that contains the function code.
skipDestroy Boolean
Whether to retain the old version of a previously deployed Lambda Layer. Default is false. When this is not set to true, changing any of compatible_runtimes, description, layer_name, oss_bucket_name, oss_object_name, or zip_file forces deletion of the existing layer version and creation of a new layer version.
version String
The version of Layer Version.
zipFile Changes to this property will trigger replacement. String

The ZIP package of the function code that is encoded in the Base64 format.

NOTE: zip_file and oss_bucket_name, oss_object_name cannot be used together.

Import

Function Compute Layer Version can be imported using the id, e.g.

$ pulumi import alicloud:fc/layerVersion:LayerVersion example my_function
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.