
# 云堡垒机 CBH
云服务在IAM预置了常用的权限，称为系统身份策略。如果IAM系统身份策略无法满足授权要求，管理员可以根据各服务支持的授权项，创建IAM自定义身份策略来进行精细的访问控制，IAM自定义身份策略是对系统身份策略的扩展和补充。
除IAM服务外，[Organizations](https://support.huaweicloud.com/productdesc-organizations/org_01_0011.html)服务中的[服务控制策略](https://support.huaweicloud.com/usermanual-organizations/org_03_0065.html)（Service Control Policy，以下简称SCP）也可以使用这些授权项元素设置访问控制策略。
SCP不直接进行授权，只划定权限边界。将SCP绑定到组织单元或者成员账号时，并没有直接对组织单元或成员账号授予操作权限，而是规定了成员账号或组织单元包含的成员账号的授权范围。IAM身份策略授予权限的有效性受SCP限制，只有在SCP允许范围内的权限才能生效。
IAM服务与Organizations服务在使用这些元素进行访问控制时，存在着一些区别，详情请参见：[IAM服务与Organizations服务权限访问控制的区别](https://support.huaweicloud.com/organizations_faq/org_06_0004.html)。
本章节介绍IAM服务身份策略授权场景中自定义身份策略和组织服务中SCP使用的元素，这些元素包含了操作（Action）、资源（Resource）和条件（Condition）。
- 如何使用这些元素编辑IAM自定义身份策略，请参考[创建自定义身份策略](https://support.huaweicloud.com/usermanual-iam5/iam_01_0917.html)。
- 如何使用这些元素编辑SCP自定义策略，请参考[创建SCP](https://support.huaweicloud.com/usermanual-organizations/org_03_0035.html)。
#### 操作（Action）
操作（Action）即为身份策略中支持的授权项。
- "访问级别"列描述如何对操作进行分类（List、Read和Write等）。此分类可帮助您了解在身份策略中相应操作对应的访问级别。
- "资源类型"列指每个操作是否支持资源级权限。
  - 资源类型支持通配符号\*表示所有。如果此列没有值（-），则必须在身份策略语句的Resource元素中指定所有资源类型（"\*"）。
  
  - 如果该列包含资源类型，则必须在具有该操作的语句中指定该资源的URN。
  
  - 资源类型列中必需资源在表中用星号（\*）标识，表示使用此操作必须指定该资源类型。
  
  
  关于CBH定义的资源类型的详细信息请参见[资源类型（Resource）]。
  
- "条件键"列包括了可以在身份策略语句的Condition元素中支持指定的键值。
  - 如果该授权项资源类型列存在值，则表示条件键仅对列举的资源类型生效。
  
  - 如果该授权项资源类型列没有值（-），则表示条件键对整个授权项生效。
  
  - 如果此列条件键没有值（-），表示此操作不支持指定条件键。
  
  
  关于CBH定义的条件键的详细信息请参见[条件（Condition）]。
  
- "别名"列包括了可以在身份策略中配置的策略授权项。通过这些授权项，可以控制支持策略授权的API访问。详细信息请参见[身份策略兼容性说明](https://support.huaweicloud.com/iam5_faq/iam_01_1103.html)。
您可以在身份策略语句的Action元素中指定以下CBH的相关操作。
表1CBH支持的授权项 
| 授权项                                      | 描述                     | 访问级别    | 资源类型（\*为必须） | 条件键                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | 别名                    |
|:---|:---|:---|:---|:---|:---|
| cbh::listAvailableZones                  | 授予查询服务可用区的权限。          | List    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh::getEcsQuota                         | 授予查询ECS资源配额的权限。        | Read    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh::getQuota                            | 授予查询堡垒机实例配额的权限。        | Read    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh::listSpecifications                  | 授予查询堡垒机规格的权限。          | List    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:listInstances               | 授予查询堡垒机列表的权限。          | List    | instance \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:getInstanceStatus           | 授予查询堡垒机状态的权限。          | Read    | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:startInstance               | 授予启动堡垒机的权限。            | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:stopInstance                | 授予关闭堡垒机的权限。            | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:rebootInstance              | 授予重启堡垒机的权限。            | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:upgradeInstance             | 授予升级堡垒机的权限。            | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:loginInstance               | 授予以IAM用户登录堡垒机的权限。      | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:resetInstancePassword       | 授予重置堡垒机密码的权限。          | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:resetInstanceLoginMethod    | 授予重置堡垒机登录方式的权限。        | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:deleteInstance              | 授予删除故障堡垒机的权限。          | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:alterInstance               | 授予变更堡垒机的权限。            | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:createInstance              | 授予创建堡垒机的权限。            | Write   | instance \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:createInstance              | 授予创建堡垒机的权限。            | Write   | -           | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:RequestTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:TagKeys](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [cbh:VpcId]  - [cbh:SubnetId]  - [cbh:AllowBindPublicIp]   | -                     |
| cbh:instance:bindInstanceEip             | 授予为堡垒机绑定EIP的权限。        | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:unbindInstanceEip           | 授予为堡垒机解绑EIP的权限。        | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:updateInstanceSecurityGroup | 授予更新堡垒机安全组的权限。         | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh::operateAuthorization                | 授予创建或取消堡垒机服务委托授权的权限。   | Write   | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh::getAuthorization                    | 授予获取租户给堡垒机服务委托授权信息的权限。 | Read    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh::listTags                            | 授予查询全部标签的权限。           | List    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:getInstanceTags             | 授予查询堡垒机实例资源的标签信息的权限。   | Read    | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:countInstancesByTag         | 授予统计符合标签条件的实例数量的权限。    | List    | instance \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:listInstancesByTag          | 授予使用标签过滤实例的权限。         | List    | -           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:operateInstanceTags         | 授予操作堡垒机实例资源标签的权限。      | Tagging | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
| cbh:instance:operateInstanceTags         | 授予操作堡垒机实例资源标签的权限。      | Tagging | -           | - [g:RequestTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:TagKeys](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | -                     |
| cbh:instance:getOmUrl                    | 授予获取堡垒机内资产运维链接的权限。     | Read    | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/\<tag-key\>](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | cbh:instance:getOmUrl |
| cbh:instance:rollbackInstance            | 授予回滚堡垒机的权限。            | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/\<tag-key\>](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | cbh:instance:upgrade  |
| cbh:instance:switchInstanceVpc           | 授予切换堡垒机实例虚拟私有云的权限。     | Write   | instance \* | - [g:ResourceTag/\<tag-key\>](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [cbh:VpcId]  - [cbh:SubnetId]                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:changeInstanceType          | 修改单机堡垒机实例类型            | Write   | instance \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                     |
| cbh:instance:changeInstanceType          | 修改单机堡垒机实例类型            | Write   | -           | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:RequestTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:TagKeys](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [cbh:VpcId]  - [cbh:SubnetId]  - [cbh:AllowBindPublicIp]   | -                     |
| cbh:instance:loginInstanceAdmin          | 用户登录堡垒机实例admin的console | Write   | instance \* | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/tag-key](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | -                     |
   
CBH的API通常对应着一个或多个授权项。[表2]展示了API与授权项的关系，以及该API需要依赖的授权项。
 表2API与授权项的关系 
| API                                                           | 对应的授权项                                   | 依赖的授权项                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|
| GET /v2/{project_id}/cbs/available-zone                       | cbh::listAvailableZones                  | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET /v2/{project_id}/cbs/instance/specification               | cbh::listSpecifications                  | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET /v2/{project_id}/cbs/instance/list                        | cbh:instance:listInstances               | eps:enterpriseProjects:list                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| POST /v2/{project_id}/cbs/instance/start                      | cbh:instance:startInstance               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/stop                       | cbh:instance:stopInstance                | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/upgrade                    | cbh:instance:upgradeInstance             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/login                      | cbh:instance:loginInstance               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| PUT /v2/{project_id}/cbs/instance/password                    | cbh:instance:resetInstancePassword       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| PUT /v2/{project_id}/cbs/instance/login-method                | cbh:instance:resetInstanceLoginMethod    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| DELETE /v2/{project_id}/cbs/instance                          | cbh:instance:deleteInstance              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance                            | cbh:instance:createInstance              | - vpc:quotas:list  - vpc:subnets:list  - vpc:subnets:get  - vpc:securityGroups:list  - ecs:cloudServerFlavors:get   |
| PUT /v2/{project_id}/cbs/instance/{server_id}/security-groups | cbh:instance:updateInstanceSecurityGroup | vpc:ports:update                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| GET /v2/{project_id}/cbs/agency/authorization                 | cbh::getAuthorization                    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET /v2/{project_id}/cbs/instance/tags                        | cbh::listTags                            | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET /v2/{project_id}/cbs/instance/{resource_id}/tags          | cbh:instance:getInstanceTags             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/count                      | cbh:instance:countInstancesByTag         | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/filter                     | cbh:instance:listInstancesByTag          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/{server_id}/eip/bind       | cbh:instance:bindInstanceEip             | - eip:publicIps:list  - eip:publicIps:update                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| POST /v2/{project_id}/cbs/instance/{server_id}/eip/unbind     | cbh:instance:unbindInstanceEip           | - eip:publicIps:update  - eip:publicIps:list                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| GET /v2/{project_id}/cbs/instance/ecs-quota                   | cbh::getEcsQuota                         | ecs:cloudServerFlavors:get                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| GET /v2/{project_id}/cbs/instance/quota                       | cbh::getQuota                            | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET /v2/{project_id}/cbs/instance/{server_id}/status          | cbh:instance:getInstanceStatus           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/reboot                     | cbh:instance:rebootInstance              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| PUT /v2/{project_id}/cbs/instance                             | cbh:instance:alterInstance               | evs:quotas:get                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| POST /v2/{project_id}/cbs/agency/authorization                | cbh::operateAuthorization                | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/{resource_id}/tags/action  | cbh:instance:operateInstanceTags         | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| GET /v2/{project_id}/cbs/instance/get-om-url                  | cbh:instance:getOmUrl                    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| POST /v2/{project_id}/cbs/instance/rollback                   | cbh:instance:rollbackInstance            | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| PUT /v2/{project_id}/cbs/instance/type                        | cbh:instance:changeInstanceType          | - vpc:quotas:list  - vpc:subnets:list  - vpc:subnets:get  - vpc:securityGroups:list  - ecs:cloudServerFlavors:get   |
| GET /v2/{project_id}/cbs/instances/{server_id}/admin-url      | cbh:instance:loginInstanceAdmin          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| PUT /v2/{project_id}/cbs/instance/vpc                         | cbh:instance:switchInstanceVpc           | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   
 #### 资源类型（Resource）
资源类型（Resource）表示身份策略所作用的资源。如[表3]中的某些操作指定了可以在该操作指定的资源类型，则必须在具有该操作的身份策略语句中指定该资源的URN，身份策略仅作用于此资源；如未指定，Resource默认为"\*"，则身份策略将应用到所有资源。您也可以在身份策略中设置条件，从而指定资源类型。
CBH定义了以下可以在自定义身份策略的Resource元素中使用的资源类型。
 表3CBH支持的资源类型 
| 资源类型     | URN                                                    |
|:---|:---|
| instance | cbh:\<region\>:\<account-id\>:instance:\<instance-id\> |
   
 #### 条件（Condition）
**条件键概述**
条件（Condition）是身份策略生效的特定条件，包括[条件键](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)和[运算符](https://support.huaweicloud.com/usermanual-iam5/iam_01_1289.html#iam_01_1289__li13495143171719)。
- 条件键表示身份策略语句的Condition元素中的键值。根据适用范围，分为全局级条件键和服务级条件键。
  - 全局级条件键（前缀为g:）适用于所有操作，在鉴权过程中，云服务不需要提供用户身份信息，系统将自动获取并鉴权。详情请参见：[全局条件键](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)。
  
  - 服务级条件键（前缀通常为服务缩写，如cbh:）仅适用于对应服务的操作，详情请参见[表4]。
  
  - 单值/多值表示API调用时请求中与条件关联的值数。单值条件键在API调用时的请求中最多包含一个值，多值条件键在API调用时请求可以包含多个值。例如：g:SourceVpce是单值条件键，表示仅允许通过某个VPC终端节点发起请求访问某资源，一个请求最多包含一个VPC终端节点ID值。g:TagKeys是多值条件键，表示请求中携带的所有标签的key组成的列表，当用户在调用API请求时传入标签可以传入多个值。
   
- 运算符与条件键、条件值一起构成完整的条件判断语句，当请求信息满足该条件时，身份策略才能生效。支持的运算符请参见：[运算符](https://support.huaweicloud.com/usermanual-iam5/iam_01_1289.html#iam_01_1289__li13495143171719)。
**CBH支持的服务级条件键**
CBH定义了以下可以在自定义身份策略的Condition元素中使用的条件键，您可以使用这些条件键进一步细化身份策略语句应用的条件。
 表4CBH支持的服务级条件键 
| 服务级条件键                | 类型      | 单值/多值 | 说明                     |
|:---|:---|:---|:---|
| cbh:VpcId             | string  | 单值    | 根据堡垒机实例通信的VPCID开启过滤访问。 |
| cbh:SubnetId          | string  | 单值    | 根据堡垒机实例通信的子网ID开启过滤访问。  |
| cbh:AllowBindPublicIp | boolean | 单值    | 根据堡垒机实例是否可以绑定公网IP开启权限。 |
   
