最近更新时间:2021-11-05
ListPolicies
获取策略列表
| 名称 | 数据类型 | 示例 | 描述 | 是否必填 |
|---|---|---|---|---|
| Action | String | ListPolicies | 系统规定参数,取值:ListPolicies | Y |
createEnd | String | 1634250688000 | 策略创建截止时间(13位时间戳) | N |
| createStart | String | 1634250688000 | 策略创建开始时间(13位时间戳) | N |
page | Integer | 1 | 页码(page、size都不为空时,执行分页查询) | N |
| policyName | String | NASFullAccess | 策略名称/策略描述模糊查询 | N |
| size | Integer | 10 | 每页个数(page、size都不为空时,执行分页查询) | N |
| type | String | system/personal | 策略类型 | N |
| 名称 | 数据类型 | 示例 | 说明 |
|---|---|---|---|
| Page | Integer | 1 | 页码(仅分页查询时返回有效值,否则返回空值) |
| size | Integer | 10 | 每页数量(仅分页查询时返回有效值,否则返回空值) |
| totalCount | Integer | 10 | 总数量 |
| totalPages | Integer | null | 总页数(不展示总页数) |
| RequestId | String | 20057073-a99a-488c-9b0f-e** | 请求id |
| list | Array[PolicyVO] | 策略信息集合 |
PolicyVO详情:
| 名称 | 数据类型 | 示例 | 说明 |
|---|---|---|---|
| id | String | 48b1cb3a-8c31-46a7-aa31-*** | 策略id |
| name | String | NASFullAccess | 策略名称 |
| description | String | 文件存储管理策略(NAS) | 策略描述 |
| type | String | system | 策略类型 |
| policyDoc | String | {"Version":"1","Statement":[{"Effffect":"Allow","Action": ["nas:"],"Resource":""}]} | 策略json |
| createTime | String | 1634250688000 | 策略创建时间 |
http://api.unicloud.com/user/user? Action=ListPolicies&size=2&AccessKeyId=WqcP6swnn******&page=1&Signature=CPfyAdLtdZU**** ***
{
"list": [
{
"createTime": 1634250688000,
"description": "视联云编辑权限",
"policyDoc": "{\"Version\":\"1\",\"Statement\": [{\"Effect\":\"Allow\",\"Action\":[\"univms:*\",\"vms:*\"],\"Resource\":\"*\"}]}",
"name": "UnivmsFullAccess",
"id": "6431dee6-880c-45cf-*******",
"type": "system"
},
{
"createTime": 1634250607000,
"description": "视联云只读权限",
"policyDoc": "{\"Version\":\"1\",\"Statement\": [{\"Effect\":\"Deny\",\"Action\": [\"univms:Create*\",\"univms:Update*\",\"univms:Delete*\",\"univms:Set*\",\"univms:Remo ve*\",\"vms:Create*\",\"vms:Update*\",\"vms:Delete*\",\"vms:Set*\",\"vms:Remove*\",\"vm s:RecordPlanApplyToDevices\",\"univms:RecordPlanApplyToDevices\",\"vms:SnapshotApplyToD evices\",\"univms:SnapshotApplyToDevices\",\"vms:StartSnapshot*\",\"univms:StartSnapsho t*\",\"vms:StartCloudRecord*\",\"univms:StartCloudRecord*\"],\"Resource\":\"*\"}, {\"Effect\":\"Allow\",\"Action\":[\"univms:*\",\"vms:*\"],\"Resource\":\"*\"}]}",
"name": "UnivmsReadOnlyAccess",
"id": "56ea9144-8f57-4c26-b744-********",
"type": "system"
}
],
"size": 2,
"totalCount": 36,
"totalPages": null,
"page": 1,
"RequestId": "20057073-a99a-488c-9b0f-ecb422155642"
}
| 错误码 | 错误信息 | 状态码 | 错误描述 |
|---|---|---|---|
| OverMaxPageSize | Max available page size is 200, please check your param. | 400 | 页面最多展示200条数据 |
| OverMinPageSize | Min available page size is 1, please check your param. | 400 | 页面展示数量的取值最小为1 |
| InvalidParameter | PageError | 400 | 页面取值错误 |