tencentcloud.WedataSqlScript
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:
- Project
Id string - Project ID.
- Script
Name string - Script name.
- Access
Scope string - Permission scope: SHARED, PRIVATE.
- Parent
Folder stringPath - Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
- Script
Config WedataSql Script Script Config - Data exploration script configuration.
- Script
Content string - Script content, if there is a value.
- Wedata
Sql stringScript Id - ID of the resource.
- Project
Id string - Project ID.
- Script
Name string - Script name.
- Access
Scope string - Permission scope: SHARED, PRIVATE.
- Parent
Folder stringPath - Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
- Script
Config WedataSql Script Script Config Args - Data exploration script configuration.
- Script
Content string - Script content, if there is a value.
- Wedata
Sql stringScript Id - ID of the resource.
- project
Id String - Project ID.
- script
Name String - Script name.
- access
Scope String - Permission scope: SHARED, PRIVATE.
- parent
Folder StringPath - Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
- script
Config WedataSql Script Script Config - Data exploration script configuration.
- script
Content String - Script content, if there is a value.
- wedata
Sql StringScript Id - ID of the resource.
- project
Id string - Project ID.
- script
Name string - Script name.
- access
Scope string - Permission scope: SHARED, PRIVATE.
- parent
Folder stringPath - Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
- script
Config WedataSql Script Script Config - Data exploration script configuration.
- script
Content string - Script content, if there is a value.
- wedata
Sql stringScript Id - ID of the resource.
- project_
id str - Project ID.
- script_
name str - Script name.
- access_
scope str - Permission scope: SHARED, PRIVATE.
- parent_
folder_ strpath - Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
- script_
config WedataSql Script Script Config Args - Data exploration script configuration.
- script_
content str - Script content, if there is a value.
- wedata_
sql_ strscript_ id - ID of the resource.
- project
Id String - Project ID.
- script
Name String - Script name.
- access
Scope String - Permission scope: SHARED, PRIVATE.
- parent
Folder StringPath - Parent folder path, /aaa/bbb/ccc, root directory is empty string or /.
- script
Config Property Map - Data exploration script configuration.
- script
Content String - Script content, if there is a value.
- wedata
Sql StringScript Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the WedataSqlScript resource produces the following output properties:
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) -> WedataSqlScriptfunc 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.
- Access
Scope string - Permission scope: SHARED, PRIVATE.
- Parent
Folder stringPath - 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.
- Project
Id string - Project ID.
- Script
Config WedataSql Script Script Config - Data exploration script configuration.
- Script
Content string - Script content, if there is a value.
- Script
Id string - Script ID.
- Script
Name string - Script name.
- Wedata
Sql stringScript Id - ID of the resource.
- Access
Scope string - Permission scope: SHARED, PRIVATE.
- Parent
Folder stringPath - 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.
- Project
Id string - Project ID.
- Script
Config WedataSql Script Script Config Args - Data exploration script configuration.
- Script
Content string - Script content, if there is a value.
- Script
Id string - Script ID.
- Script
Name string - Script name.
- Wedata
Sql stringScript Id - ID of the resource.
- access
Scope String - Permission scope: SHARED, PRIVATE.
- parent
Folder StringPath - 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.
- project
Id String - Project ID.
- script
Config WedataSql Script Script Config - Data exploration script configuration.
- script
Content String - Script content, if there is a value.
- script
Id String - Script ID.
- script
Name String - Script name.
- wedata
Sql StringScript Id - ID of the resource.
- access
Scope string - Permission scope: SHARED, PRIVATE.
- parent
Folder stringPath - 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.
- project
Id string - Project ID.
- script
Config WedataSql Script Script Config - Data exploration script configuration.
- script
Content string - Script content, if there is a value.
- script
Id string - Script ID.
- script
Name string - Script name.
- wedata
Sql stringScript Id - ID of the resource.
- access_
scope str - Permission scope: SHARED, PRIVATE.
- parent_
folder_ strpath - 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 WedataSql Script Script Config Args - 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_ strscript_ id - ID of the resource.
- access
Scope String - Permission scope: SHARED, PRIVATE.
- parent
Folder StringPath - 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.
- project
Id String - Project ID.
- script
Config Property Map - Data exploration script configuration.
- script
Content String - Script content, if there is a value.
- script
Id String - Script ID.
- script
Name String - Script name.
- wedata
Sql StringScript Id - ID of the resource.
Supporting Types
WedataSqlScriptScriptConfig, WedataSqlScriptScriptConfigArgs
- Advance
Config string - Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
- Compute
Resource string - Computing resource.
- Datasource
Env string - Data source environment.
- Datasource
Id string - Data source ID.
- Executor
Group stringId - Execution resource group.
- Params string
- Advanced runtime parameters, variable substitution, map-json String,String.
- Advance
Config string - Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
- Compute
Resource string - Computing resource.
- Datasource
Env string - Data source environment.
- Datasource
Id string - Data source ID.
- Executor
Group stringId - Execution resource group.
- Params string
- Advanced runtime parameters, variable substitution, map-json String,String.
- advance
Config String - Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
- compute
Resource String - Computing resource.
- datasource
Env String - Data source environment.
- datasource
Id String - Data source ID.
- executor
Group StringId - Execution resource group.
- params String
- Advanced runtime parameters, variable substitution, map-json String,String.
- advance
Config string - Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
- compute
Resource string - Computing resource.
- datasource
Env string - Data source environment.
- datasource
Id string - Data source ID.
- executor
Group stringId - 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_ strid - Execution resource group.
- params str
- Advanced runtime parameters, variable substitution, map-json String,String.
- advance
Config String - Advanced settings, execution configuration parameters, map-json String,String. Encoded in Base64.
- compute
Resource String - Computing resource.
- datasource
Env String - Data source environment.
- datasource
Id String - Data source ID.
- executor
Group StringId - 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
tencentcloudTerraform Provider.
