文档目录

查询访问控制策略组(QueryAccessControlList)

API请求

URLs
GET zstack/v1/access-control-lists
GET zstack/v1/access-control-lists/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/access-control-lists
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/access-control-lists/83146a1d0dd93c6abc53788a6434bd57

可查询字段

运行CLI命令行工具,输入QueryAccessControlList并按Tab键查看所有可查询字段以及可跨表查询的资源名。

API返回

返回示例
{
  "inventories": [
    {
      "uuid": "0abdbd20b8173ccf89f881309b5e40d0",
      "name": "acl-group"
    }
  ]
}
名字 类型 描述 起始版本
error ErrorCode 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error 3.9.0
inventories List 详情参考inventories 3.9.0
#error
名字 类型 描述 起始版本
code String 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 3.9.0
description String 错误的概要描述 3.9.0
details String 错误的详细信息 3.9.0
elaboration String 保留字段,默认为null 3.9.0
opaque LinkedHashMap 保留字段,默认为null 3.9.0
cause ErrorCode 根错误,引发当前错误的源错误,若无原错误,该字段为null 3.9.0
#inventories
名字 类型 描述 起始版本
uuid String 资源的UUID,唯一标示该资源 3.9.0
name String 资源名称 3.9.0
ipVersion Integer IP地址版本 3.9.0
description String 资源的详细描述 3.9.0
createDate Timestamp 创建时间 3.9.0
lastOpDate Timestamp 最后一次修改时间 3.9.0
entries List 详情参考entries 3.9.0
#entries
名字 类型 描述 起始版本
uuid String 资源的UUID,唯一标示该资源 3.9.0
aclUuid String 访问控制策略组的唯一标识 3.9.0
ipEntries String IP组 3.9.0
description String 资源的详细描述 3.9.0
createDate Timestamp 创建时间 3.9.0
lastOpDate Timestamp 最后一次修改时间 3.9.0

SDK示例

Java SDK
QueryAccessControlListAction action = new QueryAccessControlListAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryAccessControlListAction.Result res = action.call();
Python SDK
QueryAccessControlListAction action = QueryAccessControlListAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryAccessControlListAction.Result res = action.call()
开发手册 | 5.4.12 | ZStack Cloud · ZCF | ZStack 资源中心