You can call this operation to obtain the list of gateways.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetUserGateways |
The operation that you want to perform. Set the value to GetUserGateways. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. |
PageSize | Integer | No | 20 |
The number of entries to return on each page. Valid values: 1 to 3000. |
SearchKey | String | No | Routine |
The gateway name or remark keyword used to query gateways in fuzzy match mode. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The status code. |
Count | Integer | 50 |
The total number of entries returned. |
Data | String | [{\"gatewayDesc\":\"i-11x8wqo6w\",\"gatewayId\":\"dg-c5n5913zl54f7h7z\",\"gatewayName\":\"TestLinux\",\"gmtCreate\":1563430627000,\"gmtCreateString\":\"2019-07-18 14:17\",\"gmtModified\":1568881049000,\"gmtModifiedString\":\"2019-09-19 16:17\",\"hosts\":\"10.25.37.78\",\"parentId\":\"1673826650152166\",\"status\":\"RUNNING\",\"userId\":\"1673826650152166\"}] |
The gateway information. |
ErrorMsg | String | "" |
The error message. |
RequestId | String | E68F1794-354B-4F18-AA6D-1F00353E632E |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call is successful. |
Examples
Sample requests
http(s)://dg.[regionId].aliyuncs.com/?Action=GetUserGateways
&PageNumber=1
&PageSize=30
&<Common request parameters>
Sample success responses
XML
format
<GetUserGatewaysResponse>
<RequestId>31728E14-8164-49C3-928B-044E93B8A11E</RequestId>
<ErrorMsg></ErrorMsg>
<Data>[{"gatewayDesc":"Alibaba Cloud Database Gateway","gatewayId":"dg-c34g913zl54f7h7z","gatewayName":"Production environment","gmtCreate":1563430627000,"gmtCreateString":"2019-07-18 14:17","gmtModified":1568881049000,"gmtModifiedString":"2019-09-19 16:17","hosts":"10.25.37.78","parentId":"123123","status":"RUNNING","userId":"123123"}]</Data>
<Count>1</Count>
<Code>200</Code>
<Success>true</Success>
</GetUserGatewaysResponse>
JSON
format
{
"Data":"[{\"gatewayDesc\":\"Alibaba Cloud Database Gateway\",\"gatewayId\":\"dg-c34g913zl54f7h7z\",\"gatewayName\":\"Production environment\",\"gmtCreate\":1563430627000,\"gmtCreateString\":\"2019-07-18 14:17\",\"gmtModified\":1568881049000,\"gmtModifiedString\":\"2019-09-19 16:17\",\"hosts\":\"10.25.37.78\",\"parentId\":\"123123\",\"status\":\"RUNNING\",\"userId\":\"123123\"}]",
"Count":1,
"RequestId":"31728E14-8164-49C3-928B-044E93B8A11E",
"ErrorMsg":"",
"Success":true,
"Code":"200"
}
Error codes
For a list of error codes, visit the API Error Center.