tencentcloud.ScfLayer
Explore with Pulumi AI
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:
- Compatible
Runtimes List<string> - The compatible runtimes of layer.
- Content
Scf
Layer Content - The source code of layer.
- Layer
Name string - The name of layer.
- Description string
- The description of layer.
- License
Info string - The license info of layer.
- Scf
Layer stringId - ID of the resource.
- Compatible
Runtimes []string - The compatible runtimes of layer.
- Content
Scf
Layer Content Args - The source code of layer.
- Layer
Name string - The name of layer.
- Description string
- The description of layer.
- License
Info string - The license info of layer.
- Scf
Layer stringId - ID of the resource.
- compatible
Runtimes List<String> - The compatible runtimes of layer.
- content
Scf
Layer Content - The source code of layer.
- layer
Name String - The name of layer.
- description String
- The description of layer.
- license
Info String - The license info of layer.
- scf
Layer StringId - ID of the resource.
- compatible
Runtimes string[] - The compatible runtimes of layer.
- content
Scf
Layer Content - The source code of layer.
- layer
Name string - The name of layer.
- description string
- The description of layer.
- license
Info string - The license info of layer.
- scf
Layer stringId - ID of the resource.
- compatible_
runtimes Sequence[str] - The compatible runtimes of layer.
- content
Scf
Layer Content Args - 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_ strid - ID of the resource.
- compatible
Runtimes List<String> - The compatible runtimes of layer.
- content Property Map
- The source code of layer.
- layer
Name String - The name of layer.
- description String
- The description of layer.
- license
Info String - The license info of layer.
- scf
Layer StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScfLayer resource produces the following output properties:
- Code
Sha256 string - The code type of layer.
- Create
Time string - The create time of layer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Layer
Version double - The version of layer.
- Location string
- The download location url of layer.
- Status string
- The current status of layer.
- Code
Sha256 string - The code type of layer.
- Create
Time string - The create time of layer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Layer
Version float64 - The version of layer.
- Location string
- The download location url of layer.
- Status string
- The current status of layer.
- code
Sha256 String - The code type of layer.
- create
Time String - The create time of layer.
- id String
- The provider-assigned unique ID for this managed resource.
- layer
Version Double - The version of layer.
- location String
- The download location url of layer.
- status String
- The current status of layer.
- code
Sha256 string - The code type of layer.
- create
Time string - The create time of layer.
- id string
- The provider-assigned unique ID for this managed resource.
- layer
Version 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.
- code
Sha256 String - The code type of layer.
- create
Time String - The create time of layer.
- id String
- The provider-assigned unique ID for this managed resource.
- layer
Version 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.
- Code
Sha256 string - The code type of layer.
- Compatible
Runtimes List<string> - The compatible runtimes of layer.
- Content
Scf
Layer Content - The source code of layer.
- Create
Time string - The create time of layer.
- Description string
- The description of layer.
- Layer
Name string - The name of layer.
- Layer
Version double - The version of layer.
- License
Info string - The license info of layer.
- Location string
- The download location url of layer.
- Scf
Layer stringId - ID of the resource.
- Status string
- The current status of layer.
- Code
Sha256 string - The code type of layer.
- Compatible
Runtimes []string - The compatible runtimes of layer.
- Content
Scf
Layer Content Args - The source code of layer.
- Create
Time string - The create time of layer.
- Description string
- The description of layer.
- Layer
Name string - The name of layer.
- Layer
Version float64 - The version of layer.
- License
Info string - The license info of layer.
- Location string
- The download location url of layer.
- Scf
Layer stringId - ID of the resource.
- Status string
- The current status of layer.
- code
Sha256 String - The code type of layer.
- compatible
Runtimes List<String> - The compatible runtimes of layer.
- content
Scf
Layer Content - The source code of layer.
- create
Time String - The create time of layer.
- description String
- The description of layer.
- layer
Name String - The name of layer.
- layer
Version Double - The version of layer.
- license
Info String - The license info of layer.
- location String
- The download location url of layer.
- scf
Layer StringId - ID of the resource.
- status String
- The current status of layer.
- code
Sha256 string - The code type of layer.
- compatible
Runtimes string[] - The compatible runtimes of layer.
- content
Scf
Layer Content - The source code of layer.
- create
Time string - The create time of layer.
- description string
- The description of layer.
- layer
Name string - The name of layer.
- layer
Version number - The version of layer.
- license
Info string - The license info of layer.
- location string
- The download location url of layer.
- scf
Layer stringId - 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
Scf
Layer Content Args - 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_ strid - ID of the resource.
- status str
- The current status of layer.
- code
Sha256 String - The code type of layer.
- compatible
Runtimes List<String> - The compatible runtimes of layer.
- content Property Map
- The source code of layer.
- create
Time String - The create time of layer.
- description String
- The description of layer.
- layer
Name String - The name of layer.
- layer
Version Number - The version of layer.
- license
Info String - The license info of layer.
- location String
- The download location url of layer.
- scf
Layer StringId - ID of the resource.
- status String
- The current status of layer.
Supporting Types
ScfLayerContent, ScfLayerContentArgs
- Cos
Bucket stringName - Cos bucket name of the SCF layer, such as
cos-1234567890
, conflict withzip_file
. - Cos
Bucket stringRegion - Cos bucket region of the SCF layer, conflict with
zip_file
. - Cos
Object stringName - Cos object name of the SCF layer, should have suffix
.zip
or.jar
, conflict withzip_file
. - Zip
File string - Zip file of the SCF layer, conflict with
cos_bucket_name
,cos_object_name
,cos_bucket_region
.
- Cos
Bucket stringName - Cos bucket name of the SCF layer, such as
cos-1234567890
, conflict withzip_file
. - Cos
Bucket stringRegion - Cos bucket region of the SCF layer, conflict with
zip_file
. - Cos
Object stringName - Cos object name of the SCF layer, should have suffix
.zip
or.jar
, conflict withzip_file
. - Zip
File string - Zip file of the SCF layer, conflict with
cos_bucket_name
,cos_object_name
,cos_bucket_region
.
- cos
Bucket StringName - Cos bucket name of the SCF layer, such as
cos-1234567890
, conflict withzip_file
. - cos
Bucket StringRegion - Cos bucket region of the SCF layer, conflict with
zip_file
. - cos
Object StringName - Cos object name of the SCF layer, should have suffix
.zip
or.jar
, conflict withzip_file
. - zip
File String - Zip file of the SCF layer, conflict with
cos_bucket_name
,cos_object_name
,cos_bucket_region
.
- cos
Bucket stringName - Cos bucket name of the SCF layer, such as
cos-1234567890
, conflict withzip_file
. - cos
Bucket stringRegion - Cos bucket region of the SCF layer, conflict with
zip_file
. - cos
Object stringName - Cos object name of the SCF layer, should have suffix
.zip
or.jar
, conflict withzip_file
. - zip
File string - Zip file of the SCF layer, conflict with
cos_bucket_name
,cos_object_name
,cos_bucket_region
.
- cos_
bucket_ strname - Cos bucket name of the SCF layer, such as
cos-1234567890
, conflict withzip_file
. - cos_
bucket_ strregion - Cos bucket region of the SCF layer, conflict with
zip_file
. - cos_
object_ strname - Cos object name of the SCF layer, should have suffix
.zip
or.jar
, conflict withzip_file
. - zip_
file str - Zip file of the SCF layer, conflict with
cos_bucket_name
,cos_object_name
,cos_bucket_region
.
- cos
Bucket StringName - Cos bucket name of the SCF layer, such as
cos-1234567890
, conflict withzip_file
. - cos
Bucket StringRegion - Cos bucket region of the SCF layer, conflict with
zip_file
. - cos
Object StringName - Cos object name of the SCF layer, should have suffix
.zip
or.jar
, conflict withzip_file
. - zip
File 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.