获取角色列表

最近更新时间:2020-02-19 16:59:08

我的收藏
1. 接口描述 本接口(DescribeRoleList)用于获取指定角色的详细信息。 请求域名:cam.api.qcloud.com
2. 输入参数 以下请求参数列表仅列出了接口请求参数,未列出公共请求参数
字段
是否必选
类型
描述
page
int
页码,从 1 开始
rp
int
每页大小,不能大于 200
3. 输出参数
字段
类型
描述
totalNum
int
该 owner 下的角色总数
list
array
角色列表
list 字段中每个角色展示如下信息 :
字段
类型
描述
roleId
string
角色 ID
roleName
string
角色名
policyDocument
string
角色信任策略
description
string
角色描述
addTime
string
角色创建时间
updateTime
string
角色最近修改时间
4. 示例 输入
https://cam.api.qcloud.com/v2/index.php?Action=DescribeRoleList&page=1&rp=10&<公共请求参数>
输出
{
"code": 0,
"message": "",
"codeDesc": "Success",
"data": {
"totalNum": 2,
"list": [
{
"roleId": "4611686018427397919",
"roleName": "testroleName001",
"policyDocument": "{\"version\":\"2.0\",\"statement\":[{\"action\":\"name/sts:AssumeRole\",\"effect\":\"allow\",\"principal\":{\"qcs\":[\"qcs::cam::uin/888888888:root\"]}}]}",
"description": "",
"addTime": "2017-09-26 11:02:21",
"updateTime": "2017-09-26 11:02:21"
},
{
"roleId": "4611686018427397919",
"roleName": "testroleName002",
"policyDocument": "{\"version\":\"2.0\",\"statement\":[{\"action\":\"name/sts:AssumeRole\",\"effect\":\"allow\",\"principal\":{\"qcs\":[\"qcs::cam::uin/12345678:root\"]}}]}",
"description": "",
"addTime": "2017-09-25 15:19:29",
"updateTime": "2017-09-25 15:19:29"
}
]
}
}