該介面用於更新資料來源。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Description |
string |
否 |
資料來源的描述資訊。 |
xxx |
| EnvType |
integer |
否 |
資料來源所在的環境。取值如下:
|
1 |
| Content |
string |
否 |
需要修改的目標資料來源的詳細資料。 不支援修改資料來源的類型,例如,您不可以修改 odps 類型的資料來源為 MySQL 類型。 部分常用資料來源的資訊範例如下:
|
{"accessId":"*****","accessKey":"*****","authType":2,"endpoint":"http://service.odps.aliyun.com/api","project":"xsaxsax","tag":"public"} |
| Status |
string |
否 |
資料來源的狀態。該欄位已廢棄,請勿使用。 |
ENABLED |
| DataSourceId |
integer |
是 |
需要更新的資料來源 ID,您可以調用 ListDataSources 擷取資料來源的 ID。 |
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| HttpStatusCode |
string |
請求返回碼。 |
200 |
| Data |
boolean |
是否成功更新資料來源。 |
true |
| RequestId |
string |
請求 ID。 |
0bc14115159376359**** |
| Success |
boolean |
請求是否成功。 |
true |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": "200",
"Data": true,
"RequestId": "0bc14115159376359****",
"Success": true
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 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. | 使用者不在租戶中。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。