1013
阿里云
使用RAM管理API__使用手册(开放API)_API 网关-阿里云
API网关结合阿里云访问控制(RAM)来实现企业内多职员分权管理API。API提供者可以为员工建立子账户,并控制不同职员负责不同的API管理。
- 使用RAM可以允许子帐号,查看、创建、管理、删除API分组、API、授权、流控策略等。但子帐号不是资源的所有者,其操作权限随时都可以被主帐号收回。
- 在查看本文前,请确保您已经祥读了《RAM帮助手册》和《API网关API手册》.
- 若您不无此业务场景, 请跳过此章节。
策略管理
授权策略(Policy),来描述授权的具体内容,授权内容主要包含效力(Effect)、资源(Resource)、对资源所授予的操作权限(Action)以及限制条件(Condition)这几个基本元素。
系统授权策略
API网关已经预置了两个系统权限,AliyunApiGatewayFullAccess和AliyunApiGatewayReadOnlyAccess,可以到RAM的在RAM控制台-策略管理进行查看。
- AliyunApiGatewayFullAccess:管理员权限,拥有主帐号下包含API分组、API、流控策略、应用等所有资源的管理权限。
- AliyunApiGatewayReadOnlyAccess:可以查看主帐号下包含API分组、API、流控策略、应用等所有资源,但不可以操作。
自定义授权策略
您可以根据需要自定义管理权限,支持更为精细化的授权,可以为某个操作,也可以是某个资源。如:API:GetUsers的编辑权限。可以在RAM控制台-策略管理-自定义授权策略查看已经定义好的“自定义授权”:自定义授权查看、创建、修改、删除方法请参照:《授权策略管理》
授权策略内容填写方法请参照:《Policy基本元素》和《Policy语法结构》和下文的授权策略。授权策略
授权策略是一组权限的集合,它以一种策略语言来描述。通过给用户或群组附加授权策略,用户或群组中的所有用户就能获得授权策略中指定的访问权限。
授权策略内容填写方法请参照:《Policy基本元素》和《Policy语法结构》。
示例:
{
"Version": "1",
"Statement": [
{
"Action": "apigateway:Describe*",
"Resource": "*",
"Effect": "Allow"
}
]
}
此示例表示:允许所有的查看操作
Action(操作名称列表)格式为:
"Action":"<service-name>:<action-name>"
其中:
- service-name为:阿里云产品名称,请填写apigateway
- action-name为:api接口名称,请参照下表
- 支持通配符“*”
"Action": "apigateway:Describe*"
表示所有的查询操作
" Action": "apigateway:*"
表示API网关所有操作
Resource(操作对象列表)
Resource通常指操作对象,API网关中的API分组、流控策略、应用都被称为Resource,书写格式:
acs:<service-name>:<region>:<account-id>:<relative-id>
其中:
- acs: Aliyun Cloud Service的首字母缩写,表示阿里云的公有云平台
- service-name为:阿里云产品名称,请填写apigateway
- region: 地区信息,可以使用通配符“”号来代替,“”表示所有区域
- account-id: 账号ID,比如 1234567890123456,也可以用“*”代替
- relative-id: 与API网关相关的资源描述部分,这部分的格式描述支持类似于一个文件路径的树状结构。
示例:
acs:apigateway:$regionid:$accountid:apigroup/$groupId
书写
acs:apigateway:*:$accountid:apigroup/
请结合API网关的《API手册》来查看下表
action-name | 资源(Resource) |
---|---|
AbolishApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
AddTrafficSpecialControl | acs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolid |
CreateApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
CreateApiGroup | acs:apigateway:$regionid:$accountid:apigroup/* |
CreateTrafficControl | acs:apigateway:$regionid:$accountid:trafficcontrol/* |
DeleteAllTrafficSpecialControl | acs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolid |
DeleteApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DeleteApiGroup | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DeleteDomain | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DeleteDomainCertificate | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DeleteTrafficControl | acs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolId |
DeleteTrafficSpecialControl | acs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolId |
DeployApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApiError | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApiGroupDetail | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApiGroups | acs:apigateway:$regionid:$accountid:apigroup/* |
DescribeApiLatency | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApiQps | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApiRules | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApis | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeApisByRule | acs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolId oracs:apigateway:$regionid:$accountid:secretkey/$secretKeyId |
DescribeApiTraffic | acs:apigateway:$regionid:$accountid:apigroup/$groupid |
DescribeAppsByApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
AddBlackList | acs:apigateway:$regionid:$accountid:blacklist/* |
DescribeBlackLists | acs:apigateway:$regionid:$accountid:blacklist/* |
DescribeDeployedApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeDeployedApis | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeDomain | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeDomainResolution | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeHistoryApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
DescribeHistoryApis | acs:apigateway:$regionid:$accountid:apigroup/* |
DescribeRulesByApi | acs:apigateway:$regionid:$accountid:group/$groupId |
DescribeSecretKeys | acs:apigateway:$regionid:$accountid:secretkey/* |
DescribeTrafficControls | acs:apigateway:$regionid:$accountid:trafficcontrol/* |
ModifyApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
ModifyApiGroup | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
ModifySecretKey | acs:apigateway:$regionid:$accountid:secretkey/$secretKeyId |
RecoverApiFromHistorical | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
RefreshDomain | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
RemoveAccessPermissionByApis | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
RemoveAccessPermissionByApps | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
RemoveAllBlackList | acs:apigateway:$regionid:$accountid:blacklist/* |
RemoveApiRule | acs:apigateway:$regionid:$accountid:apigroup/$groupId(acs:apigateway:$regionid:$accountid:secretkey/$secretKeyId oracs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolId) |
RemoveAppsFromApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
RemoveBlackList | acs:apigateway:$regionid:$accountid:blacklist/$blacklistid |
SetAccessPermissionByApis | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
SetAccessPermissions | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
SetApiRule | acs:apigateway:$regionid:$accountid:apigroup/$groupId(acs:apigateway:$regionid:$accountid:secretkey/$secretKeyId oracs:apigateway:$regionid:$accountid:trafficcontrol/$trafficcontrolId) |
SetDomain | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
SetDomainCertificate | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
SwitchApi | acs:apigateway:$regionid:$accountid:apigroup/$groupId |
CreateSecretKey | acs:apigateway:$regionid:$accountid:secretkey/* |
DeleteSecretKey | acs:apigateway:$regionid:$accountid:secretkey/$secretKeyId |
最后更新:2016-12-06 14:07:00
上一篇:
OpenID Connect认证__使用手册(开放API)_API 网关-阿里云
下一篇:
创建API分组__快速入门(开放API)_API 网关-阿里云
付费模式转换__购买指南_数据传输-阿里云
编写Graph__快速开始_大数据计算服务-阿里云
kafka用户迁移__常见问题_日志服务-阿里云
修改共享带宽包-减少公网IP__NAT网关相关接口_API 参考_云服务器 ECS-阿里云
推荐引擎__数加产品概览_数加平台介绍-阿里云
云数据库 MongoDB 版__云服务监控_用户指南_云监控-阿里云
SetLoadBalancerName__LoadBalancer相关API_API 参考_负载均衡-阿里云
格式转换___图片处理指南_对象存储 OSS-阿里云
SSH 登录时出现如下错误:ssh_exchange_identification: read: Connection reset by peer__远程登录 (SSH)_Linux操作运维问题_云服务器 ECS-阿里云
步骤4:修改DNS解析(可选)__快速入门(非网站业务)_DDoS 高防IP-阿里云
相关内容
常见错误说明__附录_大数据计算服务-阿里云
发送短信接口__API使用手册_短信服务-阿里云
接口文档__Android_安全组件教程_移动安全-阿里云
运营商错误码(联通)__常见问题_短信服务-阿里云
设置短信模板__使用手册_短信服务-阿里云
OSS 权限问题及排查__常见错误及排除_最佳实践_对象存储 OSS-阿里云
消息通知__操作指南_批量计算-阿里云
设备端快速接入(MQTT)__快速开始_阿里云物联网套件-阿里云
查询API调用流量数据__API管理相关接口_API_API 网关-阿里云
使用STS访问__JavaScript-SDK_SDK 参考_对象存储 OSS-阿里云