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",
}),
});
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",
}))
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
})
}
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",
}),
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args WedataDatasourceArgs
- 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 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 string
- The unique name of the resource.
- args WedataDatasourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WedataDatasourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 string
- DataSource Category.
- Owner
Project stringId - Owner projectId.
- Owner
Project stringIdent - Owner Project Ident.
- Owner
Project stringName - Owner project name.
- Params string
- Params.
- Type string
- DataSource Type.
- Biz
Params string - BizParams.
- Cluster
Id string - ClusterId.
- Collect string
- Collect.
- Cos
Bucket string - COSBucket.
- Cos
Region string - Cos region.
- Database
Name string - Dbname.
- Description string
- Description.
- Display string
- Display.
- Instance string
- Instance.
- Name string
- DataSource Name.
- Status double
- Status.
- Wedata
Datasource stringId - ID of the resource.
- Category string
- DataSource Category.
- Owner
Project stringId - Owner projectId.
- Owner
Project stringIdent - Owner Project Ident.
- Owner
Project stringName - Owner project name.
- Params string
- Params.
- Type string
- DataSource Type.
- Biz
Params string - BizParams.
- Cluster
Id string - ClusterId.
- Collect string
- Collect.
- Cos
Bucket string - COSBucket.
- Cos
Region string - Cos region.
- Database
Name string - Dbname.
- Description string
- Description.
- Display string
- Display.
- Instance string
- Instance.
- Name string
- DataSource Name.
- Status float64
- Status.
- Wedata
Datasource stringId - ID of the resource.
- category String
- DataSource Category.
- owner
Project StringId - Owner projectId.
- owner
Project StringIdent - Owner Project Ident.
- owner
Project StringName - Owner project name.
- params String
- Params.
- type String
- DataSource Type.
- biz
Params String - BizParams.
- cluster
Id String - ClusterId.
- collect String
- Collect.
- cos
Bucket String - COSBucket.
- cos
Region String - Cos region.
- database
Name String - Dbname.
- description String
- Description.
- display String
- Display.
- instance String
- Instance.
- name String
- DataSource Name.
- status Double
- Status.
- wedata
Datasource StringId - ID of the resource.
- category string
- DataSource Category.
- owner
Project stringId - Owner projectId.
- owner
Project stringIdent - Owner Project Ident.
- owner
Project stringName - Owner project name.
- params string
- Params.
- type string
- DataSource Type.
- biz
Params string - BizParams.
- cluster
Id string - ClusterId.
- collect string
- Collect.
- cos
Bucket string - COSBucket.
- cos
Region string - Cos region.
- database
Name string - Dbname.
- description string
- Description.
- display string
- Display.
- instance string
- Instance.
- name string
- DataSource Name.
- status number
- Status.
- wedata
Datasource stringId - ID of the resource.
- category str
- DataSource Category.
- owner_
project_ strid - Owner projectId.
- owner_
project_ strident - Owner Project Ident.
- owner_
project_ strname - Owner project name.
- params str
- Params.
- type 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_ strid - ID of the resource.
- category String
- DataSource Category.
- owner
Project StringId - Owner projectId.
- owner
Project StringIdent - Owner Project Ident.
- owner
Project StringName - Owner project name.
- params String
- Params.
- type String
- DataSource Type.
- biz
Params String - BizParams.
- cluster
Id String - ClusterId.
- collect String
- Collect.
- cos
Bucket String - COSBucket.
- cos
Region String - Cos region.
- database
Name String - Dbname.
- description String
- Description.
- display String
- Display.
- instance String
- Instance.
- name String
- DataSource Name.
- status Number
- Status.
- wedata
Datasource StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the WedataDatasource resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- params_
out str - 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
- 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.
- Biz
Params string - BizParams.
- Category string
- DataSource Category.
- Cluster
Id string - ClusterId.
- Collect string
- Collect.
- Cos
Bucket string - COSBucket.
- Cos
Region string - Cos region.
- Database
Name string - Dbname.
- Description string
- Description.
- Display string
- Display.
- Instance string
- Instance.
- Name string
- DataSource Name.
- Owner
Project stringId - Owner projectId.
- Owner
Project stringIdent - Owner Project Ident.
- Owner
Project stringName - Owner project name.
- Params string
- Params.
- Params
Out string - Params Out.
- Status double
- Status.
- Type string
- DataSource Type.
- Wedata
Datasource stringId - ID of the resource.
- Biz
Params string - BizParams.
- Category string
- DataSource Category.
- Cluster
Id string - ClusterId.
- Collect string
- Collect.
- Cos
Bucket string - COSBucket.
- Cos
Region string - Cos region.
- Database
Name string - Dbname.
- Description string
- Description.
- Display string
- Display.
- Instance string
- Instance.
- Name string
- DataSource Name.
- Owner
Project stringId - Owner projectId.
- Owner
Project stringIdent - Owner Project Ident.
- Owner
Project stringName - Owner project name.
- Params string
- Params.
- Params
Out string - Params Out.
- Status float64
- Status.
- Type string
- DataSource Type.
- Wedata
Datasource stringId - ID of the resource.
- biz
Params String - BizParams.
- category String
- DataSource Category.
- cluster
Id String - ClusterId.
- collect String
- Collect.
- cos
Bucket String - COSBucket.
- cos
Region String - Cos region.
- database
Name String - Dbname.
- description String
- Description.
- display String
- Display.
- instance String
- Instance.
- name String
- DataSource Name.
- owner
Project StringId - Owner projectId.
- owner
Project StringIdent - Owner Project Ident.
- owner
Project StringName - Owner project name.
- params String
- Params.
- params
Out String - Params Out.
- status Double
- Status.
- type String
- DataSource Type.
- wedata
Datasource StringId - ID of the resource.
- biz
Params string - BizParams.
- category string
- DataSource Category.
- cluster
Id string - ClusterId.
- collect string
- Collect.
- cos
Bucket string - COSBucket.
- cos
Region string - Cos region.
- database
Name string - Dbname.
- description string
- Description.
- display string
- Display.
- instance string
- Instance.
- name string
- DataSource Name.
- owner
Project stringId - Owner projectId.
- owner
Project stringIdent - Owner Project Ident.
- owner
Project stringName - Owner project name.
- params string
- Params.
- params
Out string - Params Out.
- status number
- Status.
- type string
- DataSource Type.
- wedata
Datasource stringId - 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_ strid - Owner projectId.
- owner_
project_ strident - Owner Project Ident.
- owner_
project_ strname - Owner project name.
- params str
- Params.
- params_
out str - Params Out.
- status float
- Status.
- type str
- DataSource Type.
- wedata_
datasource_ strid - ID of the resource.
- biz
Params String - BizParams.
- category String
- DataSource Category.
- cluster
Id String - ClusterId.
- collect String
- Collect.
- cos
Bucket String - COSBucket.
- cos
Region String - Cos region.
- database
Name String - Dbname.
- description String
- Description.
- display String
- Display.
- instance String
- Instance.
- name String
- DataSource Name.
- owner
Project StringId - Owner projectId.
- owner
Project StringIdent - Owner Project Ident.
- owner
Project StringName - Owner project name.
- params String
- Params.
- params
Out String - Params Out.
- status Number
- Status.
- type String
- DataSource Type.
- wedata
Datasource StringId - ID of the resource.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.