You need to enable JavaScript to run this app.
导航
ListUsers
最近更新时间:2025.05.23 17:57:32首次发布时间:2023.12.15 10:45:22
我的收藏
有用
有用
无用
无用

查询用户列表,可根据分页及用户来源、用户状态等筛选条件查询符合要求的云堡垒机用户列表,并且能够按字段进行排序。

请求说明

  • 请求方式:POST
  • 请求地址:https://vbh.{RegionID}.volcengineapi.com/?Action=ListUsers&Version=2021-06-01

请求参数

参数类型是否必选示例值描述
ActionStringListUsers接口名称。当前 API 的名称为 ListUsers
VersionString2021-06-01接口版本。当前 API 的版本为 2021-06-01
PageNumberInteger1分页查询时的起始页码,从 1 开始,默认为 1。

PageSize

Integer

10

分页查询时每页显示的记录数。

  • 最小值:1
  • 最大值:100
  • 默认值:10
FilterObject of ListUsersFilter{"Status": ["Enabled"]}筛选条件。
OrderByObject of OrderBy{"Key": "Name", "Desc": true}排序规则。Key 指定排序字段,Desc 指定是否根据该字段降序排列。
InstanceIdStringvbh-14****0042-8kcrs*****云堡垒机实例 ID。

ListUsersFilter

参数类型是否必选示例值描述
StatusArray of String["Locked", "Expired", "Enabled", "Disabled"]用户状态筛选
KeywordStringkeyword模糊搜索
UserIdsArray of String["user1 id", "user2 id"]用户 id 筛选
AuthPathArray of StringPlatform用户来源筛选

OrderBy

参数类型是否必选示例值描述
KeyStringkey字段
DescBooleantrue or false倒序

请求示例

POST https://vbh.{RegionID}.volcengineapi.com/?Action=ListUsers&Version=2021-06-01
Content-Type: application/json
{
    "PageNumber": 1,
    "PageSize": 10,
    "Filter": {
        "AuthPath": "Platform",
        "Status": [
            "Locked"
        ],
        "UserIds": [
            "afc****c-c11d-11ec-9ab6-8e6******599"
        ],
        "Keyword": "John"
    },
    "OrderBy": {
        "Key": "Name",
        "Desc": true
    },
    "InstanceId": "vbh-14****0042-8****rzg"
}

返回参数

参数类型示例值描述
ItemsArray of UserV2[{"UserName":"hzb","DisplayName":"","Phone":"","Email":"","AuthPath":"Platform","Password":"*","Enable":true,"FullTime":true,"StartTime":"2022-09-08 18:44:53","EndTime":"2022-09-08 18:44:53","Status":"Enabled","IsExpired":false,"IamId":417192,"IamAccountId":1400000042,"InstanceId":"vbh-1400000042-wxvqsx9f","CreateTime":"2022-09-08 18:44:53","UpdateTime":"2022-09-08 18:44:53","CreatedBy":"hzb","UserId":"556ee633-d9b9-487c-8f38-560d63ce3db2"}]用户信息列表。
TotalCountLong20返回数据列表的总量。
PageNumberInteger1当前页数。
PageSizeInteger10每页显示的数量。

UserV2

参数类型示例值描述
UserNameStringuser用户名称
DisplayNameStringuser显示名称
PhoneString11111111111用户电话
EmailStringuser用户邮箱
AuthPathStringPlatform用户来源
PasswordStringpassword堡垒机密码
EnableBooleantrue or false是否启用
FullTimeBooleantrue or false是否全时段可登录
StartTimeString2022-12-12 12:12:12"有效登录起始时间
EndTimeString2022-12-12 12:12:12"有效登录结束时间
StatusStringEnabled" or "Expired用户状态
IsExpiredBooleantrue or false是否过期
IamIdLong333IAM ID
IamAccountIdLong333IAMAccountID
InstanceIdString222堡垒机 ID
CreateTimeString2022-03-01 12:12:12创建时间
UpdateTimeString2022-03-01 12:12:12修改时间
CreatedByStringusername创建人
UserIdStringuser id用户 Id

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202211302208****",
        "Action": "ListUsers",
        "Version": "2021-06-01",
        "Service": "vbh",
        "Region": "cn-beijing"
    },
    "Result": {
        "Items": [
            {
                "UserName": "John",
                "DisplayName": "John",
                "Phone": "137****3489",
                "Email": "john@example.com",
                "AuthPath": "Platform",
                "Password": "Password11@",
                "Enable": true,
                "FullTime": true,
                "StartTime": "2022-12-12 12:12:12",
                "EndTime": "2022-12-12 12:12:12",
                "Status": "Enabled",
                "IsExpired": true,
                "IamId": 31**82,
                "IamAccountId": 14****0042,
                "InstanceId": "vbh-14****0042-8****rzg",
                "CreateTime": "2022-03-01 12:12:12",
                "UpdateTime": "2022-03-01 12:12:12",
                "CreatedBy": "John",
                "UserId": "8a5c****-c489-11ec-b5a4-3e3*****a490"
            }
        ],
        "TotalCount": 22,
        "PageNumber": 2,
        "PageSize": 33
    }
}

错误码

当前接口暂无独立错误码,若接口调用返回异常,可参考 公共错误码 进行故障排查。