查询全局服务中的用户组权限
调试
您可以在API Explorer中调试该接口。
URI
GET /v3/domains/{domain_id}/groups/{group_id}/roles
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
domain_id |
是 |
String |
用户组所属账号ID,获取方式请参见:获取账号、IAM用户、项目、用户组、区域、委托的名称和ID。 |
|
group_id |
是 |
String |
用户组ID,获取方式请参见:获取账号、IAM用户、项目、用户组、区域、委托的名称和ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
该字段内容填为“application/json;charset=utf8”。 |
|
X-Auth-Token |
是 |
String |
访问令牌,承载用户的身份、权限等信息。 token所需权限请参见授权项。 |
响应参数
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
self |
String |
资源链接。 |
|
previous |
String |
前一个邻接资源链接地址,不存在时为null。 |
|
next |
String |
后一个邻接资源链接地址,不存在时为null。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
domain_id |
String |
权限所属账号ID。 |
|
flag |
String |
该参数值为fine_grained时,标识此权限为系统内置的策略。 |
|
description_cn |
String |
权限的中文描述信息。仅在创建时中传入了description_cn参数,响应体中才会返回此字段。 |
|
catalog |
String |
权限所在目录。 |
|
name |
String |
系统内部呈现的权限名称。如云目录服务CCS普通用户权限CCS User的name为ccs_user。 携带在用户的token中,云服务根据该名称来判断用户是否有权限访问。 |
|
description |
String |
权限描述信息。 |
|
Object |
权限的资源链接信息。 |
|
|
id |
String |
权限ID。 |
|
display_name |
String |
权限名称。 |
|
type |
String |
权限的显示模式。
说明:
|
|
Object |
权限的具体内容。 |
|
|
updated_time |
String |
权限更新时间。
说明:
UNIX时间戳格式,单位是毫秒,时间戳格式如:1687913793000。 |
|
created_time |
String |
权限创建时间。
说明:
UNIX时间戳格式,单位是毫秒,时间戳格式如:1687913793000。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
self |
String |
资源链接地址。 |
|
previous |
String |
前一邻接资源链接地址,不存在时为null。 |
|
next |
String |
后一邻接资源链接地址,不存在时为null。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
Array of objects |
该权限所依赖的权限。 |
|
|
Array of objects |
授权语句,描述权限的具体内容。 |
|
|
Version |
String |
权限版本号。
说明:
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
Action |
Array of strings |
授权项,指对资源的具体操作权限。支持的授权项请参考各云服务《API参考》中“权限和授权项”章节。
说明:
|
|
Effect |
String |
作用。包含两种:允许(Allow)和拒绝(Deny),既有Allow又有Deny的授权语句时,遵循Deny优先的原则。 取值范围:
|
|
Condition |
Object |
限制条件。如果创建此策略未传入此字段,则返回结果中也无此字段。
说明:
以请求示例中的Condition为例:条件键(obs:prefix)和字符串(public)需相等(StringEquals)。 "Condition": {
"StringEquals": {
"obs:prefix": [
"public"
]
}
}
|
|
Resource |
Object |
资源,如果创建此策略时未传入此字段,则返回结果中也无此字段。规则如下:
说明:
|
请求示例
查询全局服务中的用户组权限。
GET https://iam.myhuaweicloud.com/v3/domains/{domain_id}/groups/{group_id}/roles
响应示例
状态码为 200 时:
请求成功。
{
"roles": [
{
"domain_id": null,
"flag": "fine_grained",
"description_cn": "查询域名信息",
"catalog": "CDN",
"name": "system_all_11",
"description": "Allow Query Domains",
"links": {
"next": null,
"previous": null,
"self": "https://iam.myhuaweicloud.com/v3/roles/db4259cce0ce47c9903dfdc195eb453b"
},
"id": "db4259cce0ce47c9903dfdc195eb453b",
"display_name": "CDN Domain Viewer",
"type": "AX",
"policy": {
"Version": "1.1",
"Statement": [
{
"Action": [
"cdn:configuration:queryDomains",
"cdn:configuration:queryOriginServerInfo",
"cdn:configuration:queryOriginConfInfo",
"cdn:configuration:queryHttpsConf",
"cdn:configuration:queryCacheRule",
"cdn:configuration:queryReferConf",
"cdn:configuration:queryChargeMode",
"cdn:configuration:queryCacheHistoryTask",
"cdn:configuration:queryIpAcl",
"cdn:configuration:queryResponseHeaderList"
],
"Effect": "Allow"
}
]
}
}
],
"links": {
"next": null,
"previous": null,
"self": "https://iam.myhuaweicloud.com/v3/domains/d78cbac186b744899480f25bd022f468/groups/077d71374b8025173f61c003ea0a11ac/roles"
}
}
返回值
|
返回值 |
描述 |
|---|---|
|
200 |
请求成功。 |
|
400 |
参数无效。 |
|
401 |
认证失败。 |
|
403 |
没有操作权限。 |
|
404 |
未找到相应的资源。 |
错误码
无