tencent cloud

Tencent Cloud WeData

UpdateDataSource

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-03-02 12:25:35

1. API Description

Domain name for API request: wedata.intl.tencentcloudapi.com.

This API is used to update a data source.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: UpdateDataSource.
Version Yes String Common Params. The value used for this API: 2025-08-06.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Id Yes Integer Data source ID.
ProjectId Yes String Project ID.
ProdConProperties No String Configuration message of data sources is stored in JSON KV. based on each data source type, the KV storage information varies.

> deployType:
CONNSTR_PUBLICDB (public network instance).
CONNSTR_CVMDB (self-built instance).
Cloud INSTANCE.

<br/>mysql: self-built instance.<br/>{<br/> "deployType": "CONNSTR_CVMDB",<br/> "url": "jdbc:mysql://1.1.1.1:1111/example#test#123456",<br/> "username": "root",<br/> "password": "example#test#123456",<br/> "region": "ap-shanghai",<br/> "vpcId": "vpc-kprq42yo",<br/> "type": "MYSQL"<br/>}<br/>mysql: cloud instance.<br/>{<br/> "instanceid": "cdb-12uxdo5e",<br/> "db": "db",<br/> "region": "ap-shanghai",<br/> "username": "msyql",<br/> "password": "example#test#123456",<br/> "deployType": "INSTANCE",<br/> "type": "TENCENT_MYSQL"<br/>}<br/>sql_server: <br/>{<br/> "deployType": "CONNSTR_PUBLICDB",<br/> "url": "jdbc:sqlserver://1.1.1.1:223;example#test#123456",<br/> "username": "user_1",<br/> "password": "example#test#123456",<br/> "type": "SQLSERVER"<br/>}<br/>redis:<br/> redisType:<br/>-NO_ACCOUNT (account-free).<br/>-SELF_ACCOUNT (custom account).<br/>{<br/> "deployType": "CONNSTR_PUBLICDB",<br/> "username":""<br/> "password": "example#test#123456",<br/> "ip": "1.1.1.1",<br/> "port": "6379",<br/> "redisType": "NO_ACCOUT",<br/> "type": "REDIS"<br/>}<br/>oracle: <br/>{<br/> "deployType": "CONNSTR_CVMDB",<br/> "url": "jdbc:oracle:thin:@1.1.1.1:1521:example#test#123456",<br/> "username": "oracle",<br/> "password": "example#test#123456",<br/> "region": "ap-shanghai",<br/> "vpcId": "vpc-kprq42yo",<br/> "type": "ORACLE"<br/>}<br/>mongodb:<br/>advanceParams (custom parameters, appended to the url).<br/>{<br/> "advanceParams": [<br/> {<br/> "key": "authSource",<br/> "value": "auth"<br/> }<br/> ],<br/> "db": "admin",<br/> "deployType": "CONNSTR_PUBLICDB",<br/> "username": "user",<br/> "password": "example#test#123456",<br/> "type": "MONGODB",<br/> "host": "1.1.1.1:9200"<br/>}<br/>postgresql:<br/>{<br/> "deployType": "CONNSTR_PUBLICDB",<br/> "url": "jdbc:postgresql://1.1.1.1:1921/example#test#123456",<br/> "username": "user",<br/> "password": "example#test#123456",<br/> "type": "POSTGRE"<br/>}<br/>kafka:<br/> authType:<br/> - sasl<br/> - jaas<br/> - sasl_plaintext<br/> - sasl_ssl<br/> - GSSAPI<br/> ssl:<br/> -PLAIN<br/> -GSSAPI<br/>{<br/> "deployType": "CONNSTR_PUBLICDB",<br/> "host": "1.1.1.1:9092",<br/> "ssl": "GSSAPI",<br/> "authType": "sasl",<br/> "type": "KAFKA",<br/> "principal": "aaaa",<br/> "serviceName": "kafka"<br/>}<br/><br/>cos:<br/>{<br/> "region": "ap-shanghai",<br/> "deployType": "INSTANCE",<br/> "secretId": "aaaaa",<br/> "secretKey": "example#test#123456",<br/> "bucket": "aaa",<br/> "type": "COS"<br/>}<br/><br/>
DevConProperties No String This field is required if the project is in standard mode.
ProdFileUpload No DataSourceFileUpload Upload data source file in live production environment.
DevFileUpload No DataSourceFileUpload Upload data source file in development environment.
DisplayName No String Data source display name for visual inspection.
Description No String Data source description information

3. Output Parameters

Parameter Name Type Description
Data DataSourceStatus Whether the operation is successful
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Modify Data Source

Input Example

POST / HTTP/1.1
Host: wedata.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpdateDataSource
<Common request parameters>

{
    "Id": 62266,
    "ProjectId": "1460947878944567296",
    "ProdConProperties": null,
    "DevConProperties": null,
    "ProdFileUpload": {
        "TrustStore": null,
        "KeyStore": null,
        "CoreSite": null,
        "HdfsSite": null,
        "HiveSite": null,
        "HBASESite": null,
        "KeyTab": null,
        "KRB5Conf": null,
        "PrivateKey": null,
        "PublicKey": null
    },
    "DevFileUpload": {
        "TrustStore": null,
        "KeyStore": null,
        "CoreSite": null,
        "HdfsSite": null,
        "HiveSite": null,
        "HBASESite": null,
        "KeyTab": null,
        "KRB5Conf": null,
        "PrivateKey": null,
        "PublicKey": null
    },
    "DisplayName": "mysql_22_33",
    "Description": null
}

Output Example

{
    "Response": {
        "Data": {
            "Status": true
        },
        "RequestId": "7468019d-ac08-43db-a4d4-9b04be755f78"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.

Ajuda e Suporte

Esta página foi útil?

comentários