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,
});
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)
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 {
_, 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.String(fmt.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.String(fmt.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
})
}
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,
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args LayerVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args LayerVersionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LayerVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var layerVersionResource = new LayerVersion("layerVersionResource", LayerVersionArgs.builder()
.compatibleRuntimes("string")
.layerName("string")
.description("string")
.ossBucketName("string")
.ossObjectName("string")
.skipDestroy(false)
.zipFile("string")
.build());
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")
const layerVersionResource = new alicloud.fc.LayerVersion("layerVersionResource", {
compatibleRuntimes: ["string"],
layerName: "string",
description: "string",
ossBucketName: "string",
ossObjectName: "string",
skipDestroy: false,
zipFile: "string",
});
type: alicloud:fc:LayerVersion
properties:
compatibleRuntimes:
- string
description: string
layerName: string
ossBucketName: string
ossObjectName: string
skipDestroy: false
zipFile: string
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
The LayerVersion resource accepts the following input properties:
- Compatible
Runtimes 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
. - Layer
Name string - The name of the layer.
- Description string
- The description of the layer version.
- Oss
Bucket stringName - The name of the OSS bucket that stores the ZIP package of the function code.
- Oss
Object stringName - 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 totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - Zip
File string The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- Compatible
Runtimes []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
. - Layer
Name string - The name of the layer.
- Description string
- The description of the layer version.
- Oss
Bucket stringName - The name of the OSS bucket that stores the ZIP package of the function code.
- Oss
Object stringName - 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 totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - Zip
File string The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- compatible
Runtimes 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
. - layer
Name String - The name of the layer.
- description String
- The description of the layer version.
- oss
Bucket StringName - The name of the OSS bucket that stores the ZIP package of the function code.
- oss
Object StringName - The name of the OSS object (ZIP package) that contains the function code.
- skip
Destroy Boolean - Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - zip
File String The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- compatible
Runtimes 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
. - layer
Name string - The name of the layer.
- description string
- The description of the layer version.
- oss
Bucket stringName - The name of the OSS bucket that stores the ZIP package of the function code.
- oss
Object stringName - The name of the OSS object (ZIP package) that contains the function code.
- skip
Destroy boolean - Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - zip
File string The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- compatible_
runtimes 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 str - The name of the layer.
- description str
- The description of the layer version.
- oss_
bucket_ strname - The name of the OSS bucket that stores the ZIP package of the function code.
- oss_
object_ strname - 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 totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - zip_
file str The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- compatible
Runtimes 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
. - layer
Name String - The name of the layer.
- description String
- The description of the layer version.
- oss
Bucket StringName - The name of the OSS bucket that stores the ZIP package of the function code.
- oss
Object StringName - The name of the OSS object (ZIP package) that contains the function code.
- skip
Destroy Boolean - Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - zip
File String The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_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.
- Code
Check stringSum - 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.
- Code
Check stringSum - 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.
- code
Check StringSum - 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.
- code
Check stringSum - 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_ strsum - 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.
- code
Check StringSum - 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Acl string
- The access mode of Layer Version.
- Arn string
- The arn of Layer Version.
- Code
Check stringSum - The checksum of the layer code package.
- Compatible
Runtimes 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 string
- The description of the layer version.
- Layer
Name string - The name of the layer.
- Oss
Bucket stringName - The name of the OSS bucket that stores the ZIP package of the function code.
- Oss
Object stringName - 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 totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - Version string
- The version of Layer Version.
- Zip
File string The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- Acl string
- The access mode of Layer Version.
- Arn string
- The arn of Layer Version.
- Code
Check stringSum - The checksum of the layer code package.
- Compatible
Runtimes []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 string
- The description of the layer version.
- Layer
Name string - The name of the layer.
- Oss
Bucket stringName - The name of the OSS bucket that stores the ZIP package of the function code.
- Oss
Object stringName - 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 totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - Version string
- The version of Layer Version.
- Zip
File string The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- acl String
- The access mode of Layer Version.
- arn String
- The arn of Layer Version.
- code
Check StringSum - The checksum of the layer code package.
- compatible
Runtimes 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 String
- The description of the layer version.
- layer
Name String - The name of the layer.
- oss
Bucket StringName - The name of the OSS bucket that stores the ZIP package of the function code.
- oss
Object StringName - The name of the OSS object (ZIP package) that contains the function code.
- skip
Destroy Boolean - Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - version String
- The version of Layer Version.
- zip
File String The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- acl string
- The access mode of Layer Version.
- arn string
- The arn of Layer Version.
- code
Check stringSum - The checksum of the layer code package.
- compatible
Runtimes 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 string
- The description of the layer version.
- layer
Name string - The name of the layer.
- oss
Bucket stringName - The name of the OSS bucket that stores the ZIP package of the function code.
- oss
Object stringName - The name of the OSS object (ZIP package) that contains the function code.
- skip
Destroy boolean - Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - version string
- The version of Layer Version.
- zip
File string The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_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_ strsum - The checksum of the layer code package.
- compatible_
runtimes 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 str
- The description of the layer version.
- layer_
name str - The name of the layer.
- oss_
bucket_ strname - The name of the OSS bucket that stores the ZIP package of the function code.
- oss_
object_ strname - 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 totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - version str
- The version of Layer Version.
- zip_
file str The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_bucket_name
,oss_object_name
cannot be used together.
- acl String
- The access mode of Layer Version.
- arn String
- The arn of Layer Version.
- code
Check StringSum - The checksum of the layer code package.
- compatible
Runtimes 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 String
- The description of the layer version.
- layer
Name String - The name of the layer.
- oss
Bucket StringName - The name of the OSS bucket that stores the ZIP package of the function code.
- oss
Object StringName - The name of the OSS object (ZIP package) that contains the function code.
- skip
Destroy Boolean - Whether to retain the old version of a previously deployed Lambda Layer. Default is
false
. When this is not set totrue
, changing any ofcompatible_runtimes
,description
,layer_name
,oss_bucket_name
,oss_object_name
, orzip_file
forces deletion of the existing layer version and creation of a new layer version. - version String
- The version of Layer Version.
- zip
File String The ZIP package of the function code that is encoded in the Base64 format.
NOTE:
zip_file
andoss_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
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.