企业路由器 ER
云服务在IAM预置了常用的权限,称为系统身份策略。如果IAM系统身份策略无法满足授权要求,管理员可以根据各服务支持的授权项,创建IAM自定义身份策略来进行精细的访问控制,IAM自定义身份策略是对系统身份策略的扩展和补充。
除IAM服务外,Organizations服务中的服务控制策略(Service Control Policy,以下简称SCP)也可以使用这些授权项元素设置访问控制策略。
SCP不直接进行授权,只划定权限边界。将SCP绑定到组织单元或者成员账号时,并没有直接对组织单元或成员账号授予操作权限,而是规定了成员账号或组织单元包含的成员账号的授权范围。IAM身份策略授予权限的有效性受SCP限制,只有在SCP允许范围内的权限才能生效。
IAM服务与Organizations服务在使用这些元素进行访问控制时,存在着一些区别,详情请参见:IAM服务与Organizations服务权限访问控制的区别。
本章节介绍IAM服务身份策略授权场景中自定义身份策略和组织服务中SCP使用的元素,这些元素包含了操作(Action)、资源(Resource)和条件(Condition)。
操作(Action)
操作(Action)即为身份策略中支持的授权项。
- “访问级别”列描述如何对操作进行分类(List、Read和Write等)。此分类可帮助您了解在身份策略中相应操作对应的访问级别。
- “资源类型”列指每个操作是否支持资源级权限。
- 资源类型支持通配符号*表示所有。如果此列没有值(-),则必须在身份策略语句的Resource元素中指定所有资源类型(“*”)。
- 如果该列包含资源类型,则必须在具有该操作的语句中指定该资源的URN。
- 资源类型列中必需资源在表中用星号(*)标识,表示使用此操作必须指定该资源类型。
关于er定义的资源类型的详细信息请参见资源类型(Resource)。
- “条件键”列包括了可以在身份策略语句的Condition元素中支持指定的键值。
- 如果该授权项资源类型列存在值,则表示条件键仅对列举的资源类型生效。
- 如果该授权项资源类型列没有值(-),则表示条件键对整个授权项生效。
- 如果此列条件键没有值(-),表示此操作不支持指定条件键。
关于er定义的条件键的详细信息请参见条件(Condition)。
- “别名”列包括了可以在身份策略中配置的策略授权项。通过这些授权项,可以控制支持策略授权的API访问。详细信息请参见身份策略兼容性说明。
您可以在身份策略语句的Action元素中指定以下er的相关操作。
授权项 | 描述 | 访问级别 | 资源类型(*为必须) | 条件键 | 别名 |
|---|---|---|---|---|---|
er:instances:get | 授予查询实例详情权限。 | Read | instances * | - | |
er:instances:create | 授予创建实例权限。 | Write | instances * | - | |
- | |||||
er:instances:list | 授予查询实例列表权限。 | List | instances * | - | - |
er:instances:update | 授予更新实例权限。 | Write | instances * | - | |
er:instances:delete | 授予删除实例权限。 | Write | instances * | - | |
er:instances:changeAZ | 授予更改实例可用区权限。 | Write | instances * | - | |
er:instances:createVpcAttachment | 授予创建VPC连接权限。 | Write | instances * |
| |
er:instances:showVpcAttachment | 授予查询VPC连接详情权限。 | Read | instances * |
| |
er:instances:listVpcAttachments | 授予查询VPC连接列表权限。 | List | instances * | - |
|
er:instances:updateVpcAttachment | 授予更新VPC连接权限。 | Write | instances * |
| |
er:instances:deleteVpcAttachment | 授予删除VPC连接权限。 | Write | instances * |
| |
er:commonAttachments:get | 授予查询连接详情权限。 | Read | attachments * |
| |
er:commonAttachments:list | 授予查询连接列表权限。 | List | attachments * | - |
|
er:commonAttachments:update | 授予更新连接权限。 | Write | attachments * |
| |
er:attachments:accept | 授予接受连接权限。 | Write | attachments * | - | |
er:attachments:reject | 授予拒绝连接权限。 | Write | attachments * | - | |
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 * |
| |
attachments * | |||||
er:routeTables:disassociate | 授予解除连接和路由表关联的权限。 | Write | routeTables * |
| |
attachments * | |||||
er:routeTables:listAssociations | 授予查询关联列表的权限。 | List | routeTables * |
| |
er:routeTables:updateAssociationRoutePolicy | 授予更新路由表关联的路由策略的权限。 | Write | routeTables * |
| |
attachments * | |||||
er:routeTables:enablePropagation | 授予允许连接将路由传播到传播路由表的权限。 | Write | routeTables * |
| |
attachments * | |||||
er:routeTables:disablePropagation | 授予禁止连接将路由传播到指定传播路由表的权限。 | Write | routeTables * |
| |
attachments * | |||||
er:routeTables:listPropagations | 授予查询传播列表的权限。 | List | routeTables * |
| |
er:routeTables:updatePropagationRoutePolicy | 授予更新传播的权限。 | Write | routeTables * |
| |
attachments * | |||||
er:staticRoutes:list | 授予查询静态路由列表的权限。 | List | routeTables * |
| |
er:staticRoutes:create | 授予创建静态路由的权限。 | Write | routeTables * |
| |
attachments | |||||
er:effectiveRoutes:list | 授予查询有效路由列表的权限。 | List | routeTables * |
| |
er:staticRoutes:delete | 授予删除静态路由的权限。 | Write | routeTables * |
| |
er:staticRoutes:update | 授予更新静态路由的权限。 | Write | routeTables * |
| |
attachments | |||||
er:staticRoutes:get | 授予查询静态路由的权限。 | Read | routeTables * |
| |
er:tags:singleCreate | 授予创建资源标签的权限。 | Write | routeTables |
| |
instances | |||||
attachments | |||||
er:tags:delete | 授予删除资源标签的权限。 | Write | routeTables | - | |
instances | |||||
attachments | |||||
er:tags:batchOperation | 授予批量创建资源标签的权限。 | Write | routeTables |
| |
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 | - |
POST /v3/{project_id}/enterprise-router/instances/{er_id}/change-availability-zone-ids | er:instances:changeAZ | - |
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}/attachments/{attachment_id}/accept | er:attachments:accept | - |
POST /v3/{project_id}/enterprise-router/{er_id}/attachments/{attachment_id}/reject | er:attachments:reject | - |
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}/associations/{association_id}/change-route-policy | er:routeTables:updateAssociationRoutePolicy | - |
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/{er_id}/route-tables/{route_table_id}/propagations/{propagation_id}/change-route-policy | er:routeTables:updatePropagationRoutePolicy | - |
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)表示身份策略所作用的资源。如表3中的某些操作指定了可以在该操作指定的资源类型,则必须在具有该操作的身份策略语句中指定该资源的URN,身份策略仅作用于此资源;如未指定,Resource默认为“*”,则身份策略将应用到所有资源。您也可以在身份策略中设置条件,从而指定资源类型。
er定义了以下可以在自定义身份策略的Resource元素中使用的资源类型。

