ListRamUsers
Retrieves a list of Resource Access Management (RAM) users that have not been imported into the specified instance.
Operation description
A Resource Access Management (RAM) user can be imported as an agent into multiple instances, but an agent can be mapped to only one RAM user. When you create an agent under an instance, a RAM user is actually created. If you want to create a new instance without creating redundant RAM users, you can call the ListRamUsers operation to retrieve the list of RAM users that have not been imported into the instance, and then call the operation for importing RAM users to import them into the instance. This prevents the creation of excessive RAM users and avoids resource waste.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
ccc-test |
| SearchPattern |
string |
No |
The search pattern for fuzzy matching based on the agent logon name or display name. This parameter is optional. Default value: empty. An empty value indicates that no filtering is applied. |
agent |
| PageNumber |
integer |
Yes |
The page number. Valid values: 1 to 1000. |
1 |
| PageSize |
integer |
Yes |
The number of entries per page. Valid values: 1 to 100. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The response code. |
OK |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
None |
| RequestId |
string |
The request ID. |
24753D71-C91D-1A38-A8AD-372BF12453F6 |
| Data |
object |
The data. |
|
| PageNumber |
integer |
The page number. Valid values: 1 to 1000. |
1 |
| PageSize |
integer |
The number of entries per page. Valid values: 1 to 100. |
10 |
| TotalCount |
integer |
The total number of entries. |
100 |
| List |
array<object> |
The list of Resource Access Management (RAM) users. |
|
|
object |
The Resource Access Management (RAM) user. |
||
| DisplayName |
string |
The display name of the RAM user. |
Test account |
|
string |
The email address. |
username@example.com |
|
| LoginName |
string |
The username of the Resource Access Management (RAM) user. |
agent |
| Mobile |
string |
The personal phone number reserved for the RAM user. |
1382114**** |
| AliyunUid |
integer |
The UID of the Alibaba Cloud account to which the RAM user belongs. |
15772400000**** |
| Primary |
boolean |
Indicates whether the Resource Access Management (RAM) users are primary accounts. |
false |
| RamId |
string |
The UID of the Resource Access Management (RAM) user. |
28036411123456**** |
| Params |
array |
The list of error parameters. |
["ParameterName"] |
|
string |
The response parameter. |
None |
Examples
Success response
JSON format
{
"Code": "OK",
"HttpStatusCode": 200,
"Message": "无",
"RequestId": "24753D71-C91D-1A38-A8AD-372BF12453F6",
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 100,
"List": [
{
"DisplayName": "测试账号",
"Email": "username@example.com",
"LoginName": "agent",
"Mobile": "1382114****",
"AliyunUid": 0,
"Primary": false,
"RamId": "28036411123456****"
}
]
},
"Params": [
"无"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Parameter.Maximum | The parameter %s must be less than or equal to %s. | The parameter must be less than or equal to the maximum value defined by the system. |
| 400 | Parameter.Minimum | The parameter %s must be greater than or equal to %s. | The parameter must be greater than or equal to the minimum value defined by the system. |
| 404 | NotExists.InstanceId | The specified instance %s does not exist. | The specified call center instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.