1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. WedataDatasource
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.WedataDatasource

Explore with Pulumi AI

Provides a resource to create a wedata datasource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const example = new tencentcloud.WedataDatasource("example", {
    category: "DB",
    type: "MYSQL",
    ownerProjectId: "1612982498218618880",
    ownerProjectName: "project_demo",
    ownerProjectIdent: "体验项目",
    description: "description.",
    display: "tf_example_demo",
    status: 1,
    cosBucket: "wedata-agent-sh-1257305158",
    cosRegion: "ap-shanghai",
    params: JSON.stringify({
        connectType: "public",
        authorityType: "true",
        deployType: "CONNSTR_PUBLICDB",
        url: "jdbc:mysql://1.1.1.1:8080/database",
        username: "root",
        password: "password",
        type: "MYSQL",
    }),
});
Copy
import pulumi
import json
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.WedataDatasource("example",
    category="DB",
    type="MYSQL",
    owner_project_id="1612982498218618880",
    owner_project_name="project_demo",
    owner_project_ident="体验项目",
    description="description.",
    display="tf_example_demo",
    status=1,
    cos_bucket="wedata-agent-sh-1257305158",
    cos_region="ap-shanghai",
    params=json.dumps({
        "connectType": "public",
        "authorityType": "true",
        "deployType": "CONNSTR_PUBLICDB",
        "url": "jdbc:mysql://1.1.1.1:8080/database",
        "username": "root",
        "password": "password",
        "type": "MYSQL",
    }))
Copy
package main

import (
	"encoding/json"

	"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 {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"connectType":   "public",
			"authorityType": "true",
			"deployType":    "CONNSTR_PUBLICDB",
			"url":           "jdbc:mysql://1.1.1.1:8080/database",
			"username":      "root",
			"password":      "password",
			"type":          "MYSQL",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = tencentcloud.NewWedataDatasource(ctx, "example", &tencentcloud.WedataDatasourceArgs{
			Category:          pulumi.String("DB"),
			Type:              pulumi.String("MYSQL"),
			OwnerProjectId:    pulumi.String("1612982498218618880"),
			OwnerProjectName:  pulumi.String("project_demo"),
			OwnerProjectIdent: pulumi.String("体验项目"),
			Description:       pulumi.String("description."),
			Display:           pulumi.String("tf_example_demo"),
			Status:            pulumi.Float64(1),
			CosBucket:         pulumi.String("wedata-agent-sh-1257305158"),
			CosRegion:         pulumi.String("ap-shanghai"),
			Params:            pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.WedataDatasource("example", new()
    {
        Category = "DB",
        Type = "MYSQL",
        OwnerProjectId = "1612982498218618880",
        OwnerProjectName = "project_demo",
        OwnerProjectIdent = "体验项目",
        Description = "description.",
        Display = "tf_example_demo",
        Status = 1,
        CosBucket = "wedata-agent-sh-1257305158",
        CosRegion = "ap-shanghai",
        Params = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["connectType"] = "public",
            ["authorityType"] = "true",
            ["deployType"] = "CONNSTR_PUBLICDB",
            ["url"] = "jdbc:mysql://1.1.1.1:8080/database",
            ["username"] = "root",
            ["password"] = "password",
            ["type"] = "MYSQL",
        }),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.WedataDatasource;
import com.pulumi.tencentcloud.WedataDatasourceArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 WedataDatasource("example", WedataDatasourceArgs.builder()
            .category("DB")
            .type("MYSQL")
            .ownerProjectId("1612982498218618880")
            .ownerProjectName("project_demo")
            .ownerProjectIdent("体验项目")
            .description("description.")
            .display("tf_example_demo")
            .status(1)
            .cosBucket("wedata-agent-sh-1257305158")
            .cosRegion("ap-shanghai")
            .params(serializeJson(
                jsonObject(
                    jsonProperty("connectType", "public"),
                    jsonProperty("authorityType", "true"),
                    jsonProperty("deployType", "CONNSTR_PUBLICDB"),
                    jsonProperty("url", "jdbc:mysql://1.1.1.1:8080/database"),
                    jsonProperty("username", "root"),
                    jsonProperty("password", "password"),
                    jsonProperty("type", "MYSQL")
                )))
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:WedataDatasource
    properties:
      category: DB
      type: MYSQL
      ownerProjectId: '1612982498218618880'
      ownerProjectName: project_demo
      ownerProjectIdent: 体验项目
      description: description.
      display: tf_example_demo
      status: 1
      cosBucket: wedata-agent-sh-1257305158
      cosRegion: ap-shanghai
      params:
        fn::toJSON:
          connectType: public
          authorityType: 'true'
          deployType: CONNSTR_PUBLICDB
          url: jdbc:mysql://1.1.1.1:8080/database
          username: root
          password: password
          type: MYSQL
Copy

Create WedataDatasource Resource

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

Constructor syntax

new WedataDatasource(name: string, args: WedataDatasourceArgs, opts?: CustomResourceOptions);
@overload
def WedataDatasource(resource_name: str,
                     args: WedataDatasourceArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def WedataDatasource(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     owner_project_id: Optional[str] = None,
                     category: Optional[str] = None,
                     type: Optional[str] = None,
                     params: Optional[str] = None,
                     owner_project_name: Optional[str] = None,
                     owner_project_ident: Optional[str] = None,
                     cos_bucket: Optional[str] = None,
                     description: Optional[str] = None,
                     display: Optional[str] = None,
                     instance: Optional[str] = None,
                     name: Optional[str] = None,
                     database_name: Optional[str] = None,
                     cos_region: Optional[str] = None,
                     biz_params: Optional[str] = None,
                     collect: Optional[str] = None,
                     status: Optional[float] = None,
                     cluster_id: Optional[str] = None,
                     wedata_datasource_id: Optional[str] = None)
func NewWedataDatasource(ctx *Context, name string, args WedataDatasourceArgs, opts ...ResourceOption) (*WedataDatasource, error)
public WedataDatasource(string name, WedataDatasourceArgs args, CustomResourceOptions? opts = null)
public WedataDatasource(String name, WedataDatasourceArgs args)
public WedataDatasource(String name, WedataDatasourceArgs args, CustomResourceOptions options)
type: tencentcloud:WedataDatasource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WedataDatasourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WedataDatasourceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WedataDatasourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WedataDatasourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WedataDatasourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Category This property is required. string
DataSource Category.
OwnerProjectId This property is required. string
Owner projectId.
OwnerProjectIdent This property is required. string
Owner Project Ident.
OwnerProjectName This property is required. string
Owner project name.
Params This property is required. string
Params.
Type This property is required. string
DataSource Type.
BizParams string
BizParams.
ClusterId string
ClusterId.
Collect string
Collect.
CosBucket string
COSBucket.
CosRegion string
Cos region.
DatabaseName string
Dbname.
Description string
Description.
Display string
Display.
Instance string
Instance.
Name string
DataSource Name.
Status double
Status.
WedataDatasourceId string
ID of the resource.
Category This property is required. string
DataSource Category.
OwnerProjectId This property is required. string
Owner projectId.
OwnerProjectIdent This property is required. string
Owner Project Ident.
OwnerProjectName This property is required. string
Owner project name.
Params This property is required. string
Params.
Type This property is required. string
DataSource Type.
BizParams string
BizParams.
ClusterId string
ClusterId.
Collect string
Collect.
CosBucket string
COSBucket.
CosRegion string
Cos region.
DatabaseName string
Dbname.
Description string
Description.
Display string
Display.
Instance string
Instance.
Name string
DataSource Name.
Status float64
Status.
WedataDatasourceId string
ID of the resource.
category This property is required. String
DataSource Category.
ownerProjectId This property is required. String
Owner projectId.
ownerProjectIdent This property is required. String
Owner Project Ident.
ownerProjectName This property is required. String
Owner project name.
params This property is required. String
Params.
type This property is required. String
DataSource Type.
bizParams String
BizParams.
clusterId String
ClusterId.
collect String
Collect.
cosBucket String
COSBucket.
cosRegion String
Cos region.
databaseName String
Dbname.
description String
Description.
display String
Display.
instance String
Instance.
name String
DataSource Name.
status Double
Status.
wedataDatasourceId String
ID of the resource.
category This property is required. string
DataSource Category.
ownerProjectId This property is required. string
Owner projectId.
ownerProjectIdent This property is required. string
Owner Project Ident.
ownerProjectName This property is required. string
Owner project name.
params This property is required. string
Params.
type This property is required. string
DataSource Type.
bizParams string
BizParams.
clusterId string
ClusterId.
collect string
Collect.
cosBucket string
COSBucket.
cosRegion string
Cos region.
databaseName string
Dbname.
description string
Description.
display string
Display.
instance string
Instance.
name string
DataSource Name.
status number
Status.
wedataDatasourceId string
ID of the resource.
category This property is required. str
DataSource Category.
owner_project_id This property is required. str
Owner projectId.
owner_project_ident This property is required. str
Owner Project Ident.
owner_project_name This property is required. str
Owner project name.
params This property is required. str
Params.
type This property is required. str
DataSource Type.
biz_params str
BizParams.
cluster_id str
ClusterId.
collect str
Collect.
cos_bucket str
COSBucket.
cos_region str
Cos region.
database_name str
Dbname.
description str
Description.
display str
Display.
instance str
Instance.
name str
DataSource Name.
status float
Status.
wedata_datasource_id str
ID of the resource.
category This property is required. String
DataSource Category.
ownerProjectId This property is required. String
Owner projectId.
ownerProjectIdent This property is required. String
Owner Project Ident.
ownerProjectName This property is required. String
Owner project name.
params This property is required. String
Params.
type This property is required. String
DataSource Type.
bizParams String
BizParams.
clusterId String
ClusterId.
collect String
Collect.
cosBucket String
COSBucket.
cosRegion String
Cos region.
databaseName String
Dbname.
description String
Description.
display String
Display.
instance String
Instance.
name String
DataSource Name.
status Number
Status.
wedataDatasourceId String
ID of the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
ParamsOut string
Params Out.
Id string
The provider-assigned unique ID for this managed resource.
ParamsOut string
Params Out.
id String
The provider-assigned unique ID for this managed resource.
paramsOut String
Params Out.
id string
The provider-assigned unique ID for this managed resource.
paramsOut string
Params Out.
id str
The provider-assigned unique ID for this managed resource.
params_out str
Params Out.
id String
The provider-assigned unique ID for this managed resource.
paramsOut String
Params Out.

Look up Existing WedataDatasource Resource

Get an existing WedataDatasource 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?: WedataDatasourceState, opts?: CustomResourceOptions): WedataDatasource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        biz_params: Optional[str] = None,
        category: Optional[str] = None,
        cluster_id: Optional[str] = None,
        collect: Optional[str] = None,
        cos_bucket: Optional[str] = None,
        cos_region: Optional[str] = None,
        database_name: Optional[str] = None,
        description: Optional[str] = None,
        display: Optional[str] = None,
        instance: Optional[str] = None,
        name: Optional[str] = None,
        owner_project_id: Optional[str] = None,
        owner_project_ident: Optional[str] = None,
        owner_project_name: Optional[str] = None,
        params: Optional[str] = None,
        params_out: Optional[str] = None,
        status: Optional[float] = None,
        type: Optional[str] = None,
        wedata_datasource_id: Optional[str] = None) -> WedataDatasource
func GetWedataDatasource(ctx *Context, name string, id IDInput, state *WedataDatasourceState, opts ...ResourceOption) (*WedataDatasource, error)
public static WedataDatasource Get(string name, Input<string> id, WedataDatasourceState? state, CustomResourceOptions? opts = null)
public static WedataDatasource get(String name, Output<String> id, WedataDatasourceState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:WedataDatasource    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
BizParams string
BizParams.
Category string
DataSource Category.
ClusterId string
ClusterId.
Collect string
Collect.
CosBucket string
COSBucket.
CosRegion string
Cos region.
DatabaseName string
Dbname.
Description string
Description.
Display string
Display.
Instance string
Instance.
Name string
DataSource Name.
OwnerProjectId string
Owner projectId.
OwnerProjectIdent string
Owner Project Ident.
OwnerProjectName string
Owner project name.
Params string
Params.
ParamsOut string
Params Out.
Status double
Status.
Type string
DataSource Type.
WedataDatasourceId string
ID of the resource.
BizParams string
BizParams.
Category string
DataSource Category.
ClusterId string
ClusterId.
Collect string
Collect.
CosBucket string
COSBucket.
CosRegion string
Cos region.
DatabaseName string
Dbname.
Description string
Description.
Display string
Display.
Instance string
Instance.
Name string
DataSource Name.
OwnerProjectId string
Owner projectId.
OwnerProjectIdent string
Owner Project Ident.
OwnerProjectName string
Owner project name.
Params string
Params.
ParamsOut string
Params Out.
Status float64
Status.
Type string
DataSource Type.
WedataDatasourceId string
ID of the resource.
bizParams String
BizParams.
category String
DataSource Category.
clusterId String
ClusterId.
collect String
Collect.
cosBucket String
COSBucket.
cosRegion String
Cos region.
databaseName String
Dbname.
description String
Description.
display String
Display.
instance String
Instance.
name String
DataSource Name.
ownerProjectId String
Owner projectId.
ownerProjectIdent String
Owner Project Ident.
ownerProjectName String
Owner project name.
params String
Params.
paramsOut String
Params Out.
status Double
Status.
type String
DataSource Type.
wedataDatasourceId String
ID of the resource.
bizParams string
BizParams.
category string
DataSource Category.
clusterId string
ClusterId.
collect string
Collect.
cosBucket string
COSBucket.
cosRegion string
Cos region.
databaseName string
Dbname.
description string
Description.
display string
Display.
instance string
Instance.
name string
DataSource Name.
ownerProjectId string
Owner projectId.
ownerProjectIdent string
Owner Project Ident.
ownerProjectName string
Owner project name.
params string
Params.
paramsOut string
Params Out.
status number
Status.
type string
DataSource Type.
wedataDatasourceId string
ID of the resource.
biz_params str
BizParams.
category str
DataSource Category.
cluster_id str
ClusterId.
collect str
Collect.
cos_bucket str
COSBucket.
cos_region str
Cos region.
database_name str
Dbname.
description str
Description.
display str
Display.
instance str
Instance.
name str
DataSource Name.
owner_project_id str
Owner projectId.
owner_project_ident str
Owner Project Ident.
owner_project_name str
Owner project name.
params str
Params.
params_out str
Params Out.
status float
Status.
type str
DataSource Type.
wedata_datasource_id str
ID of the resource.
bizParams String
BizParams.
category String
DataSource Category.
clusterId String
ClusterId.
collect String
Collect.
cosBucket String
COSBucket.
cosRegion String
Cos region.
databaseName String
Dbname.
description String
Description.
display String
Display.
instance String
Instance.
name String
DataSource Name.
ownerProjectId String
Owner projectId.
ownerProjectIdent String
Owner Project Ident.
ownerProjectName String
Owner project name.
params String
Params.
paramsOut String
Params Out.
status Number
Status.
type String
DataSource Type.
wedataDatasourceId String
ID of the resource.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.