获取指定实例的命令控制策略列表,可根据策略名称关键字查询云堡垒机的命令控制策略列表,并且能够按字段进行排序。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListCommandControlPolicies | 接口名称。当前 API 的名称为 ListCommandControlPolicies 。 |
Version | String | 是 | 2021-06-01 | 接口版本。当前 API 的版本为 2021-06-01 。 |
PageNumber | Integer | 否 | 1 | 分页查询时的起始页码,从 1 开始,默认为 1。 |
PageSize | Integer | 否 | 10 | 分页查询时每页显示的记录数。
|
Filter | Object of PolicyFilter | 否 | 模糊查询参数。 | |
InstanceId | String | 是 | vbh-14****0042-m2bkmjcc | 云堡垒机实例 ID。 |
OrderBy | Object of OrderBy | 否 | {"Key": "some key", "Desc": true} | 排序条件。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Keyword | String | 否 | test | 模糊查询参数名称 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Key | String | 否 | key | 字段 |
Desc | Boolean | 否 | true or false | 倒序 |
POST https://vbh.{RegionID}.volcengineapi.com/?Action=ListCommandControlPolicies&Version=2021-06-01 Content-Type: application/json { "PageNumber": 1, "PageSize": 10, "Filter": { "Keyword": "policy" }, "InstanceId": "vbh-14****0042-m2bkmjcc", "OrderBy": { "Key": "Name", "Desc": true } }
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Items | Array of CommandControlPolicy | [{"Id": "id", "CreatedAt": "2022-12-12 22:22:22", "UpdatedAt": "2022-12-12 22:22:22", "Name": "test", "Description": "desc", "Priority": 1, "Kind": 1, "Commands": ["ls"], "InstanceId": "vbh-1400000042-m2bkmjcc", "UserCount": 1, "UserGroupCount": 1}] | 策略列表 |
TotalCount | Long | 2 | 返回数据列表的总量。 |
PageNumber | Integer | 1 | 当前页数。 |
PageSize | Integer | 10 | 每页显示的数量。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | id | ID |
Kind | Integer | 1 | 类型 |
Name | String | test | 策略名称 |
Commands | Array of String | ["ls"] | 命令列表 |
Priority | Integer | 1 | 优先级 |
CreatedAt | String | 2022-12-12 22:22:22 | 创建时间 |
UpdatedAt | String | 2022-12-12 22:22:22 | 修改时间 |
UserCount | Integer | 2 | 关联用户数量 |
InstanceId | String | vbh-1400000042-m2bkmjcc | 关联堡垒机Id |
Description | String | description | 策略描述 |
UserGroupCount | Integer | 2 | 关联用户组数量 |
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "202211302208****", "Action": "ListCommandControlPolicies", "Version": "2021-06-01", "Service": "vbh", "Region": "cn-beijing" }, "Result": { "Items": [ { "Id": "7f****fc-c0b7-11ec-b792-e*****1bf10a", "CreatedAt": "2023-09-12 10:34:30", "UpdatedAt": "2023-09-12 10:34:30", "Name": "policy", "Description": "This is description", "Priority": , "Kind": 1, "Commands": ["ls"], "InstanceId": "vbh-14****0042-wdk****z", "UserCount": 2, "UserGroupCount": 2 } ], "TotalCount": 2, "PageNumber": 1, "PageSize": 10 } }
当前接口暂无独立错误码,若接口调用返回异常,可参考 公共错误码 进行故障排查。