1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ScfLayer
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.ScfLayer

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provide a resource to create a SCF layer.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = new tencentcloud.ScfLayer("foo", {
        compatibleRuntimes: ["Python3.6"],
        content: {
            cosBucketName: "test-bucket",
            cosBucketRegion: "ap-guangzhou",
            cosObjectName: "/foo.zip",
        },
        description: "foo",
        layerName: "foo",
        licenseInfo: "foo",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.ScfLayer("foo",
        compatible_runtimes=["Python3.6"],
        content={
            "cos_bucket_name": "test-bucket",
            "cos_bucket_region": "ap-guangzhou",
            "cos_object_name": "/foo.zip",
        },
        description="foo",
        layer_name="foo",
        license_info="foo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewScfLayer(ctx, "foo", &tencentcloud.ScfLayerArgs{
    			CompatibleRuntimes: pulumi.StringArray{
    				pulumi.String("Python3.6"),
    			},
    			Content: &tencentcloud.ScfLayerContentArgs{
    				CosBucketName:   pulumi.String("test-bucket"),
    				CosBucketRegion: pulumi.String("ap-guangzhou"),
    				CosObjectName:   pulumi.String("/foo.zip"),
    			},
    			Description: pulumi.String("foo"),
    			LayerName:   pulumi.String("foo"),
    			LicenseInfo: pulumi.String("foo"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Tencentcloud.ScfLayer("foo", new()
        {
            CompatibleRuntimes = new[]
            {
                "Python3.6",
            },
            Content = new Tencentcloud.Inputs.ScfLayerContentArgs
            {
                CosBucketName = "test-bucket",
                CosBucketRegion = "ap-guangzhou",
                CosObjectName = "/foo.zip",
            },
            Description = "foo",
            LayerName = "foo",
            LicenseInfo = "foo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ScfLayer;
    import com.pulumi.tencentcloud.ScfLayerArgs;
    import com.pulumi.tencentcloud.inputs.ScfLayerContentArgs;
    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 foo = new ScfLayer("foo", ScfLayerArgs.builder()
                .compatibleRuntimes("Python3.6")
                .content(ScfLayerContentArgs.builder()
                    .cosBucketName("test-bucket")
                    .cosBucketRegion("ap-guangzhou")
                    .cosObjectName("/foo.zip")
                    .build())
                .description("foo")
                .layerName("foo")
                .licenseInfo("foo")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: tencentcloud:ScfLayer
        properties:
          compatibleRuntimes:
            - Python3.6
          content:
            cosBucketName: test-bucket
            cosBucketRegion: ap-guangzhou
            cosObjectName: /foo.zip
          description: foo
          layerName: foo
          licenseInfo: foo
    

    Create ScfLayer Resource

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

    Constructor syntax

    new ScfLayer(name: string, args: ScfLayerArgs, opts?: CustomResourceOptions);
    @overload
    def ScfLayer(resource_name: str,
                 args: ScfLayerArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScfLayer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 compatible_runtimes: Optional[Sequence[str]] = None,
                 content: Optional[ScfLayerContentArgs] = None,
                 layer_name: Optional[str] = None,
                 description: Optional[str] = None,
                 license_info: Optional[str] = None,
                 scf_layer_id: Optional[str] = None)
    func NewScfLayer(ctx *Context, name string, args ScfLayerArgs, opts ...ResourceOption) (*ScfLayer, error)
    public ScfLayer(string name, ScfLayerArgs args, CustomResourceOptions? opts = null)
    public ScfLayer(String name, ScfLayerArgs args)
    public ScfLayer(String name, ScfLayerArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ScfLayer
    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 ScfLayerArgs
    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 ScfLayerArgs
    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 ScfLayerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScfLayerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScfLayerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ScfLayer 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 ScfLayer resource accepts the following input properties:

    CompatibleRuntimes List<string>
    The compatible runtimes of layer.
    Content ScfLayerContent
    The source code of layer.
    LayerName string
    The name of layer.
    Description string
    The description of layer.
    LicenseInfo string
    The license info of layer.
    ScfLayerId string
    ID of the resource.
    CompatibleRuntimes []string
    The compatible runtimes of layer.
    Content ScfLayerContentArgs
    The source code of layer.
    LayerName string
    The name of layer.
    Description string
    The description of layer.
    LicenseInfo string
    The license info of layer.
    ScfLayerId string
    ID of the resource.
    compatibleRuntimes List<String>
    The compatible runtimes of layer.
    content ScfLayerContent
    The source code of layer.
    layerName String
    The name of layer.
    description String
    The description of layer.
    licenseInfo String
    The license info of layer.
    scfLayerId String
    ID of the resource.
    compatibleRuntimes string[]
    The compatible runtimes of layer.
    content ScfLayerContent
    The source code of layer.
    layerName string
    The name of layer.
    description string
    The description of layer.
    licenseInfo string
    The license info of layer.
    scfLayerId string
    ID of the resource.
    compatible_runtimes Sequence[str]
    The compatible runtimes of layer.
    content ScfLayerContentArgs
    The source code of layer.
    layer_name str
    The name of layer.
    description str
    The description of layer.
    license_info str
    The license info of layer.
    scf_layer_id str
    ID of the resource.
    compatibleRuntimes List<String>
    The compatible runtimes of layer.
    content Property Map
    The source code of layer.
    layerName String
    The name of layer.
    description String
    The description of layer.
    licenseInfo String
    The license info of layer.
    scfLayerId String
    ID of the resource.

    Outputs

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

    CodeSha256 string
    The code type of layer.
    CreateTime string
    The create time of layer.
    Id string
    The provider-assigned unique ID for this managed resource.
    LayerVersion double
    The version of layer.
    Location string
    The download location url of layer.
    Status string
    The current status of layer.
    CodeSha256 string
    The code type of layer.
    CreateTime string
    The create time of layer.
    Id string
    The provider-assigned unique ID for this managed resource.
    LayerVersion float64
    The version of layer.
    Location string
    The download location url of layer.
    Status string
    The current status of layer.
    codeSha256 String
    The code type of layer.
    createTime String
    The create time of layer.
    id String
    The provider-assigned unique ID for this managed resource.
    layerVersion Double
    The version of layer.
    location String
    The download location url of layer.
    status String
    The current status of layer.
    codeSha256 string
    The code type of layer.
    createTime string
    The create time of layer.
    id string
    The provider-assigned unique ID for this managed resource.
    layerVersion number
    The version of layer.
    location string
    The download location url of layer.
    status string
    The current status of layer.
    code_sha256 str
    The code type of layer.
    create_time str
    The create time of layer.
    id str
    The provider-assigned unique ID for this managed resource.
    layer_version float
    The version of layer.
    location str
    The download location url of layer.
    status str
    The current status of layer.
    codeSha256 String
    The code type of layer.
    createTime String
    The create time of layer.
    id String
    The provider-assigned unique ID for this managed resource.
    layerVersion Number
    The version of layer.
    location String
    The download location url of layer.
    status String
    The current status of layer.

    Look up Existing ScfLayer Resource

    Get an existing ScfLayer 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?: ScfLayerState, opts?: CustomResourceOptions): ScfLayer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            code_sha256: Optional[str] = None,
            compatible_runtimes: Optional[Sequence[str]] = None,
            content: Optional[ScfLayerContentArgs] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            layer_name: Optional[str] = None,
            layer_version: Optional[float] = None,
            license_info: Optional[str] = None,
            location: Optional[str] = None,
            scf_layer_id: Optional[str] = None,
            status: Optional[str] = None) -> ScfLayer
    func GetScfLayer(ctx *Context, name string, id IDInput, state *ScfLayerState, opts ...ResourceOption) (*ScfLayer, error)
    public static ScfLayer Get(string name, Input<string> id, ScfLayerState? state, CustomResourceOptions? opts = null)
    public static ScfLayer get(String name, Output<String> id, ScfLayerState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ScfLayer    get:      id: ${id}
    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.
    The following state arguments are supported:
    CodeSha256 string
    The code type of layer.
    CompatibleRuntimes List<string>
    The compatible runtimes of layer.
    Content ScfLayerContent
    The source code of layer.
    CreateTime string
    The create time of layer.
    Description string
    The description of layer.
    LayerName string
    The name of layer.
    LayerVersion double
    The version of layer.
    LicenseInfo string
    The license info of layer.
    Location string
    The download location url of layer.
    ScfLayerId string
    ID of the resource.
    Status string
    The current status of layer.
    CodeSha256 string
    The code type of layer.
    CompatibleRuntimes []string
    The compatible runtimes of layer.
    Content ScfLayerContentArgs
    The source code of layer.
    CreateTime string
    The create time of layer.
    Description string
    The description of layer.
    LayerName string
    The name of layer.
    LayerVersion float64
    The version of layer.
    LicenseInfo string
    The license info of layer.
    Location string
    The download location url of layer.
    ScfLayerId string
    ID of the resource.
    Status string
    The current status of layer.
    codeSha256 String
    The code type of layer.
    compatibleRuntimes List<String>
    The compatible runtimes of layer.
    content ScfLayerContent
    The source code of layer.
    createTime String
    The create time of layer.
    description String
    The description of layer.
    layerName String
    The name of layer.
    layerVersion Double
    The version of layer.
    licenseInfo String
    The license info of layer.
    location String
    The download location url of layer.
    scfLayerId String
    ID of the resource.
    status String
    The current status of layer.
    codeSha256 string
    The code type of layer.
    compatibleRuntimes string[]
    The compatible runtimes of layer.
    content ScfLayerContent
    The source code of layer.
    createTime string
    The create time of layer.
    description string
    The description of layer.
    layerName string
    The name of layer.
    layerVersion number
    The version of layer.
    licenseInfo string
    The license info of layer.
    location string
    The download location url of layer.
    scfLayerId string
    ID of the resource.
    status string
    The current status of layer.
    code_sha256 str
    The code type of layer.
    compatible_runtimes Sequence[str]
    The compatible runtimes of layer.
    content ScfLayerContentArgs
    The source code of layer.
    create_time str
    The create time of layer.
    description str
    The description of layer.
    layer_name str
    The name of layer.
    layer_version float
    The version of layer.
    license_info str
    The license info of layer.
    location str
    The download location url of layer.
    scf_layer_id str
    ID of the resource.
    status str
    The current status of layer.
    codeSha256 String
    The code type of layer.
    compatibleRuntimes List<String>
    The compatible runtimes of layer.
    content Property Map
    The source code of layer.
    createTime String
    The create time of layer.
    description String
    The description of layer.
    layerName String
    The name of layer.
    layerVersion Number
    The version of layer.
    licenseInfo String
    The license info of layer.
    location String
    The download location url of layer.
    scfLayerId String
    ID of the resource.
    status String
    The current status of layer.

    Supporting Types

    ScfLayerContent, ScfLayerContentArgs

    CosBucketName string
    Cos bucket name of the SCF layer, such as cos-1234567890, conflict with zip_file.
    CosBucketRegion string
    Cos bucket region of the SCF layer, conflict with zip_file.
    CosObjectName string
    Cos object name of the SCF layer, should have suffix .zip or .jar, conflict with zip_file.
    ZipFile string
    Zip file of the SCF layer, conflict with cos_bucket_name, cos_object_name, cos_bucket_region.
    CosBucketName string
    Cos bucket name of the SCF layer, such as cos-1234567890, conflict with zip_file.
    CosBucketRegion string
    Cos bucket region of the SCF layer, conflict with zip_file.
    CosObjectName string
    Cos object name of the SCF layer, should have suffix .zip or .jar, conflict with zip_file.
    ZipFile string
    Zip file of the SCF layer, conflict with cos_bucket_name, cos_object_name, cos_bucket_region.
    cosBucketName String
    Cos bucket name of the SCF layer, such as cos-1234567890, conflict with zip_file.
    cosBucketRegion String
    Cos bucket region of the SCF layer, conflict with zip_file.
    cosObjectName String
    Cos object name of the SCF layer, should have suffix .zip or .jar, conflict with zip_file.
    zipFile String
    Zip file of the SCF layer, conflict with cos_bucket_name, cos_object_name, cos_bucket_region.
    cosBucketName string
    Cos bucket name of the SCF layer, such as cos-1234567890, conflict with zip_file.
    cosBucketRegion string
    Cos bucket region of the SCF layer, conflict with zip_file.
    cosObjectName string
    Cos object name of the SCF layer, should have suffix .zip or .jar, conflict with zip_file.
    zipFile string
    Zip file of the SCF layer, conflict with cos_bucket_name, cos_object_name, cos_bucket_region.
    cos_bucket_name str
    Cos bucket name of the SCF layer, such as cos-1234567890, conflict with zip_file.
    cos_bucket_region str
    Cos bucket region of the SCF layer, conflict with zip_file.
    cos_object_name str
    Cos object name of the SCF layer, should have suffix .zip or .jar, conflict with zip_file.
    zip_file str
    Zip file of the SCF layer, conflict with cos_bucket_name, cos_object_name, cos_bucket_region.
    cosBucketName String
    Cos bucket name of the SCF layer, such as cos-1234567890, conflict with zip_file.
    cosBucketRegion String
    Cos bucket region of the SCF layer, conflict with zip_file.
    cosObjectName String
    Cos object name of the SCF layer, should have suffix .zip or .jar, conflict with zip_file.
    zipFile String
    Zip file of the SCF layer, conflict with cos_bucket_name, cos_object_name, cos_bucket_region.

    Import

    Scf layer can be imported, e.g.

    $ pulumi import tencentcloud:index/scfLayer:ScfLayer layer layerId#layerVersion
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack