Tests the network connectivity between a data source and a resource group.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | TestNetworkConnection |
The operation that you want to perform. |
DatasourceName | String | Yes | mysql_name |
The name of the data source. |
EnvType | String | Yes | 1 |
The environment to which the data source belongs. Valid values:
|
ProjectId | Long | Yes | 10000 |
The ID of the DataWorks workspace to which the data source belongs. You can call the ListProjects operation to query the ID of the workspace. |
RegionId | String | Yes | cn-shanghai |
The ID of the region in which the data source resides. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation. |
ResourceGroup | String | Yes | S_res_group_2XXXX4_1619100XXXXX |
The identifier of the resource group. You can call the ListResourceGroups operation to query the identifier of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TaskList | Struct |
The information about the connectivity test. |
|
ConnectMessage | String | Connected |
The reason why the data source and resource group failed the connectivity test. If data source and the resource group passed the connectivity test, this parameter is left empty. |
ConnectStatus | Boolean | true |
The result of the connectivity test. Valid values:
|
Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
RequestId | String | 0000-ABCD-EFG |
The ID of the request. You can locate logs and troubleshoot issues based on the ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=TestNetworkConnection
&DatasourceName=mysql_name
&EnvType=1
&ProjectId=10000
&RegionId=cn-shanghai
&ResourceGroup=S_res_group_2XXXX4_1619100XXXXX
&<Common request parameters>
Sample success responses
XML
format
<RequestId>0000-ABCD-EFG </RequestId>
<TaskList>
<ConnectStatus>true</ConnectStatus>
<ConnectMessage>Connected</ConnectMessage>
</TaskList>
<Success>true</Success>
JSON
format
{
"RequestId": "0000-ABCD-EFG",
"TaskList": {
"ConnectStatus": true,
"ConnectMessage": "Connected"
},
"Success": true
}
Error codes
Http status code | Error code | Error message | Description |
---|---|---|---|
403 | Forbidden.DI.NoPrivilege | No access. | The error message returned because you do not have the required permissions. |
500 | InternalError.DI.Parameter | A DI internal error occurred. | The error message returned because an internal error in Data Integration occurred. |
400 | Invalid.DI.Parameter | The parameter is invalid. | The error code returned because one or more parameters are invalid. |
For a list of error codes, visit the API Error Center.