访问控制
根据用户登录名查询该用户已关联的权限策略列表
单用户调用频率:30/5min
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*Accept-LanguageString |
参数名称 | 描述 |
---|---|
*loginNameString | 用户登录名(可传主子用户) |
参数名称 | 描述 |
---|---|
code | 请求结果状态码 |
message | 请求结果信息 |
policyId | 策略id |
policyName | 策略名称 |
policyDescribe | 国际化策略描述 |
languageCode | 语言类型 |
languageValue | 策略描述内容 |
policyType | 策略类型:system:系统策略、custom自定义策略 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
24192000 | Param is null or invalid. | 200 | 入参为空或非法 |
24192202 | Account is not exist | 200 | 账号不存在 |
24192210 | The account in the parameter cannot be managed by api | 200 | 传入的账号暂不支持使用接口管理 |
24192210 | The current account type does not support calling this api | 200 | 当前账号类型不支持调用该接口 |
24191001 | The operator/loginName does not have the operating authority. | 200 | 操作人无权限操作 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/user/policy-attached/<loginName>" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Accept-Language::zh_CN" \
{ "msg":"success", "code":"0", "data":[ { "policyId":23639, "policyName":"glntest2222", "policyType":"CUSTOM", "policyDescribe":"testLanguage" }, { "policyId":10, "policyName":"ActionReadOnly", "policyType":"SYSTEM", "policyDescribe":"ActionReadOnly" }, { "policyId":11, "policyName":"ResourceReadOnly", "policyType":"SYSTEM", "policyDescribe":"ResourceReadOnly" }, { "policyId":108, "policyName":"ReadOnlyAccess", "policyType":"SYSTEM", "policyDescribe":"" } ], "requestId":"eb7b67f3-d408-48dd" }