You can call this operation to query the connection information about a client based on the ID of the Smart Access Gateway (SAG) APP instance and username of the client account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | cn-shanghai |
The region where the SAG APP instance is deployed. |
SmartAGId | String | Yes | sag-wfjgn********** |
The ID of the SAG APP instance. |
UserName | String | Yes | doctest |
The username of the client account. Usernames of client accounts added to the same SAG APP instance are unique. For a client account, if you specify the username, you must also specify the password. |
Action | String | No | DescribeUserOnlineClients |
The operation that you want to perform. Set the value to DescribeUserOnlineClients. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 7108A98F-C47D-45F7-A4D8-C2E3022735DA |
The ID of the request. |
Users |
The information about the client. |
||
ClientIp | String | 10.**. **. ** |
The IP address of the client. |
OnlineTime | String | 1559125519 |
The time when the client was connected to Alibaba Cloud. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeUserOnlineClients
&RegionId=cn-shanghai
&SmartAGId=sag-wfjgn**********
&UserName=doctest
&<Common request parameters>
Sample success responses
XML
format
<DescribeUserOnlineClientsResponse>
<Users>
<User>
<OnlineTime>1559125519</OnlineTime>
<ClientIp>192.168.0.2</ClientIp>
</User>
</Users>
<RequestId>92B22889-5451-4A1D-9432-66ED5AB3DD04</RequestId>
</DescribeUserOnlineClientsResponse>
JSON
format
{
"Users":{
"User":[
{
"OnlineTime":"1559125519",
"ClientIp":"192.168.0.2"
}
]
},
"RequestId":"92B22889-5451-4A1D-9432-66ED5AB3DD04"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ClientUser.NameEmpty | You must specify UserName. | The error message returned because the username is not specified. |
400 | ClientUser.NameInvalid | The specified UserName is invalid. | The error message returned because the format of the username is invalid. |
400 | SAG.InstanceIdEmpty | You must specify the SAG instance ID. | The error message returned because the ID of the SAG instance is not specified. |
400 | SAG.InstanceNoFound | The specified SAG instance does not exist. | The error message returned because the specified SAG instance does not exist. |
For a list of error codes, visit the API Error Center.