企业路由器 ER
Organizations服务中的服务控制策略(Service Control Policy,以下简称SCP)可以使用以下授权项元素设置访问控制策略。
SCP不直接进行授权,只划定权限边界。将SCP绑定到组织单元或者成员账号时,并没有直接对组织单元或成员账号授予操作权限,而是规定了成员账号或组织单元包含的成员账号的授权范围。
本章节介绍组织服务中SCP使用的元素,这些元素包含了操作(Action)、资源(Resource)和条件(Condition)。
如何使用这些元素编辑SCP自定义策略,请参考创建SCP。
操作(Action)
操作(Action)即为策略中支持的授权项。
- “访问级别”列描述如何对操作进行分类(list、read和write等)。此分类可帮助您了解在策略中相应操作对应的访问级别。
- “资源类型”列指每个操作是否支持资源级权限。
- 资源类型支持通配符号*表示所有。如果此列没有值(-),则必须在策略语句的Resource元素中指定所有资源类型(“*”)。
- 如果该列包含资源类型,则必须在具有该操作的语句中指定该资源的URN。
- 资源类型列中必需资源在表中用星号(*)标识,表示使用此操作必须指定该资源类型。
关于er定义的资源类型的详细信息请参见资源类型(Resource)。
- “条件键”列包括了可以在策略语句的Condition元素中支持指定的键值。
- 如果该授权项资源类型列存在值,则表示条件键仅对列举的资源类型生效。
- 如果该授权项资源类型列没有值(-),则表示条件键对整个授权项生效。
- 如果此列条件键没有值(-),表示此操作不支持指定条件键。
关于er定义的条件键的详细信息请参见条件(Condition)。
您可以在SCP语句的Action元素中指定以下er的相关操作。
授权项 |
描述 |
访问级别 |
资源类型(*为必须) |
条件键 |
别名 |
---|---|---|---|---|---|
er:instances:get |
授予查询实例详情权限。 |
read |
instances * |
|
- |
er:instances:create |
授予创建实例权限。 |
write |
instances * |
g:EnterpriseProjectId |
- |
- |
|
||||
er:instances:list |
授予查询实例列表权限。 |
list |
instances * |
- |
- |
er:instances:update |
授予更新实例权限。 |
write |
instances * |
|
- |
er:instances:delete |
授予删除实例权限。 |
write |
instances * |
|
- |
er:instances:createVpcAttachment |
授予创建VPC连接权限。 |
write |
instances * |
|
er:attachments:create |
er:instances:showVpcAttachment |
授予查询VPC连接详情权限。 |
read |
instances * |
|
er:attachments:get |
er:instances:listVpcAttachments |
授予查询VPC连接列表权限。 |
list |
instances * |
- |
er:attachments:list |
er:instances:updateVpcAttachment |
授予更新VPC连接权限。 |
write |
instances * |
|
er:attachments:update |
er:instances:deleteVpcAttachment |
授予删除VPC连接权限。 |
write |
instances * |
|
er:attachments:delete |
er:commonAttachments:get |
授予查询连接详情权限。 |
read |
attachments * |
|
er:attachments:get |
er:commonAttachments:list |
授予查询连接列表权限。 |
list |
attachments * |
- |
er:attachments:list |
er:commonAttachments:update |
授予更新连接权限。 |
write |
attachments * |
|
er:attachments:update |
er:routeTables:get |
授予查询路由表详情权限。 |
read |
routeTables * |
|
- |
er:routeTables:create |
授予创建路由表权限。 |
write |
routeTables * |
- |
- |
instances * |
|
||||
- |
|
||||
er:routeTables:list |
授予查询路由表列表权限。 |
list |
routeTables * |
- |
- |
er:routeTables:update |
授予更新路由表权限。 |
write |
routeTables * |
|
- |
er:routeTables:delete |
授予删除路由表权限。 |
write |
routeTables * |
|
- |
er:routeTables:associate |
授予将连接和路由表关联的权限。 |
write |
routeTables * |
|
er:associations:associate |
attachments * |
|
||||
er:routeTables:disassociate |
授予解除连接和路由表关联的权限。 |
write |
routeTables * |
|
er:associations:disassociate |
attachments * |
|
||||
er:routeTables:listAssociations |
授予查询关联列表的权限。 |
list |
routeTables * |
|
er:associations:list |
er:routeTables:enablePropagation |
授予允许连接将路由传播到传播路由表的权限。 |
write |
routeTables * |
|
er:propagations:enable |
attachments * |
|
||||
er:routeTables:disablePropagation |
授予禁止连接将路由传播到指定传播路由表的权限。 |
write |
routeTables * |
|
er:propagations:disable |
attachments * |
|
||||
er:routeTables:listPropagations |
授予查询传播列表的权限。 |
list |
routeTables * |
|
er:propagations:list |
er:staticRoutes:list |
授予查询静态路由列表的权限。 |
list |
routeTables * |
|
er:routes:list |
er:staticRoutes:create |
授予创建静态路由的权限。 |
write |
routeTables * |
|
er:routes:create |
attachments |
|
||||
er:effectiveRoutes:list |
授予查询有效路由列表的权限。 |
list |
routeTables * |
|
er:routes:list |
er:staticRoutes:delete |
授予删除静态路由的权限。 |
write |
routeTables * |
|
er:routes:delete |
er:staticRoutes:update |
授予更新静态路由的权限。 |
write |
routeTables * |
|
er:routes:update |
attachments |
|
||||
er:staticRoutes:get |
授予查询静态路由的权限。 |
read |
routeTables * |
|
er:routes:get |
er:tags:singleCreate |
授予创建资源标签的权限。 |
write |
routeTables |
|
er:tags:create |
instances |
|
||||
attachments |
|
||||
er:tags:delete |
授予删除资源标签的权限。 |
write |
routeTables |
|
- |
instances |
|
||||
attachments |
|
||||
er:tags:batchOperation |
授予批量创建资源标签的权限。 |
write |
routeTables |
|
er:tags:create |
instances |
|
||||
attachments |
|
||||
er:tags:get |
授予查询特定资源的标签的权限。 |
read |
routeTables |
|
- |
instances |
|
||||
attachments |
|
||||
er:tags:list |
授予查询资源标签列表的权限。 |
list |
- |
- |
- |
er:quotas:list |
授予查询资源配额的权限。 |
list |
- |
- |
- |
er:flowLogs:create |
授予创建流日志的权限。 |
write |
instances * |
|
- |
attachments * |
|
||||
flowLogs * |
- |
||||
er:flowLogs:list |
授予查询流日志列表的权限。 |
list |
flowLogs * |
- |
- |
er:flowLogs:get |
授予查询流日志的权限。 |
read |
flowLogs * |
- |
- |
er:flowLogs:update |
授予更新流日志的权限。 |
write |
flowLogs * |
- |
- |
er:flowLogs:delete |
授予删除流日志的权限。 |
write |
flowLogs * |
- |
- |
er:flowLogs:enable |
授予开启流日志的权限。 |
write |
flowLogs * |
- |
- |
er:flowLogs:disable |
授予关闭流日志的权限。 |
write |
flowLogs * |
- |
- |
er的API通常对应着一个或多个授权项。表2展示了API与授权项的关系,以及该API需要依赖的授权项。
API |
对应的授权项 |
依赖的授权项 |
---|---|---|
POST /v3/{project_id}/enterprise-router/instances |
er:instances:create |
- |
PUT /v3/{project_id}/enterprise-router/instances/{er_id} |
er:instances:update |
- |
GET /v3/{project_id}/enterprise-router/instances/{er_id} |
er:instances:get |
- |
GET /v3/{project_id}/enterprise-router/instances |
er:instances:list |
- |
DELETE /v3/{project_id}/enterprise-router/instances/{er_id} |
er:instances:delete |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/vpc-attachments |
er:instances:createVpcAttachment |
- |
PUT /v3/{project_id}/enterprise-router/{er_id}/vpc-attachments/{vpc_attachment_id} |
er:instances:updateVpcAttachment |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/vpc-attachments/{vpc_attachment_id} |
er:instances:showVpcAttachment |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/vpc-attachments |
er:instances:listVpcAttachments |
- |
DELETE /v3/{project_id}/enterprise-router/{er_id}/vpc-attachments/{vpc_attachment_id} |
er:instances:deleteVpcAttachment |
- |
PUT /v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id} |
er:commonAttachments:update |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id} |
er:commonAttachments:get |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/attachments |
er:commonAttachments:list |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/route-tables |
er:routeTables:create |
- |
PUT /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id} |
er:routeTables:update |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id} |
er:routeTables:get |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/route-tables |
er:routeTables:list |
- |
DELETE /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id} |
er:routeTables:delete |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/associate |
er:routeTables:associate |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/associations |
er:routeTables:listAssociations |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/disassociate |
er:routeTables:disassociate |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/enable-propagations |
er:routeTables:enablePropagation |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/propagations |
er:routeTables:listPropagations |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/route-tables/{route_table_id}/disable-propagations |
er:routeTables:disablePropagation |
- |
POST /v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes |
er:staticRoutes:create |
- |
PUT /v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes/{route_id} |
er:staticRoutes:update |
- |
GET /v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes/{route_id} |
er:staticRoutes:get |
- |
GET /v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes |
er:staticRoutes:list |
- |
GET /v3/{project_id}/enterprise-router/route-tables/{route_table_id}/routes |
er:effectiveRoutes:list |
- |
DELETE /v3/{project_id}/enterprise-router/route-tables/{route_table_id}/static-routes/{route_id} |
er:staticRoutes:delete |
- |
GET /v3/{project_id}/{resource_type}/tags |
er:tags:list |
- |
GET /v3/{project_id}/{resource_type}/{resource_id}/tags |
er:tags:get |
- |
POST /v3/{project_id}/{resource_type}/{resource_id}/tags |
er:tags:singleCreate |
- |
POST /v3/{project_id}/{resource_type}/{resource_id}/tags/action |
er:tags:batchOperation |
- |
DELETE /v3/{project_id}/{resource_type}/{resource_id}/tags/{key} |
er:tags:delete |
- |
GET /v3/{project_id}/enterprise-router/quotas |
er:quotas:list |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/flow-logs |
er:flowLogs:create |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/flow-logs |
er:flowLogs:list |
- |
GET /v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id} |
er:flowLogs:get |
- |
PUT /v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id} |
er:flowLogs:update |
- |
DELETE /v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id} |
er:flowLogs:delete |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}/enable |
er:flowLogs:enable |
- |
POST /v3/{project_id}/enterprise-router/{er_id}/flow-logs/{flow_log_id}/disable |
er:flowLogs:disable |
- |
资源类型(Resource)
资源类型(Resource)表示SCP所作用的资源。如表3中的某些操作指定了可以在该操作指定的资源类型,则必须在具有该操作的SCP语句中指定该资源的URN,SCP仅作用于此资源;如未指定,Resource默认为“*”,则SCP将应用到所有资源。您也可以在SCP中设置条件,从而指定资源类型。
er定义了以下可以在自定义SCP的Resource元素中使用的资源类型。