1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. BiDatasource
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.BiDatasource

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a bi datasource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const datasource = new tencentcloud.BiDatasource("datasource", {
        charset: "utf8",
        dbHost: "bj-cdb-1lxqg5r6.sql.tencentcdb.com",
        dbName: "tf-test",
        dbPort: 63694,
        dbPwd: "ABc123,,,",
        dbType: "MYSQL",
        dbUser: "root",
        projectId: 11015030,
        sourceName: "tf-source-name",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    datasource = tencentcloud.BiDatasource("datasource",
        charset="utf8",
        db_host="bj-cdb-1lxqg5r6.sql.tencentcdb.com",
        db_name="tf-test",
        db_port=63694,
        db_pwd="ABc123,,,",
        db_type="MYSQL",
        db_user="root",
        project_id=11015030,
        source_name="tf-source-name")
    
    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 {
    		_, err := tencentcloud.NewBiDatasource(ctx, "datasource", &tencentcloud.BiDatasourceArgs{
    			Charset:    pulumi.String("utf8"),
    			DbHost:     pulumi.String("bj-cdb-1lxqg5r6.sql.tencentcdb.com"),
    			DbName:     pulumi.String("tf-test"),
    			DbPort:     pulumi.Float64(63694),
    			DbPwd:      pulumi.String("ABc123,,,"),
    			DbType:     pulumi.String("MYSQL"),
    			DbUser:     pulumi.String("root"),
    			ProjectId:  pulumi.Float64(11015030),
    			SourceName: pulumi.String("tf-source-name"),
    		})
    		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 datasource = new Tencentcloud.BiDatasource("datasource", new()
        {
            Charset = "utf8",
            DbHost = "bj-cdb-1lxqg5r6.sql.tencentcdb.com",
            DbName = "tf-test",
            DbPort = 63694,
            DbPwd = "ABc123,,,",
            DbType = "MYSQL",
            DbUser = "root",
            ProjectId = 11015030,
            SourceName = "tf-source-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.BiDatasource;
    import com.pulumi.tencentcloud.BiDatasourceArgs;
    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 datasource = new BiDatasource("datasource", BiDatasourceArgs.builder()
                .charset("utf8")
                .dbHost("bj-cdb-1lxqg5r6.sql.tencentcdb.com")
                .dbName("tf-test")
                .dbPort(63694)
                .dbPwd("ABc123,,,")
                .dbType("MYSQL")
                .dbUser("root")
                .projectId(11015030)
                .sourceName("tf-source-name")
                .build());
    
        }
    }
    
    resources:
      datasource:
        type: tencentcloud:BiDatasource
        properties:
          charset: utf8
          dbHost: bj-cdb-1lxqg5r6.sql.tencentcdb.com
          dbName: tf-test
          dbPort: 63694
          dbPwd: ABc123,,,
          dbType: MYSQL
          dbUser: root
          projectId: 1.101503e+07
          sourceName: tf-source-name
    

    Create BiDatasource Resource

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

    Constructor syntax

    new BiDatasource(name: string, args: BiDatasourceArgs, opts?: CustomResourceOptions);
    @overload
    def BiDatasource(resource_name: str,
                     args: BiDatasourceArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def BiDatasource(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     project_id: Optional[float] = None,
                     db_pwd: Optional[str] = None,
                     charset: Optional[str] = None,
                     source_name: Optional[str] = None,
                     db_user: Optional[str] = None,
                     db_type: Optional[str] = None,
                     db_host: Optional[str] = None,
                     db_name: Optional[str] = None,
                     db_port: Optional[float] = None,
                     data_origin_project_id: Optional[str] = None,
                     catalog: Optional[str] = None,
                     data_origin_datasource_id: Optional[str] = None,
                     bi_datasource_id: Optional[str] = None,
                     service_type: Optional[str] = None,
                     data_origin: Optional[str] = None,
                     uniq_vpc_id: Optional[str] = None,
                     vpc_id: Optional[str] = None)
    func NewBiDatasource(ctx *Context, name string, args BiDatasourceArgs, opts ...ResourceOption) (*BiDatasource, error)
    public BiDatasource(string name, BiDatasourceArgs args, CustomResourceOptions? opts = null)
    public BiDatasource(String name, BiDatasourceArgs args)
    public BiDatasource(String name, BiDatasourceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:BiDatasource
    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 BiDatasourceArgs
    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 BiDatasourceArgs
    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 BiDatasourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BiDatasourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BiDatasourceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Charset string
    Charset.
    DbHost string
    Host.
    DbName string
    Database name.
    DbPort double
    Port.
    DbPwd string
    Password.
    DbType string
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    DbUser string
    User name.
    ProjectId double
    Project id.
    SourceName string
    Datasource name in BI.
    BiDatasourceId string
    ID of the resource.
    Catalog string
    Catalog.
    DataOrigin string
    Third-party datasource identification, this parameter can be ignored.
    DataOriginDatasourceId string
    Third-party datasource project id, this parameter can be ignored.
    DataOriginProjectId string
    Third-party datasource project id, this parameter can be ignored.
    ServiceType string
    Own or Cloud, default: Own.
    UniqVpcId string
    Tencent cloud private network unified identity.
    VpcId string
    Tencent cloud private network identity.
    Charset string
    Charset.
    DbHost string
    Host.
    DbName string
    Database name.
    DbPort float64
    Port.
    DbPwd string
    Password.
    DbType string
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    DbUser string
    User name.
    ProjectId float64
    Project id.
    SourceName string
    Datasource name in BI.
    BiDatasourceId string
    ID of the resource.
    Catalog string
    Catalog.
    DataOrigin string
    Third-party datasource identification, this parameter can be ignored.
    DataOriginDatasourceId string
    Third-party datasource project id, this parameter can be ignored.
    DataOriginProjectId string
    Third-party datasource project id, this parameter can be ignored.
    ServiceType string
    Own or Cloud, default: Own.
    UniqVpcId string
    Tencent cloud private network unified identity.
    VpcId string
    Tencent cloud private network identity.
    charset String
    Charset.
    dbHost String
    Host.
    dbName String
    Database name.
    dbPort Double
    Port.
    dbPwd String
    Password.
    dbType String
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    dbUser String
    User name.
    projectId Double
    Project id.
    sourceName String
    Datasource name in BI.
    biDatasourceId String
    ID of the resource.
    catalog String
    Catalog.
    dataOrigin String
    Third-party datasource identification, this parameter can be ignored.
    dataOriginDatasourceId String
    Third-party datasource project id, this parameter can be ignored.
    dataOriginProjectId String
    Third-party datasource project id, this parameter can be ignored.
    serviceType String
    Own or Cloud, default: Own.
    uniqVpcId String
    Tencent cloud private network unified identity.
    vpcId String
    Tencent cloud private network identity.
    charset string
    Charset.
    dbHost string
    Host.
    dbName string
    Database name.
    dbPort number
    Port.
    dbPwd string
    Password.
    dbType string
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    dbUser string
    User name.
    projectId number
    Project id.
    sourceName string
    Datasource name in BI.
    biDatasourceId string
    ID of the resource.
    catalog string
    Catalog.
    dataOrigin string
    Third-party datasource identification, this parameter can be ignored.
    dataOriginDatasourceId string
    Third-party datasource project id, this parameter can be ignored.
    dataOriginProjectId string
    Third-party datasource project id, this parameter can be ignored.
    serviceType string
    Own or Cloud, default: Own.
    uniqVpcId string
    Tencent cloud private network unified identity.
    vpcId string
    Tencent cloud private network identity.
    charset str
    Charset.
    db_host str
    Host.
    db_name str
    Database name.
    db_port float
    Port.
    db_pwd str
    Password.
    db_type str
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    db_user str
    User name.
    project_id float
    Project id.
    source_name str
    Datasource name in BI.
    bi_datasource_id str
    ID of the resource.
    catalog str
    Catalog.
    data_origin str
    Third-party datasource identification, this parameter can be ignored.
    data_origin_datasource_id str
    Third-party datasource project id, this parameter can be ignored.
    data_origin_project_id str
    Third-party datasource project id, this parameter can be ignored.
    service_type str
    Own or Cloud, default: Own.
    uniq_vpc_id str
    Tencent cloud private network unified identity.
    vpc_id str
    Tencent cloud private network identity.
    charset String
    Charset.
    dbHost String
    Host.
    dbName String
    Database name.
    dbPort Number
    Port.
    dbPwd String
    Password.
    dbType String
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    dbUser String
    User name.
    projectId Number
    Project id.
    sourceName String
    Datasource name in BI.
    biDatasourceId String
    ID of the resource.
    catalog String
    Catalog.
    dataOrigin String
    Third-party datasource identification, this parameter can be ignored.
    dataOriginDatasourceId String
    Third-party datasource project id, this parameter can be ignored.
    dataOriginProjectId String
    Third-party datasource project id, this parameter can be ignored.
    serviceType String
    Own or Cloud, default: Own.
    uniqVpcId String
    Tencent cloud private network unified identity.
    vpcId String
    Tencent cloud private network identity.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BiDatasource Resource

    Get an existing BiDatasource 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?: BiDatasourceState, opts?: CustomResourceOptions): BiDatasource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bi_datasource_id: Optional[str] = None,
            catalog: Optional[str] = None,
            charset: Optional[str] = None,
            data_origin: Optional[str] = None,
            data_origin_datasource_id: Optional[str] = None,
            data_origin_project_id: Optional[str] = None,
            db_host: Optional[str] = None,
            db_name: Optional[str] = None,
            db_port: Optional[float] = None,
            db_pwd: Optional[str] = None,
            db_type: Optional[str] = None,
            db_user: Optional[str] = None,
            project_id: Optional[float] = None,
            service_type: Optional[str] = None,
            source_name: Optional[str] = None,
            uniq_vpc_id: Optional[str] = None,
            vpc_id: Optional[str] = None) -> BiDatasource
    func GetBiDatasource(ctx *Context, name string, id IDInput, state *BiDatasourceState, opts ...ResourceOption) (*BiDatasource, error)
    public static BiDatasource Get(string name, Input<string> id, BiDatasourceState? state, CustomResourceOptions? opts = null)
    public static BiDatasource get(String name, Output<String> id, BiDatasourceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:BiDatasource    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:
    BiDatasourceId string
    ID of the resource.
    Catalog string
    Catalog.
    Charset string
    Charset.
    DataOrigin string
    Third-party datasource identification, this parameter can be ignored.
    DataOriginDatasourceId string
    Third-party datasource project id, this parameter can be ignored.
    DataOriginProjectId string
    Third-party datasource project id, this parameter can be ignored.
    DbHost string
    Host.
    DbName string
    Database name.
    DbPort double
    Port.
    DbPwd string
    Password.
    DbType string
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    DbUser string
    User name.
    ProjectId double
    Project id.
    ServiceType string
    Own or Cloud, default: Own.
    SourceName string
    Datasource name in BI.
    UniqVpcId string
    Tencent cloud private network unified identity.
    VpcId string
    Tencent cloud private network identity.
    BiDatasourceId string
    ID of the resource.
    Catalog string
    Catalog.
    Charset string
    Charset.
    DataOrigin string
    Third-party datasource identification, this parameter can be ignored.
    DataOriginDatasourceId string
    Third-party datasource project id, this parameter can be ignored.
    DataOriginProjectId string
    Third-party datasource project id, this parameter can be ignored.
    DbHost string
    Host.
    DbName string
    Database name.
    DbPort float64
    Port.
    DbPwd string
    Password.
    DbType string
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    DbUser string
    User name.
    ProjectId float64
    Project id.
    ServiceType string
    Own or Cloud, default: Own.
    SourceName string
    Datasource name in BI.
    UniqVpcId string
    Tencent cloud private network unified identity.
    VpcId string
    Tencent cloud private network identity.
    biDatasourceId String
    ID of the resource.
    catalog String
    Catalog.
    charset String
    Charset.
    dataOrigin String
    Third-party datasource identification, this parameter can be ignored.
    dataOriginDatasourceId String
    Third-party datasource project id, this parameter can be ignored.
    dataOriginProjectId String
    Third-party datasource project id, this parameter can be ignored.
    dbHost String
    Host.
    dbName String
    Database name.
    dbPort Double
    Port.
    dbPwd String
    Password.
    dbType String
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    dbUser String
    User name.
    projectId Double
    Project id.
    serviceType String
    Own or Cloud, default: Own.
    sourceName String
    Datasource name in BI.
    uniqVpcId String
    Tencent cloud private network unified identity.
    vpcId String
    Tencent cloud private network identity.
    biDatasourceId string
    ID of the resource.
    catalog string
    Catalog.
    charset string
    Charset.
    dataOrigin string
    Third-party datasource identification, this parameter can be ignored.
    dataOriginDatasourceId string
    Third-party datasource project id, this parameter can be ignored.
    dataOriginProjectId string
    Third-party datasource project id, this parameter can be ignored.
    dbHost string
    Host.
    dbName string
    Database name.
    dbPort number
    Port.
    dbPwd string
    Password.
    dbType string
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    dbUser string
    User name.
    projectId number
    Project id.
    serviceType string
    Own or Cloud, default: Own.
    sourceName string
    Datasource name in BI.
    uniqVpcId string
    Tencent cloud private network unified identity.
    vpcId string
    Tencent cloud private network identity.
    bi_datasource_id str
    ID of the resource.
    catalog str
    Catalog.
    charset str
    Charset.
    data_origin str
    Third-party datasource identification, this parameter can be ignored.
    data_origin_datasource_id str
    Third-party datasource project id, this parameter can be ignored.
    data_origin_project_id str
    Third-party datasource project id, this parameter can be ignored.
    db_host str
    Host.
    db_name str
    Database name.
    db_port float
    Port.
    db_pwd str
    Password.
    db_type str
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    db_user str
    User name.
    project_id float
    Project id.
    service_type str
    Own or Cloud, default: Own.
    source_name str
    Datasource name in BI.
    uniq_vpc_id str
    Tencent cloud private network unified identity.
    vpc_id str
    Tencent cloud private network identity.
    biDatasourceId String
    ID of the resource.
    catalog String
    Catalog.
    charset String
    Charset.
    dataOrigin String
    Third-party datasource identification, this parameter can be ignored.
    dataOriginDatasourceId String
    Third-party datasource project id, this parameter can be ignored.
    dataOriginProjectId String
    Third-party datasource project id, this parameter can be ignored.
    dbHost String
    Host.
    dbName String
    Database name.
    dbPort Number
    Port.
    dbPwd String
    Password.
    dbType String
    MYSQL, MSSQL, POSTGRE, ORACLE, CLICKHOUSE, TIDB, HIVE, PRESTO.
    dbUser String
    User name.
    projectId Number
    Project id.
    serviceType String
    Own or Cloud, default: Own.
    sourceName String
    Datasource name in BI.
    uniqVpcId String
    Tencent cloud private network unified identity.
    vpcId String
    Tencent cloud private network identity.

    Import

    bi datasource can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/biDatasource:BiDatasource datasource datasource_id
    

    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.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack