Exports a list of data sources.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The ID of the DataWorks workspace to which the data sources belong. You can call the ListProjects operation to query the ID of the workspace. |
10000 |
| Name |
string |
No |
The keyword contained in the names of the data sources that you want to export. You can specify only one keyword. For example, if you set this parameter to test, you can call the ExportDataSources operation to export all data sources whose names contain test in the workspace. |
test |
| DataSourceType |
string |
No |
The type of the data source. Valid values:
|
rds |
| SubType |
string |
No |
The subtype of the data source. This parameter takes effect only when the DataSourceType parameter is set to rds. If the value of the DataSourceType parameter is rds, the value of this parameter can be mysql, sqlserver, or postgresql. |
mysql |
| EnvType |
integer |
No |
The environment in which the data source resides. Valid values:
|
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. Maximum value: 100. |
10 |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP status code returned. Valid values:
|
200 |
| RequestId |
string |
The request ID. You can locate logs and troubleshoot issues based on the ID. |
0bc14115159376359**** |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The information about the exported data sources. |
|
| PageNumber |
integer |
The page number. Pages start from page 1. |
10 |
| PageSize |
integer |
The number of entries per page. |
1 |
| TotalCount |
integer |
The total number of entries returned. |
100 |
| DataSources |
array<object> |
The details of the exported data sources. The value is an array. The following parameters are the elements in the array. The sample values of these parameters show the details of a sample data source. |
|
|
object |
|||
| Status |
integer |
Indicates whether the data source is available. Valid values:
|
1 |
| ProjectId |
integer |
The ID of the DataWorks workspace to which the data source belongs. |
123 |
| SubType |
string |
The subtype of the data source. This parameter takes effect only when the DataSourceType parameter is set to rds. If the value of the DataSourceType parameter is rds, the value of this parameter can be mysql, sqlserver, or postgresql. |
mysql |
| GmtModified |
string |
The time when the data source was last modified. Example: Mar 17, 2021 4:09:32 PM. |
Mar 17, 2021 4:09:32 PM |
| EnvType |
integer |
The environment in which the data source resides. Valid values:
|
1 |
| ConnectStatus |
integer |
Indicates whether the data source is connected to an exclusive resource group. Valid values:
|
1 |
| Sequence |
integer |
The sequence number of the data source. |
300 |
| Description |
string |
The description of the data source. |
a connection |
| DataSourceType |
string |
The type of the data source. Valid values:
|
rds |
| GmtCreate |
string |
The time when the data source was created. Example: Mar 17, 2021 4:09:32 PM. |
Mar 17, 2021 4:09:32 PM |
| DefaultEngine |
boolean |
Indicates whether the compute engine that is added as the data source is the default compute engine. Valid values:
|
false |
| Shared |
boolean |
Indicates whether the data source can be shared. Valid values:
|
false |
| Operator |
string |
The ID of the user who exported the data source. |
193543050**** |
| Name |
string |
The name of the data source. |
abc |
| Content |
string |
The configuration of the data source. |
{"pubEndpoint":"http://service.cn.maxcompute.aliyun.com/api","accessId":"TMP.3KecGjvzy3i8MYfn2BGHgF7EHGyBFZcHm7GgngrABVRyvvKQrfF5kskR36xP361C3dqwbGo7SGYptAeGyiTwHXqLaBUvYC","securityToken":null,"endpoint":"http://service.cn.maxcompute.aliyun-inc.com/api","accessKey":"***","name":"PRE_PROJECT_A_engine","project":"PRE_PROJECT_A","vpcEndpoint":"http://service.cn.maxcompute.aliyun-inc.com/api","region":"cn-shanghai","authType":"2"} |
| Id |
integer |
The data source ID. |
1 |
| BindingCalcEngineId |
integer |
The ID of the compute engine that is added as the data source. |
123 |
| TenantId |
integer |
The ID of the Alibaba Cloud account to which the data source belongs. |
1234567 |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "0bc14115159376359****",
"Success": true,
"Data": {
"PageNumber": 10,
"PageSize": 1,
"TotalCount": 100,
"DataSources": [
{
"Status": 1,
"ProjectId": 123,
"SubType": "mysql",
"GmtModified": "Mar 17, 2021 4:09:32 PM",
"EnvType": 1,
"ConnectStatus": 1,
"Sequence": 300,
"Description": "a connection",
"DataSourceType": "rds",
"GmtCreate": "Mar 17, 2021 4:09:32 PM",
"DefaultEngine": false,
"Shared": false,
"Operator": "193543050****",
"Name": "abc",
"Content": "{\"pubEndpoint\":\"http://service.cn.maxcompute.aliyun.com/api\",\"accessId\":\"TMP.3KecGjvzy3i8MYfn2BGHgF7EHGyBFZcHm7GgngrABVRyvvKQrfF5kskR36xP361C3dqwbGo7SGYptAeGyiTwHXqLaBUvYC\",\"securityToken\":null,\"endpoint\":\"http://service.cn.maxcompute.aliyun-inc.com/api\",\"accessKey\":\"***\",\"name\":\"PRE_PROJECT_A_engine\",\"project\":\"PRE_PROJECT_A\",\"vpcEndpoint\":\"http://service.cn.maxcompute.aliyun-inc.com/api\",\"region\":\"cn-shanghai\",\"authType\":\"2\"}",
"Id": 1,
"BindingCalcEngineId": 123,
"TenantId": 1234567
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.DI.Parameter | The parameter is invalid. | |
| 500 | InternalError.DI.Parameter | A DI internal error occurred. | |
| 403 | Forbidden.DI.NoPrivilege | No access. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.