This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.
Modify Data Source Configuration
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| UpdateModel | string | Yes | Refer to the example JSON for parameter values. The parameters are explained as follows:
| { "schema": "schema", "userId":"S*****46345", "password": "Ta****34", "showName": "TEST", "address": "11*****.55", "instance": "quickbi_test", "dsId": "34d6d******3ca8ac267", "port": "3306", "dsType": "mysql", "username": "root", "config": { "initialSql": "Set timezone = '-10'" } } |
Example Code: @Test
public void UpdateDataSource () throws SDKException, ClientException {
UpdateDataSourceRequest request = new UpdateDataSourceRequest();
HashMap<String,Object> updateModel = new HashMap<>();
updateModel.put("dsId", "342e*******455");
updateModel.put("userId","74f5*****20ebf278c8");
updateModel.put("dsType", "impala");
updateModel.put("address", "12***22");
updateModel.put("instance", "default");
updateModel.put("showName", "wk***TETST");
request.setUpdateModel(JSONObject.toJSONString(updateModel));
System.out.println(JSONObject.toJSONString(updateModel));
request.setSysConnectTimeout(60000);request.setSysReadTimeout(60000);
UpdateDataSourceResponse acsResponse = getPopAPIClient("test").getAcsResponse(request);
System.out.println(JSONObject.toJSONString(acsResponse.getResult()));
}
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "D787E1A***********5DF8D885",
"Result": true,
"Success": true
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Internal.System.Error | An internal system error occurred. | An internal system error occurred. |
| 400 | Invalid.Parameter.Error | The parameter is invalid:%s. | invalid parameter: ${0}. |
| 400 | User.NotIn.Workspace | The user is not a member of the group workspace. | The user is not a member of the group workspace. |
| 400 | NoPermissionTo.Operate.Object | You are not authorized to operate the objects. | You are not authorized to do this. |
| 400 | DatasourceId.IsNull.Error | You must select a data source before selecting the table. | You must select a data source before selecting the table. |
| 400 | Datasource.NotFound.Error | The specified data source does not exist: %s. | The specified data source does not exist: %s. |
| 400 | Name.RegularExpression.Error | Name format validation failed. | - |
| 400 | NameExceeded.MaxLength.Error | The name cannot exceed %s characters in length. | The name cannot be longer than% s characters. |
| 400 | Database.PortInvalid.Error | The database port is invalid. | The database port is invalid. |
For a list of error codes, visit the Service error codes.
