All Products
Search
Document Center

:UpdateDataSource

Last Updated:Jun 11, 2026

Memperbarui sumber data.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

Description

string

No

Deskripsi sumber data.

xxx

EnvType

integer

No

Lingkungan tempat sumber data berada. Nilai valid:

  • 0: lingkungan pengembangan

  • 1: lingkungan produksi.

1

Content

string

No

Detail tentang sumber data. Anda tidak diizinkan mengubah tipe sumber data. Misalnya, Anda tidak diizinkan mengubah tipe sumber data dari MaxCompute menjadi MySQL. Contoh detail beberapa sumber data umum:

  • odps

    {
      "accessId": "*****",
      "accessKey": "*****",
      "authType": 2,
      "endpoint": "http://service.odps.aliyun.com/api",
      "project": "xsaxsax",
      "tag": "public"
    }
    
  • mysql

    {
      "database": "xsaxsa",
      "instanceName": "rm-xsaxsa",
      "password": "xsaxsa",
      "rdsOwnerId": "xasxsa",
      "regionId": "cn-shanghai",
      "tag": "rds",
      "username": "xsaxsa"
    }
    
  • rds

    {
      "configType": 1,
      "tag": "rds",
      "database": "xsaxsa",
      "username": "xsaxsa",
      "password": "xssaxsa$32050",
      "instanceName": "rm-xsaxs",
      "rdsOwnerId": "11111111"
    }
    
  • oss

    {
      "accessId": "*****",
      "accessKey": "*****",
      "bucket": "xsa-xs-xs",
      "endpoint": "http://oss-cn-shanghai.aliyuncs.com",
      "tag": "public"
    }
    
  • sqlserver

    {
      "jdbcUrl": "jdbc:sqlserver://xsaxsa-xsaxsa.database.xxx.cn:123;DatabaseName=xsxs-xsxs",
      "password": "sdasda$fs",
      "tag": "public",
      "username": "sxaxacdacdd"
    }
    
  • polardb

    {
      "clusterId": "pc-sdadsadsa",
      "database": "dsadsadsa",
      "ownerId": "121212122",
      "password": "sdasdafssa",
      "region": "cn-shanghai",
      "tag": "polardb",
      "username": "asdadsads"
    }
    
  • oracle

    {
      "jdbcUrl": "jdbc:oracle:saaa:@xxxxx:1521:PROD",
      "password": "sxasaxsa",
      "tag": "public",
      "username": "sasfadfa"
    }
    
  • mongodb

    {
      "address": "[\"xsaxxsa.mongodb.rds.aliyuncs.com:3717\"]",
      "database": "admin",
      "password": "sadsda@",
      "tag": "public",
      "username": "dsadsadas"
    }
    
  • emr

    {
      "accessId": "*****",
      "emrClusterId": "C-dsads",
      "emrResourceQueueName": "default",
      "emrEndpoint": "emr.aliyuncs.com",
      "accessKey": "*****",
      "emrUserId": "224833315798889783",
      "name": "sasdsadsa",
      "emrAccessMode": "simple",
      "region": "cn-shanghai",
      "authType": "2",
      "emrProjectId": "FP-sdadsad"
    }
    
  • postgresql

    {
      "jdbcUrl": "jdbc:postgresql://xxxx:1921/ssss",
      "password": "sdadsads",
      "tag": "public",
      "username": "sdsasda"
    }
    
  • analyticdb_for_mysql

    {
      "instanceId": "am-sadsada",
      "database": "xsxsx",
      "username": "xsxsa",
      "password": "asdadsa",
      "connectionString": "am-xssxsxs.ads.aliyuncs.com:3306"
    }
    
  • hybriddb_for_postgresql

    {
      "connectionString": "gp-xsaxsaxa-master.gpdbmaster.rds.aliyuncs.com",
      "database": "xsaxsaxas",
      "password": "xsaxsaxsa@11",
      "instanceId": "gp-xsaxsaxsa",
      "port": "541132",
      "ownerId": "xsaxsaxsas",
      "username": "sadsad"
    }
    
  • holo

    {
      "accessId": "*****",
      "accessKey": "*****",
      "database": "xsaxsaxsa",
      "instanceId": "xsaxa",
      "tag": "aliyun"
    }
    
  • kafka

    {
      "instanceId": "xsax-cn-xsaxsa",
      "regionId": "cn-shanghai",
      "tag": "aliyun",
      "ownerId": "1212121212112"
    }
    

{"accessId":"*****","accessKey":"*****","authType":2,"endpoint":"http://service.odps.aliyun.com/api","project":"xsaxsax","tag":"public"}

Status

string

No

Status sumber data. Parameter ini tidak digunakan lagi. Jangan gunakan parameter ini.

ENABLED

DataSourceId

integer

Yes

ID sumber data. Anda dapat memanggil operasi ListDataSources untuk mengkueri ID.

1

Elemen respons

Element

Type

Description

Example

object

The response parameters.

HttpStatusCode

string

The HTTP status code.

200

Data

boolean

Indicates whether the data source is updated.

true

RequestId

string

The request ID.

0bc14115159376359****

Success

boolean

Indicates whether the request was successful.

true

Contoh

Respons sukses

JSONformat

{
  "HttpStatusCode": "200",
  "Data": true,
  "RequestId": "0bc14115159376359****",
  "Success": true
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Invalid.Tenant.ConnectionNotExists The connection does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist.
400 Invalid.Tenant.UserNotInProject The user is not in the project.
400 MissingParam.ConnectionStr.Property You must specify property %s required by the data source connection string.
400 DataSource.CheckRamRoleFailure Failed to check the RAM role. AccountId %s. roleArn %s.
400 DataSource.ConnectionStrProperty.PatternNotMatch The pattern value %s is invalid. The correct pattern is %s.
400 DataSource.NotFound The specified data source ID %s does not exist.
400 Invalid.Connection.Empty You must specify the connection parameter.
400 Invalid.DataSource.DataSourceTypeNotExist The data source type %s does not exist.
400 Invalid.DataSource.DataSourceTypeNotSupport The dataSourceType %s and subType %s are not supported.
400 Invalid.Operation You cannot delete the bindingCalcEngine that is bound to the data source.
400 Invalid.Param.Odps.EngineIdOrConnectStrEmpty Either the compute engine ID or the connection string must be specified when data source type is ODPS.
400 Required.Parameter.Empty You must specify the parameter %s.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.