Menambahkan sumber data.
API ini telah ditinggalkan. Kami merekomendasikan migrasi ke dataworks-public(2020-05-18) - CreateDataSource guna memperoleh fungsionalitas yang lebih baik dan dukungan berkelanjutan. Meskipun API yang telah ditinggalkan ini masih dapat diakses sementara, tidak akan ada pembaruan atau perbaikan bug lebih lanjut.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
ID workspace tempat sumber data dikaitkan. Anda dapat memanggil operasi ListProjects untuk menanyakan ID. |
1 |
| Name |
string |
Yes |
Nama sumber data. |
abc |
| Description |
string |
No |
Deskripsi string koneksi. |
abc |
| ConnectionType |
string |
Yes |
Jenis string koneksi. Nilai yang valid:
|
rds |
| SubType |
string |
No |
Subtipe string koneksi. Parameter ini digunakan untuk skenario di mana suatu jenis mencakup subtipe. Jenis dan subtipe berikut didukung:
|
mysql |
| EnvType |
integer |
Yes |
Lingkungan tempat sumber data digunakan. Nilai yang valid: 0 dan 1. Nilai 0 menunjukkan lingkungan pengembangan. Nilai 1 menunjukkan lingkungan produksi. |
1 |
| Content |
string |
Yes |
Detail sumber data. Contoh detail dari beberapa sumber data umum:
|
{"database":"dbname","instanceName":"instancename","password":"password","rdsOwnerId":"123","username":"username"} |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
string |
Kode status HTTP. |
200 |
| Data |
integer |
ID sumber data. |
123 |
| RequestId |
string |
ID permintaan. |
0bc141151593763**** |
| Success |
boolean |
Menunjukkan apakah permintaan berhasil. |
true |
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | The connection does not exist. |
| 400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | The project does not exist. |
| 400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | The user is not in the project. |
| 400 | ConnectionAlreadyExist | The connection with envType %s and name %s already exists. | ConnectionAlreadyExist |
| 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 | Invalid.DataSource.DataSourceTypeNotSupport | The dataSourceType %s and subType %s are not supported. | DataSource type not support yet. |
| 400 | Invalid.Param.Odps.EngineIdOrConnectStrEmpty | Either the compute engine ID or the connection string must be specified when data source type is ODPS. | |
| 400 | MissingParam.ConnectionStr.Property | You must specify property %s required by the data source connection string. | The data source connection str required property missing. |
| 400 | Invalid.DataSource.DataSourceTypeNotExist | The data source type %s does not exist. | The dataSource type %s are not exist. |
| 403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | The user is not a project administrator or owner. |
| 403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | The user is not in tenant. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.