文档首页> 统一身份认证服务 IAM> API参考(吉隆坡区域)> API> 委托管理> 查询委托在租户上具有的权限列表
更新时间:2022-08-16 GMT+08:00

查询委托在租户上具有的权限列表

功能介绍

该接口用来查询委托在租户上具有的权限列表。

URI

  • URI格式

    GET /v3.0/OS-AGENCY/domains/{domain_id}/agencies/{agency_id}/roles

  • URI参数说明

    参数

    是否为必选

    类型

    说明

    domain_id

    String

    当前租户的ID。

    agency_id

    String

    委托的ID。

请求消息

  • Request Header参数说明

    参数

    是否为必选

    类型

    说明

    Content-Type

    String

    该字段内容填为“application/json;charset=utf8”

    X-Auth-Token

    String

    已认证的拥有Security Administrator权限的token。

  • 请求样例
    curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X GET https:///v3.0/OS-AGENCY/domains/b32d99a7778d4fd9aa5bc616c3dc4e5f/agencies/37f90258b820472bbc8a0f4f0bfd720d/roles

响应消息

  • Response Body参数说明

    参数

    是否为必选

    类型

    说明

    roles

    Array

    role的列表。

  • role格式说明

    参数

    是否为必选

    类型

    说明

    catalog

    String

    role所在的目录。

    display_name

    String

    role所展示名称。

    name

    String

    role的名称。

    policy

    Dict

    role的具体策略。

    domain_id

    String

    role所属的租户的ID。

    type

    String

    role的显示模式,其中:

    • AX表示在domain层显示
    • XA表示在project层显示
    • AA表示在domain和project层均显示
    • XX表示在domain和project层均不显示

    id

    String

    role的ID。

    description

    String

    role的描述。

  • 响应样例(请求成功)
    {
      "roles": [
        {
          "catalog": "BASE",
          "display_name": "Tenant Guest",
          "name": "readonly",
          "policy": {
            "Version": "1.0",
            "Statement": [
              {
                "Action": [
                  "::Get",
                  "::List"
                ],
                "Effect": "Allow"
              },
              {
                "Action": [
                  "identity:*"
                ],
                "Effect": "Deny"
              }
            ]
          },
          "domain_id": null,
          "type": "AA",
          "id": "b32d99a7778d4fd9aa5bc616c3dc4e5f",
          "description": "Tenant Guest"
        }
      ]
    }
  • 响应样例(请求失败)
    {
      "error": {
        "message": "You are not authorized to perform the requested action: identity:list_domain_grants",
        "code": 403,
        "title": "Forbidden"
      }
    }

状态码

状态码

说明

200

请求成功。

401

认证失败。

403

鉴权失败。

404

未找到相应的资源。

500

内部服务错误。