ExportDataSources
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 target data sources belong. You can call the ListProjects operation to obtain the workspace ID. |
10000 |
| Name |
string |
No |
The keyword contained in the names of the target data sources to be exported. Currently, only one keyword is supported. For example, if you set this parameter to test (that is, the keyword contained in the names of the target data sources to be exported is test), when you invoke the ExportDataSources operation, all data sources whose names contain test in the target workspace are exported. |
test |
| DataSourceType |
string |
No |
The type of the target data source. Common types:
|
rds |
| SubType |
string |
No |
The subtype of the target data source. This parameter takes effect only when the DataSourceType parameter is set to RDS. When the DataSourceType parameter is set to RDS, this parameter can be set to mysql, sqlserver, or postgresql. |
mysql |
| EnvType |
integer |
No |
The environment to which the target data sources belong. Valid values:
|
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. Default value: 10. Maximum value: 100. |
10 |
| PageNumber |
integer |
No |
The page number for the paged query. The value must be a positive integer greater than or equal to 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 use the ID to locate logs and troubleshoot issues. |
0bc14115159376359**** |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
true |
| Data |
object |
The return result of the batch export of data sources. |
|
| PageNumber |
integer |
The page number for the paged query. The value must be a positive integer greater than or equal to 1. |
10 |
| PageSize |
integer |
The number of entries returned on each page. |
1 |
| TotalCount |
integer |
The total number of data sources that meet the specified conditions. |
100 |
| DataSources |
array<object> |
The detailed information of the data sources in the batch export. The return result of this call is an array containing the details of the exported data sources. The following information is an example of the details of a single data source in the array. |
|
|
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. When the DataSourceType parameter is set to 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 to which the data source belongs. Valid values:
|
1 |
| ConnectStatus |
integer |
The connectivity status between the data source and exclusive resource groups. 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. Common types:
|
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 engine where the data source resides is the default 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 operates the data source. |
193543050**** |
| Name |
string |
The name of the data source. |
abc |
| Content |
string |
The detailed configurations 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 ID of the data source. |
1 |
| BindingCalcEngineId |
integer |
The ID of the engine to which the data source is bound. |
123 |
| TenantId |
integer |
The ID of the tenant 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. | The parameter is invalid. |
| 500 | InternalError.DI.Parameter | A DI internal error occurred. | A Data Integration internal business error occurred. |
| 403 | Forbidden.DI.NoPrivilege | No access. | Access denied. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.