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

tencentcloud.WedataSqlScript

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

    Provides a resource to create a WeData sql script

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.WedataSqlFolder("example", {
        folderName: "tf_example",
        projectId: "2983848457986924544",
        parentFolderPath: "/",
        accessScope: "SHARED",
    });
    const exampleWedataSqlScript = new tencentcloud.WedataSqlScript("example", {
        scriptName: "tf_example_script",
        projectId: "2983848457986924544",
        parentFolderPath: example.path,
        scriptConfig: {
            datasourceId: "108826",
            computeResource: "svmgao_stability",
        },
        scriptContent: "SHOW DATABASES;",
        accessScope: "SHARED",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.WedataSqlFolder("example",
        folder_name="tf_example",
        project_id="2983848457986924544",
        parent_folder_path="/",
        access_scope="SHARED")
    example_wedata_sql_script = tencentcloud.WedataSqlScript("example",
        script_name="tf_example_script",
        project_id="2983848457986924544",
        parent_folder_path=example.path,
        script_config={
            "datasource_id": "108826",
            "compute_resource": "svmgao_stability",
        },
        script_content="SHOW DATABASES;",
        access_scope="SHARED")
    
    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.NewWedataSqlFolder(ctx, "example", &tencentcloud.WedataSqlFolderArgs{
    			FolderName:       pulumi.String("tf_example"),
    			ProjectId:        pulumi.String("2983848457986924544"),
    			ParentFolderPath: pulumi.String("/"),
    			AccessScope:      pulumi.String("SHARED"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewWedataSqlScript(ctx, "example", &tencentcloud.WedataSqlScriptArgs{
    			ScriptName:       pulumi.String("tf_example_script"),
    			ProjectId:        pulumi.String("2983848457986924544"),
    			ParentFolderPath: example.Path,
    			ScriptConfig: &tencentcloud.WedataSqlScriptScriptConfigArgs{
    				DatasourceId:    pulumi.String("108826"),
    				ComputeResource: pulumi.String("svmgao_stability"),
    			},
    			ScriptContent: pulumi.String("SHOW DATABASES;"),
    			AccessScope:   pulumi.String("SHARED"),
    		})
    		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.WedataSqlFolder("example", new()
        {
            FolderName = "tf_example",
            ProjectId = "2983848457986924544",
            ParentFolderPath = "/",
            AccessScope = "SHARED",
        });
    
        var exampleWedataSqlScript = new Tencentcloud.WedataSqlScript("example", new()
        {
            ScriptName = "tf_example_script",
            ProjectId = "2983848457986924544",
            ParentFolderPath = example.Path,
            ScriptConfig = new Tencentcloud.Inputs.WedataSqlScriptScriptConfigArgs
            {
                DatasourceId = "108826",
                ComputeResource = "svmgao_stability",
            },
            ScriptContent = "SHOW DATABASES;",
            AccessScope = "SHARED",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.WedataSqlFolder;
    import com.pulumi.tencentcloud.WedataSqlFolderArgs;
    import com.pulumi.tencentcloud.WedataSqlScript;
    import com.pulumi.tencentcloud.WedataSqlScriptArgs;
    import com.pulumi.tencentcloud.inputs.WedataSqlScriptScriptConfigArgs;
    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 WedataSqlFolder("example", WedataSqlFolderArgs.builder()
                .folderName("tf_example")
                .projectId("2983848457986924544")
                .parentFolderPath("/")
                .accessScope("SHARED")
                .build());
    
            var exampleWedataSqlScript = new WedataSqlScript("exampleWedataSqlScript", WedataSqlScriptArgs.builder()
                .scriptName("tf_example_script")
                .projectId("2983848457986924544")
                .parentFolderPath(example.path())
                .scriptConfig(WedataSqlScriptScriptConfigArgs.builder()
                    .datasourceId("108826")
                    .computeResource("svmgao_stability")
                    .build())
                .scriptContent("SHOW DATABASES;")
                .accessScope("SHARED")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:WedataSqlFolder
        properties:
          folderName: tf_example
          projectId: '2983848457986924544'
          parentFolderPath: /
          accessScope: SHARED
      exampleWedataSqlScript:
        type: tencentcloud:WedataSqlScript
        name: example
        properties:
          scriptName: tf_example_script
          projectId: '2983848457986924544'
          parentFolderPath: ${example.path}
          scriptConfig:
            datasourceId: '108826'
            computeResource: svmgao_stability
          scriptContent: SHOW DATABASES;
          accessScope: SHARED
    

    Create WedataSqlScript Resource

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

    Constructor syntax

    new WedataSqlScript(name: string, args: WedataSqlScriptArgs, opts?: CustomResourceOptions);
    @overload
    def WedataSqlScript(resource_name: str,
                        args: WedataSqlScriptArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def WedataSqlScript(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        project_id: Optional[str] = None,
                        script_name: Optional[str] = None,
                        access_scope: Optional[str] = None,
                        parent_folder_path: Optional[str] = None,
                        script_config: Optional[WedataSqlScriptScriptConfigArgs] = None,
                        script_content: Optional[str] = None,
                        wedata_sql_script_id: Optional[str] = None)
    func NewWedataSqlScript(ctx *Context, name string, args WedataSqlScriptArgs, opts ...ResourceOption) (*WedataSqlScript, error)
    public WedataSqlScript(string name, WedataSqlScriptArgs args, CustomResourceOptions? opts = null)
    public WedataSqlScript(String name, WedataSqlScriptArgs args)
    public WedataSqlScript(String name, WedataSqlScriptArgs args, CustomResourceOptions options)
    
    type: tencentcloud:WedataSqlScript
    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 WedataSqlScriptArgs
    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 WedataSqlScriptArgs
    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 WedataSqlScriptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WedataSqlScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WedataSqlScriptArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ProjectId string
    Project ID.
    ScriptName string
    Script name.
    AccessScope string
    Permission scope: SHARED, PRIVATE.
    ParentFolderPath string
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    ScriptConfig WedataSqlScriptScriptConfig
    Data exploration script configuration.
    ScriptContent string
    Script content, if there is a value.
    WedataSqlScriptId string
    ID of the resource.
    ProjectId string
    Project ID.
    ScriptName string
    Script name.
    AccessScope string
    Permission scope: SHARED, PRIVATE.
    ParentFolderPath string
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    ScriptConfig WedataSqlScriptScriptConfigArgs
    Data exploration script configuration.
    ScriptContent string
    Script content, if there is a value.
    WedataSqlScriptId string
    ID of the resource.
    projectId String
    Project ID.
    scriptName String
    Script name.
    accessScope String
    Permission scope: SHARED, PRIVATE.
    parentFolderPath String
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    scriptConfig WedataSqlScriptScriptConfig
    Data exploration script configuration.
    scriptContent String
    Script content, if there is a value.
    wedataSqlScriptId String
    ID of the resource.
    projectId string
    Project ID.
    scriptName string
    Script name.
    accessScope string
    Permission scope: SHARED, PRIVATE.
    parentFolderPath string
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    scriptConfig WedataSqlScriptScriptConfig
    Data exploration script configuration.
    scriptContent string
    Script content, if there is a value.
    wedataSqlScriptId string
    ID of the resource.
    project_id str
    Project ID.
    script_name str
    Script name.
    access_scope str
    Permission scope: SHARED, PRIVATE.
    parent_folder_path str
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    script_config WedataSqlScriptScriptConfigArgs
    Data exploration script configuration.
    script_content str
    Script content, if there is a value.
    wedata_sql_script_id str
    ID of the resource.
    projectId String
    Project ID.
    scriptName String
    Script name.
    accessScope String
    Permission scope: SHARED, PRIVATE.
    parentFolderPath String
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    scriptConfig Property Map
    Data exploration script configuration.
    scriptContent String
    Script content, if there is a value.
    wedataSqlScriptId String
    ID of the resource.

    Outputs

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

    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.
    ScriptId string
    Script 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.
    ScriptId string
    Script 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.
    scriptId String
    Script 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.
    scriptId string
    Script 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.
    script_id str
    Script 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.
    scriptId String
    Script ID.

    Look up Existing WedataSqlScript Resource

    Get an existing WedataSqlScript 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?: WedataSqlScriptState, opts?: CustomResourceOptions): WedataSqlScript
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_scope: Optional[str] = None,
            parent_folder_path: Optional[str] = None,
            path: Optional[str] = None,
            project_id: Optional[str] = None,
            script_config: Optional[WedataSqlScriptScriptConfigArgs] = None,
            script_content: Optional[str] = None,
            script_id: Optional[str] = None,
            script_name: Optional[str] = None,
            wedata_sql_script_id: Optional[str] = None) -> WedataSqlScript
    func GetWedataSqlScript(ctx *Context, name string, id IDInput, state *WedataSqlScriptState, opts ...ResourceOption) (*WedataSqlScript, error)
    public static WedataSqlScript Get(string name, Input<string> id, WedataSqlScriptState? state, CustomResourceOptions? opts = null)
    public static WedataSqlScript get(String name, Output<String> id, WedataSqlScriptState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:WedataSqlScript    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 scope: SHARED, PRIVATE.
    ParentFolderPath string
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    Path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    ProjectId string
    Project ID.
    ScriptConfig WedataSqlScriptScriptConfig
    Data exploration script configuration.
    ScriptContent string
    Script content, if there is a value.
    ScriptId string
    Script ID.
    ScriptName string
    Script name.
    WedataSqlScriptId string
    ID of the resource.
    AccessScope string
    Permission scope: SHARED, PRIVATE.
    ParentFolderPath string
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    Path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    ProjectId string
    Project ID.
    ScriptConfig WedataSqlScriptScriptConfigArgs
    Data exploration script configuration.
    ScriptContent string
    Script content, if there is a value.
    ScriptId string
    Script ID.
    ScriptName string
    Script name.
    WedataSqlScriptId string
    ID of the resource.
    accessScope String
    Permission scope: SHARED, PRIVATE.
    parentFolderPath String
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    path String
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    projectId String
    Project ID.
    scriptConfig WedataSqlScriptScriptConfig
    Data exploration script configuration.
    scriptContent String
    Script content, if there is a value.
    scriptId String
    Script ID.
    scriptName String
    Script name.
    wedataSqlScriptId String
    ID of the resource.
    accessScope string
    Permission scope: SHARED, PRIVATE.
    parentFolderPath string
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    path string
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    projectId string
    Project ID.
    scriptConfig WedataSqlScriptScriptConfig
    Data exploration script configuration.
    scriptContent string
    Script content, if there is a value.
    scriptId string
    Script ID.
    scriptName string
    Script name.
    wedataSqlScriptId string
    ID of the resource.
    access_scope str
    Permission scope: SHARED, PRIVATE.
    parent_folder_path str
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    path str
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    project_id str
    Project ID.
    script_config WedataSqlScriptScriptConfigArgs
    Data exploration script configuration.
    script_content str
    Script content, if there is a value.
    script_id str
    Script ID.
    script_name str
    Script name.
    wedata_sql_script_id str
    ID of the resource.
    accessScope String
    Permission scope: SHARED, PRIVATE.
    parentFolderPath String
    Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
    path String
    The full path of the node, /aaa/bbb/ccc.ipynb, consists of the names of each node.
    projectId String
    Project ID.
    scriptConfig Property Map
    Data exploration script configuration.
    scriptContent String
    Script content, if there is a value.
    scriptId String
    Script ID.
    scriptName String
    Script name.
    wedataSqlScriptId String
    ID of the resource.

    Supporting Types

    WedataSqlScriptScriptConfig, WedataSqlScriptScriptConfigArgs

    AdvanceConfig string
    Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
    ComputeResource string
    Computing resource.
    DatasourceEnv string
    Data source environment.
    DatasourceId string
    Data source ID.
    ExecutorGroupId string
    Execution resource group.
    Params string
    Advanced runtime parameters, variable substitution, map-json String,String.
    AdvanceConfig string
    Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
    ComputeResource string
    Computing resource.
    DatasourceEnv string
    Data source environment.
    DatasourceId string
    Data source ID.
    ExecutorGroupId string
    Execution resource group.
    Params string
    Advanced runtime parameters, variable substitution, map-json String,String.
    advanceConfig String
    Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
    computeResource String
    Computing resource.
    datasourceEnv String
    Data source environment.
    datasourceId String
    Data source ID.
    executorGroupId String
    Execution resource group.
    params String
    Advanced runtime parameters, variable substitution, map-json String,String.
    advanceConfig string
    Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
    computeResource string
    Computing resource.
    datasourceEnv string
    Data source environment.
    datasourceId string
    Data source ID.
    executorGroupId string
    Execution resource group.
    params string
    Advanced runtime parameters, variable substitution, map-json String,String.
    advance_config str
    Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
    compute_resource str
    Computing resource.
    datasource_env str
    Data source environment.
    datasource_id str
    Data source ID.
    executor_group_id str
    Execution resource group.
    params str
    Advanced runtime parameters, variable substitution, map-json String,String.
    advanceConfig String
    Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
    computeResource String
    Computing resource.
    datasourceEnv String
    Data source environment.
    datasourceId String
    Data source ID.
    executorGroupId String
    Execution resource group.
    params String
    Advanced runtime parameters, variable substitution, map-json String,String.

    Import

    WeData sql script can be imported using the projectId#scriptId, e.g.

    $ pulumi import tencentcloud:index/wedataSqlScript:WedataSqlScript example 2983848457986924544#cccc3170-6334-46c3-adce-c5776ad2280c
    

    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