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 in which the data source is used. Valid values: 0 and 1. The value 0 indicates the development environment. The value 1 indicates the production environment. |
1 |
| Content |
string |
No |
The details of the data source. Examples of details of some 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 and DISABLED. The value ENABLED indicates that the data source is in the normal state. The value DISABLED indicates that the data source is in an abnormal state. |
ENABLED |
| ConnectionId |
integer |
Yes |
The data source ID. You can call the ListConnections operation to query the ID. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
string |
The HTTP status code. |
200 |
| Data |
boolean |
Indicates whether the data source is updated. |
true |
| RequestId |
string |
The request ID. |
0bc14115159376359**** |
| Success |
boolean |
Indicates whether the request was successful. |
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.