Menambahkan sumber data ke DataWorks.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
ID workspace DataWorks tempat sumber data berada. Anda dapat memanggil operasi ListProjects untuk meminta ID tersebut. |
1 |
| Name |
string |
Yes |
Nama sumber data. |
abc |
| Description |
string |
No |
Deskripsi sumber data. |
abc |
| DataSourceType |
string |
Yes |
Jenis sumber data. Nilai yang valid:
|
rds |
| SubType |
string |
No |
Subjenis dari sumber data.
|
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 yang umum:
|
{"database":"dbname","instanceName":"instancename","password":"password","rdsOwnerId":"123","username":"username"} |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| HttpStatusCode |
string |
Kode status HTTP. |
200 |
| Data |
integer |
ID sumber data. |
123 |
| RequestId |
string |
ID permintaan. |
0bc141151593763**** |
| Success |
boolean |
Menunjukkan apakah permintaan berhasil. |
true |
Contoh
Respons sukses
JSONformat
{
"HttpStatusCode": "200",
"Data": 123,
"RequestId": "0bc141151593763****",
"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 | ConnectionAlreadyExist | The connection with envType %s and name %s already exists. | |
| 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. | |
| 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. | |
| 400 | Invalid.DataSource.DataSourceTypeNotExist | The data source type %s does not exist. | |
| 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.