UpdateConnection
Updates a data source.
This API has been deprecated. We recommend migrating to dataworks-public(2020-05-18) - UpdateDataSource for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Description |
string |
No |
The description of the data source. |
abc |
| EnvType |
integer |
No |
The environment to which the data source belongs. Valid values:
|
1 |
| Content |
string |
No |
The detailed information of the data source. Examples of common data sources:
|
{"database":"dbname","instanceName":"instancename","password":"password","rdsOwnerId":"123","username":"username"} |
| Status |
string |
No |
The status of the data source. Valid values:
|
ENABLED |
| ConnectionId |
integer |
Yes |
The ID of the data source. You can call the ListConnections operation to obtain the data source ID in the workspace. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
string |
The HTTP status code. |
200 |
| Data |
boolean |
Indicates whether the data source was successfully updated. |
true |
| RequestId |
string |
The ID of the request. |
0bc14115159376359**** |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"HttpStatusCode": "200",
"Data": true,
"RequestId": "0bc14115159376359****",
"Success": true
}
Error codes
|
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 | Invalid.DataSource.DataSourceStatus | The specified dataSourceStatus %s is invalid. | The specify data source status %s invalid. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.