1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. WedataCodeFile
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack

tencentcloud.WedataCodeFile

Get Started
tencentcloud logo
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack

    Provides a resource to create a WeData code file

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.WedataCodeFolder("example", {
        projectId: "2983848457986924544",
        folderName: "tf_example",
        parentFolderPath: "/",
    });
    const exampleWedataCodeFile = new tencentcloud.WedataCodeFile("example", {
        projectId: "2983848457986924544",
        codeFileName: "tf_example_code_file",
        parentFolderPath: example.path,
        codeFileContent: "Hello Terraform",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.WedataCodeFolder("example",
        project_id="2983848457986924544",
        folder_name="tf_example",
        parent_folder_path="/")
    example_wedata_code_file = tencentcloud.WedataCodeFile("example",
        project_id="2983848457986924544",
        code_file_name="tf_example_code_file",
        parent_folder_path=example.path,
        code_file_content="Hello Terraform")
    
    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 {
    		example, err := tencentcloud.NewWedataCodeFolder(ctx, "example", &tencentcloud.WedataCodeFolderArgs{
    			ProjectId:        pulumi.String("2983848457986924544"),
    			FolderName:       pulumi.String("tf_example"),
    			ParentFolderPath: pulumi.String("/"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewWedataCodeFile(ctx, "example", &tencentcloud.WedataCodeFileArgs{
    			ProjectId:        pulumi.String("2983848457986924544"),
    			CodeFileName:     pulumi.String("tf_example_code_file"),
    			ParentFolderPath: example.Path,
    			CodeFileContent:  pulumi.String("Hello Terraform"),
    		})
    		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 example = new Tencentcloud.WedataCodeFolder("example", new()
        {
            ProjectId = "2983848457986924544",
            FolderName = "tf_example",
            ParentFolderPath = "/",
        });
    
        var exampleWedataCodeFile = new Tencentcloud.WedataCodeFile("example", new()
        {
            ProjectId = "2983848457986924544",
            CodeFileName = "tf_example_code_file",
            ParentFolderPath = example.Path,
            CodeFileContent = "Hello Terraform",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.WedataCodeFolder;
    import com.pulumi.tencentcloud.WedataCodeFolderArgs;
    import com.pulumi.tencentcloud.WedataCodeFile;
    import com.pulumi.tencentcloud.WedataCodeFileArgs;
    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 example = new WedataCodeFolder("example", WedataCodeFolderArgs.builder()
                .projectId("2983848457986924544")
                .folderName("tf_example")
                .parentFolderPath("/")
                .build());
    
            var exampleWedataCodeFile = new WedataCodeFile("exampleWedataCodeFile", WedataCodeFileArgs.builder()
                .projectId("2983848457986924544")
                .codeFileName("tf_example_code_file")
                .parentFolderPath(example.path())
                .codeFileContent("Hello Terraform")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:WedataCodeFolder
        properties:
          projectId: '2983848457986924544'
          folderName: tf_example
          parentFolderPath: /
      exampleWedataCodeFile:
        type: tencentcloud:WedataCodeFile
        name: example
        properties:
          projectId: '2983848457986924544'
          codeFileName: tf_example_code_file
          parentFolderPath: ${example.path}
          codeFileContent: Hello Terraform
    

    Create WedataCodeFile Resource

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

    Constructor syntax

    new WedataCodeFile(name: string, args: WedataCodeFileArgs, opts?: CustomResourceOptions);
    @overload
    def WedataCodeFile(resource_name: str,
                       args: WedataCodeFileArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def WedataCodeFile(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       code_file_name: Optional[str] = None,
                       parent_folder_path: Optional[str] = None,
                       project_id: Optional[str] = None,
                       code_file_config: Optional[WedataCodeFileCodeFileConfigArgs] = None,
                       code_file_content: Optional[str] = None,
                       wedata_code_file_id: Optional[str] = None)
    func NewWedataCodeFile(ctx *Context, name string, args WedataCodeFileArgs, opts ...ResourceOption) (*WedataCodeFile, error)
    public WedataCodeFile(string name, WedataCodeFileArgs args, CustomResourceOptions? opts = null)
    public WedataCodeFile(String name, WedataCodeFileArgs args)
    public WedataCodeFile(String name, WedataCodeFileArgs args, CustomResourceOptions options)
    
    type: tencentcloud:WedataCodeFile
    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 WedataCodeFileArgs
    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 WedataCodeFileArgs
    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 WedataCodeFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WedataCodeFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WedataCodeFileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    CodeFileName string
    Code file name.
    ParentFolderPath string
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    ProjectId string
    Project ID.
    CodeFileConfig WedataCodeFileCodeFileConfig
    Code file configuration.
    CodeFileContent string
    Code file content.
    WedataCodeFileId string
    ID of the resource.
    CodeFileName string
    Code file name.
    ParentFolderPath string
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    ProjectId string
    Project ID.
    CodeFileConfig WedataCodeFileCodeFileConfigArgs
    Code file configuration.
    CodeFileContent string
    Code file content.
    WedataCodeFileId string
    ID of the resource.
    codeFileName String
    Code file name.
    parentFolderPath String
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    projectId String
    Project ID.
    codeFileConfig WedataCodeFileCodeFileConfig
    Code file configuration.
    codeFileContent String
    Code file content.
    wedataCodeFileId String
    ID of the resource.
    codeFileName string
    Code file name.
    parentFolderPath string
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    projectId string
    Project ID.
    codeFileConfig WedataCodeFileCodeFileConfig
    Code file configuration.
    codeFileContent string
    Code file content.
    wedataCodeFileId string
    ID of the resource.
    code_file_name str
    Code file name.
    parent_folder_path str
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    project_id str
    Project ID.
    code_file_config WedataCodeFileCodeFileConfigArgs
    Code file configuration.
    code_file_content str
    Code file content.
    wedata_code_file_id str
    ID of the resource.
    codeFileName String
    Code file name.
    parentFolderPath String
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    projectId String
    Project ID.
    codeFileConfig Property Map
    Code file configuration.
    codeFileContent String
    Code file content.
    wedataCodeFileId String
    ID of the resource.

    Outputs

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

    AccessScope string
    Permission range: SHARED, PRIVATE.
    CodeFileId string
    Code file ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    AccessScope string
    Permission range: SHARED, PRIVATE.
    CodeFileId string
    Code file ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    accessScope String
    Permission range: SHARED, PRIVATE.
    codeFileId String
    Code file ID.
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    accessScope string
    Permission range: SHARED, PRIVATE.
    codeFileId string
    Code file ID.
    id string
    The provider-assigned unique ID for this managed resource.
    path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    access_scope str
    Permission range: SHARED, PRIVATE.
    code_file_id str
    Code file ID.
    id str
    The provider-assigned unique ID for this managed resource.
    path str
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    accessScope String
    Permission range: SHARED, PRIVATE.
    codeFileId String
    Code file ID.
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.

    Look up Existing WedataCodeFile Resource

    Get an existing WedataCodeFile 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?: WedataCodeFileState, opts?: CustomResourceOptions): WedataCodeFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_scope: Optional[str] = None,
            code_file_config: Optional[WedataCodeFileCodeFileConfigArgs] = None,
            code_file_content: Optional[str] = None,
            code_file_id: Optional[str] = None,
            code_file_name: Optional[str] = None,
            parent_folder_path: Optional[str] = None,
            path: Optional[str] = None,
            project_id: Optional[str] = None,
            wedata_code_file_id: Optional[str] = None) -> WedataCodeFile
    func GetWedataCodeFile(ctx *Context, name string, id IDInput, state *WedataCodeFileState, opts ...ResourceOption) (*WedataCodeFile, error)
    public static WedataCodeFile Get(string name, Input<string> id, WedataCodeFileState? state, CustomResourceOptions? opts = null)
    public static WedataCodeFile get(String name, Output<String> id, WedataCodeFileState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:WedataCodeFile    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:
    AccessScope string
    Permission range: SHARED, PRIVATE.
    CodeFileConfig WedataCodeFileCodeFileConfig
    Code file configuration.
    CodeFileContent string
    Code file content.
    CodeFileId string
    Code file ID.
    CodeFileName string
    Code file name.
    ParentFolderPath string
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    Path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    ProjectId string
    Project ID.
    WedataCodeFileId string
    ID of the resource.
    AccessScope string
    Permission range: SHARED, PRIVATE.
    CodeFileConfig WedataCodeFileCodeFileConfigArgs
    Code file configuration.
    CodeFileContent string
    Code file content.
    CodeFileId string
    Code file ID.
    CodeFileName string
    Code file name.
    ParentFolderPath string
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    Path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    ProjectId string
    Project ID.
    WedataCodeFileId string
    ID of the resource.
    accessScope String
    Permission range: SHARED, PRIVATE.
    codeFileConfig WedataCodeFileCodeFileConfig
    Code file configuration.
    codeFileContent String
    Code file content.
    codeFileId String
    Code file ID.
    codeFileName String
    Code file name.
    parentFolderPath String
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    path String
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    projectId String
    Project ID.
    wedataCodeFileId String
    ID of the resource.
    accessScope string
    Permission range: SHARED, PRIVATE.
    codeFileConfig WedataCodeFileCodeFileConfig
    Code file configuration.
    codeFileContent string
    Code file content.
    codeFileId string
    Code file ID.
    codeFileName string
    Code file name.
    parentFolderPath string
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    projectId string
    Project ID.
    wedataCodeFileId string
    ID of the resource.
    access_scope str
    Permission range: SHARED, PRIVATE.
    code_file_config WedataCodeFileCodeFileConfigArgs
    Code file configuration.
    code_file_content str
    Code file content.
    code_file_id str
    Code file ID.
    code_file_name str
    Code file name.
    parent_folder_path str
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    path str
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    project_id str
    Project ID.
    wedata_code_file_id str
    ID of the resource.
    accessScope String
    Permission range: SHARED, PRIVATE.
    codeFileConfig Property Map
    Code file configuration.
    codeFileContent String
    Code file content.
    codeFileId String
    Code file ID.
    codeFileName String
    Code file name.
    parentFolderPath String
    Parent folder path, for example /aaa/bbb/ccc, path header must start with a slash, root directory pass /.
    path String
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    projectId String
    Project ID.
    wedataCodeFileId String
    ID of the resource.

    Supporting Types

    WedataCodeFileCodeFileConfig, WedataCodeFileCodeFileConfigArgs

    NotebookSessionInfo WedataCodeFileCodeFileConfigNotebookSessionInfo
    Notebook kernel session information.
    Params string
    Advanced runtime parameters, variable substitution, map-json String,String.
    NotebookSessionInfo WedataCodeFileCodeFileConfigNotebookSessionInfo
    Notebook kernel session information.
    Params string
    Advanced runtime parameters, variable substitution, map-json String,String.
    notebookSessionInfo WedataCodeFileCodeFileConfigNotebookSessionInfo
    Notebook kernel session information.
    params String
    Advanced runtime parameters, variable substitution, map-json String,String.
    notebookSessionInfo WedataCodeFileCodeFileConfigNotebookSessionInfo
    Notebook kernel session information.
    params string
    Advanced runtime parameters, variable substitution, map-json String,String.
    notebook_session_info WedataCodeFileCodeFileConfigNotebookSessionInfo
    Notebook kernel session information.
    params str
    Advanced runtime parameters, variable substitution, map-json String,String.
    notebookSessionInfo Property Map
    Notebook kernel session information.
    params String
    Advanced runtime parameters, variable substitution, map-json String,String.

    WedataCodeFileCodeFileConfigNotebookSessionInfo, WedataCodeFileCodeFileConfigNotebookSessionInfoArgs

    NotebookSessionId string
    Session ID.
    NotebookSessionName string
    Session name.
    NotebookSessionId string
    Session ID.
    NotebookSessionName string
    Session name.
    notebookSessionId String
    Session ID.
    notebookSessionName String
    Session name.
    notebookSessionId string
    Session ID.
    notebookSessionName string
    Session name.
    notebook_session_id str
    Session ID.
    notebook_session_name str
    Session name.
    notebookSessionId String
    Session ID.
    notebookSessionName String
    Session name.

    Import

    WeData code file can be imported using the projectId#codeFileId, e.g.

    $ pulumi import tencentcloud:index/wedataCodeFile:WedataCodeFile example 1470547050521227264#2bfa8813-344f-4858-a2cc-7a07bd10ac1d
    

    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.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate