# 身份策略授权参考
云服务在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。
  
  - 资源类型列中必需资源在表中用星号（\*）标识，表示使用此操作必须指定该资源类型。
  
  
  关于SMN定义的资源类型的详细信息请参见[资源类型（Resource）]。
  
- "条件键"列包括了可以在身份策略语句的Condition元素中支持指定的键值。
  - 如果该授权项资源类型列存在值，则表示条件键仅对列举的资源类型生效。
  
  - 如果该授权项资源类型列没有值（-），则表示条件键对整个授权项生效。
  
  - 如果此列条件键没有值（-），表示此操作不支持指定条件键。
  
  
  关于SMN定义的条件键的详细信息请参见[条件（Condition）]。
  
- "别名"列包括了可以在身份策略中配置的策略授权项。通过这些授权项，可以控制支持策略授权的API访问。详细信息请参见[身份策略兼容性说明](https://support.huaweicloud.com/iam5_faq/iam_01_1103.html)。
您可以在身份策略语句的Action元素中指定以下SMN的相关操作。
表1SMN支持的授权项 
| 授权项                                         | 描述                    | 访问级别  | 资源类型（\*为必须）          | 条件键                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | 别名                |
|:---|:---|:---|:---|:---|:---|
| smn:topic:create                            | 授予创建主题的权限。            | Write | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:topic:create                            | 授予创建主题的权限。            | 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)   | -                 |
| smn:topic:listTopic                         | 授予查询主题列表的权限。          | List  | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | smn:topic:list    |
| smn:topic:listTopic                         | 授予查询主题列表的权限。          | List  | -                    | [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | smn:topic:list    |
| smn:topic:updateTopic                       | 授予更新主题信息的权限。          | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:get                               | 授予查询主题详情的权限。          | Read  | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:list    |
| smn:topic:delete                            | 授予删除主题的权限。            | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:listAttributes                    | 授予查询主题策略的权限。          | List  | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:list    |
| smn:topic:deleteAttribute                   | 授予删除主题策略的权限。          | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:updateAttribute                   | 授予更新主题策略的权限。          | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:updateAttribute                   | 授予更新主题策略的权限。          | Write | -                    | - [smn:TargetOrgPath]  - [smn:TargetOrgId]  - [smn:TargetAccountId]                  | smn:topic:update  |
| smn:topic:subscribe                         | 授予主题下创建订阅的权限。         | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:subscribe                         | 授予主题下创建订阅的权限。         | Write | -                    | - [smn:Protocol]  - [smn:Endpoint]                                                                                                                                                                                                                                             | smn:topic:update  |
| smn:topic:listSubscriptionsByTopic          | 授予查询指定主题的订阅列表的权限。     | List  | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:list    |
| smn:topic:listSubscriptions                 | 授予查询所有主题的订阅列表的权限。     | List  | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | smn:topic:list    |
| smn:topic:deleteSubscription                | 授予删除指定主题下的订阅的权限。      | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:updateSubscription                | 授予更新指定主题下的订阅的权限。      | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:publish                           | 授予发送消息的权限。            | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:publish                           | 授予发送消息的权限。            | Write | -                    | - [smn:TopicOwnerOrgId]  - [smn:TopicOwnerOrgPath]                                                                                                                                                                                                                             | -                 |
| smn:template:create                         | 授予创建模板的权限。            | Write | template \*          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:template:listTemplates                  | 授予查询模板列表的权限。          | List  | template \*          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | smn:template:list |
| smn:template:update                         | 授予修改模板的权限。            | Write | template \*          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:template:get                            | 授予查询模板详情的权限。          | Read  | template \*          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | smn:template:list |
| smn:template:delete                         | 授予删除模板的权限。            | Write | template \*          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:tag:create                              | 授予指定主题创建标签的权限。        | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:tag:create                              | 授予指定主题创建标签的权限。        | Write | -                    | - [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)                                                                                                                                                                                                                            | -                 |
| smn:tag:delete                              | 授予删除主题标签的权限。          | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:tag:update    |
| smn:tag:delete                              | 授予删除主题标签的权限。          | Write | -                    | - [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)                                                                                                                                                                                                                            | smn:tag:update    |
| smn:tag:batchModify                         | 授予批量修改主题标签的权限。        | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:tag:update    |
| smn:tag:batchModify                         | 授予批量修改主题标签的权限。        | Write | -                    | - [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)                                                                                                                                                                                                                            | smn:tag:update    |
| smn:tag:list                                | 授予查询主题标签的权限。          | Read  | topic \*             | [g:ResourceTag/\<tag-key\>](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | -                 |
| smn:topic:createLogTank                     | 授予为主题关联日志组和日志流的权限。    | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:listLogTank                       | 授予查询主题的日志组和日志流的权限。    | List  | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:list    |
| smn:topic:updateLogTank                     | 授予更新主题的日志组和日志流的权限。    | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:deleteLogTank                     | 授予解除主题的日志组和日志流关系的权限。  | Write | topic \*             | - [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)                                                                                                                                                                                                               | smn:topic:update  |
| smn:topic:createKmsKey                      | 授予为主题关联KMS密钥的权限。      | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:getKmsKey                         | 授予查询主题的KMS密钥的权限。      | List  | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:updateKmsKey                      | 授予更新主题的KMS密钥的权限。      | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:deleteKmsKey                      | 授予删除主题的KMS密钥的权限。      | Write | topic \*             | - [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)                                                                                                                                                                                                               | -                 |
| smn:topic:createNotifyPolicy                | 授予创建通知策略的权限           | Write | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:topic:updateNotifyPolicy                | 授予修改通知策略的权限           | Write | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:topic:getNotifyPolicy                   | 授予查询通知策略的权限           | Read  | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:topic:deleteNotifyPolicy                | 授予删除通知策略的权限           | Write | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:topic:listTopicsWithAssociatedResources | 授予查询主题列表及主题关联资源信息的权限。 | List  | topic \*             | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:topic:listTopicsWithAssociatedResources | 授予查询主题列表及主题关联资源信息的权限。 | List  | -                    | [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | -                 |
| smn:application:create                      | 授予创建应用的权限。            | Write | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:delete                      | 授予删除应用的权限。            | Write | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:list                        | 授予查询应用的权限。            | List  | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:get                         | 授予查询应用详情的权限。          | Read  | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:publish                     | 授予发布应用下消息的权限。         | Write | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:createPlatform              | 授予创建平台的权限。            | Write | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:deletePlatform              | 授予删除平台的权限。            | Write | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:updatePlatform              | 授予更新平台的权限。            | Write | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:listPlatform                | 授予查询平台列表的权限。          | List  | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:application:getPlatform                 | 授予查询平台详情的权限。          | Read  | application \*       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:subscriptionUser:create                 | 授予创建订阅用户的权限。          | Write | subscription_user \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:subscriptionUser:create                 | 授予创建订阅用户的权限。          | Write | -                    | - [smn:Protocol]  - [smn:Endpoint]                                                                                                                                                                                                                                             | -                 |
| smn:subscriptionUser:delete                 | 授予删除订阅用户的权限。          | Write | subscription_user \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:subscriptionUser:update                 | 授予更新订阅用户的权限。          | Write | subscription_user \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
| smn:subscriptionUser:list                   | 授予查询订阅用户列表的权限。        | List  | subscription_user \* | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | -                 |
   
SMN的API通常对应着一个或多个授权项。[表2]展示了API与授权项的关系，以及该API需要依赖的授权项。
 表2API与授权项的关系 
| API                                                                                                                                                                              | 对应的授权项                                      | 依赖的授权项                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| [POST /v2/{project_id}/notifications/topics](https://support.huaweicloud.com/api-smn/smn_api_51001.html)                                                                         | smn:topic:create                            | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/topics](https://support.huaweicloud.com/api-smn/smn_api_51004.html)                                                                          | smn:topic:listTopic                         | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{project_id}/notifications/topics/{topic_urn}](https://support.huaweicloud.com/api-smn/UpdateTopic.html)                                                                | smn:topic:updateTopic                       | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}](https://support.huaweicloud.com/api-smn/ListTopicDetails.html)                                                           | smn:topic:get                               | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}](https://support.huaweicloud.com/api-smn/DeleteTopic.html)                                                             | smn:topic:delete                            | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}/attributes](https://support.huaweicloud.com/api-smn/ListTopicAttributes.html)                                             | smn:topic:listAttributes                    | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/attributes](https://support.huaweicloud.com/api-smn/DeleteTopicAttributes.html)                                        | smn:topic:deleteAttribute                   | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{project_id}/notifications/topics/{topic_urn}/attributes/{name}](https://support.huaweicloud.com/api-smn/UpdateTopicAttribute.html)                                     | smn:topic:updateAttribute                   | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/attributes/{name}](https://support.huaweicloud.com/api-smn/DeleteTopicAttributeByName.html)                            | smn:topic:deleteAttribute                   | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions](https://support.huaweicloud.com/api-smn/AddSubscription.html)                                             | smn:topic:subscribe                         | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions](https://support.huaweicloud.com/api-smn/ListSubscriptionsByTopic.html)                                     | smn:topic:listSubscriptionsByTopic          | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions/{subscription_urn}](https://support.huaweicloud.com/api-smn/UpdateSubscription.html)                        | smn:topic:updateSubscription                | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/subscriptions/{subscription_urn}](https://support.huaweicloud.com/api-smn/CancelSubscription.html)                                        | smn:topic:deleteSubscription                | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/subscriptions](https://support.huaweicloud.com/api-smn/BatchDeleteSubscriptions.html)                                                     | smn:topic:deleteSubscription                | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions/{subscription_urn}](https://support.huaweicloud.com/api-smn/DeleteSubscriptionsByTopic.html)             | smn:topic:deleteSubscription                | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions](https://support.huaweicloud.com/api-smn/BatchDeleteSubscriptionsByTopic.html)                           | smn:topic:deleteSubscription                | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/subscriptions](https://support.huaweicloud.com/api-smn/ListSubscriptions.html)                                                               | smn:topic:listSubscriptions                 | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/topics/{topic_urn}/publish](https://support.huaweicloud.com/api-smn/PublishMessage.html)                                                    | smn:topic:publish                           | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/message_template](https://support.huaweicloud.com/api-smn/CreateMessageTemplate.html)                                                       | smn:template:create                         | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/message_template](https://support.huaweicloud.com/api-smn/ListMessageTemplates.html)                                                         | smn:template:listTemplates                  | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{project_id}/notifications/message_template/{message_template_id}](https://support.huaweicloud.com/api-smn/UpdateMessageTemplate.html)                                  | smn:template:update                         | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/message_template/{message_template_id}](https://support.huaweicloud.com/api-smn/ListMessageTemplateDetails.html)                             | smn:template:get                            | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/message_template/{message_template_id}](https://support.huaweicloud.com/api-smn/DeleteMessageTemplate.html)                               | smn:template:delete                         | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/{resource_type}/{resource_id}/tags](https://support.huaweicloud.com/api-smn/CreateResourceTag.html)                                                       | smn:tag:create                              | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/{resource_type}/{resource_id}/tags](https://support.huaweicloud.com/api-smn/ListResourceTags.html)                                                         | smn:tag:list                                | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/{resource_type}/{resource_id}/tags/action](https://support.huaweicloud.com/api-smn/BatchCreateOrDeleteResourceTags.html)                                  | smn:tag:batchModify                         | - smn:tag:create  - smn:tag:delete       |
| [DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/{key}](https://support.huaweicloud.com/api-smn/DeleteResourceTag.html)                                               | smn:tag:delete                              | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/{resource_type}/tags](https://support.huaweicloud.com/api-smn/ListProjectTags.html)                                                                        | smn:tag:list                                | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/{resource_type}/resource_instances/action](https://support.huaweicloud.com/api-smn/ListResourceInstances.html)                                            | smn:tag:list                                | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}/logtanks](https://support.huaweicloud.com/api-smn/ListLogtank.html)                                                       | smn:topic:listLogTank                       | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/topics/{topic_urn}/logtanks](https://support.huaweicloud.com/api-smn/CreateLogtank.html)                                                    | smn:topic:createLogTank                     | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{project_id}/notifications/topics/{topic_urn}/logtanks/{logtank_id}](https://support.huaweicloud.com/api-smn/UpdateLogtank.html)                                        | smn:topic:updateLogTank                     | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/logtanks/{logtank_id}](https://support.huaweicloud.com/api-smn/DeleteLogtank.html)                                     | smn:topic:deleteLogTank                     | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/subscriptions/filter_polices](https://support.huaweicloud.com/api-smn/BatchCreateSubscriptionsFilterPolices.html)                           | smn:topic:updateSubscription                | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{project_id}/notifications/subscriptions/filter_polices](https://support.huaweicloud.com/api-smn/BatchUpdateSubscriptionsFilterPolices.html)                            | smn:topic:updateSubscription                | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/subscriptions/filter_polices](https://support.huaweicloud.com/api-smn/BatchDeleteSubscriptionsFilterPolices.html)                         | smn:topic:updateSubscription                | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/topics/{topic_urn}/subscriptions/from-subscription-users](https://support.huaweicloud.com/api-smn/AddSubscriptionFromSubscriptionUser.html) | smn:topic:subscribe                         | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/topics/{topic_urn}/notify-policy](https://support.huaweicloud.com/api-smn/CreateNotifyPolicy.html)                                          | smn:topic:createNotifyPolicy                | smn:topic:listSubscriptionsByTopic                                                                                                                                                                                                                                                               |
| [PUT /v2/{project_id}/notifications/topics/{topic_urn}/notify-policy/{notify_policy_id}](https://support.huaweicloud.com/api-smn/UpdateNotifyPolicy.html)                        | smn:topic:updateNotifyPolicy                | smn:topic:listSubscriptionsByTopic                                                                                                                                                                                                                                                               |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}/notify-policy](https://support.huaweicloud.com/api-smn/ShowNotifyPolicy.html)                                             | smn:topic:getNotifyPolicy                   | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/notify-policy/{notify_policy_id}](https://support.huaweicloud.com/api-smn/DeleteNotifyPolicy.html)                     | smn:topic:deleteNotifyPolicy                | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}/statistics](https://support.huaweicloud.com/api-smn/ListTopicMessageStatistics.html)                                      | smn:topic:get                               | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{project_id}/notifications/topics/{topic_urn}/kms](https://support.huaweicloud.com/api-smn/CreateKmsKey.html)                                                          | smn:topic:createKmsKey                      | smn:topic:get                                                                                                                                                                                                                                                                                    |
| [PUT /v2/{project_id}/notifications/topics/{topic_urn}/kms/{id}](https://support.huaweicloud.com/api-smn/UpdateKmsKey.html)                                                      | smn:topic:updateKmsKey                      | - smn:topic:get  - smn:topic:getKmsKey   |
| [GET /v2/{project_id}/notifications/topics/{topic_urn}/kms](https://support.huaweicloud.com/api-smn/ShowKmsKey.html)                                                             | smn:topic:getKmsKey                         | smn:topic:get                                                                                                                                                                                                                                                                                    |
| [DELETE /v2/{project_id}/notifications/topics/{topic_urn}/kms/{id}](https://support.huaweicloud.com/api-smn/DeleteKmsKey.html)                                                   | smn:topic:deleteKmsKey                      | - smn:topic:get  - smn:topic:getKmsKey   |
| [GET /v2/{project_id}/notifications/topics-with-associated-resources](https://support.huaweicloud.com/api-smn/ListTopicsWithAssociatedResources.html)                            | smn:topic:listTopicsWithAssociatedResources | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:create                      | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:delete                      | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:list                        | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:get                         | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:publish                     | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:createPlatform              | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:deletePlatform              | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:updatePlatform              | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:listPlatform                | -                                                                                                                                                                                                                                                                                                |
| -                                                                                                                                                                                | smn:application:getPlatform                 | -                                                                                                                                                                                                                                                                                                |
| [POST /v2/{domain_id}/subscription-users](https://support.huaweicloud.com/api-smn/CreateSubscriptionUser.html)                                                                   | smn:subscriptionUser:create                 | -                                                                                                                                                                                                                                                                                                |
| [DELETE /v2/{domain_id}/subscription-users/{id}](https://support.huaweicloud.com/api-smn/DeleteSubscriptionUser.html)                                                            | smn:subscriptionUser:delete                 | -                                                                                                                                                                                                                                                                                                |
| [PUT /v2/{domain_id}/subscription-users/{id}](https://support.huaweicloud.com/api-smn/UpdateSubscriptionUser.html)                                                               | smn:subscriptionUser:update                 | -                                                                                                                                                                                                                                                                                                |
| [GET /v2/{domain_id}/subscription-users](https://support.huaweicloud.com/api-smn/ListSubscriptionUser.html)                                                                      | smn:subscriptionUser:list                   | -                                                                                                                                                                                                                                                                                                |
   
 #### 资源类型（Resource）
资源类型（Resource）用于定义身份策略生效的资源范围。如[表3]中某项操作已指定了对应的资源类型，则在包含该操作的身份策略语句中选择填写对应资源的URN时，身份策略仅对该指定资源生效；未填写对应资源的URN时，身份策略将对指定资源类型下所有资源生效；如未指定资源类型，Resource默认取值为"\*"，身份策略将作用于所有资源。此外，您也可在身份策略中设置条件，进一步精细化限定资源类型。
SMN定义了以下可以在自定义身份策略的Resource元素中使用的资源类型。
 表3SMN支持的资源类型 
| 资源类型              | URN                                                            |
|:---|:---|
| application       | smn::\<account-id\>:application:\<application-id\>             |
| topic             | smn:\<region\>:\<account-id\>:topic:\<topic-id\>               |
| subscription_user | smn::\<account-id\>:subscription_user:\<subscription-user-id\> |
| template          | smn:\<region\>:\<account-id\>:template:\<template-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)。
  
  - 服务级条件键（前缀通常为服务缩写，如smn:）仅适用于对应服务的操作，详情请参见[表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)。
**SMN支持的服务级条件键**
SMN定义了以下可以在自定义身份策略的Condition元素中使用的条件键，您可以使用这些条件键进一步细化身份策略语句应用的条件。
 表4SMN支持的服务级条件键 
| 服务级条件键                | 类型     | 单值/多值 | 说明           |
|:---|:---|:---|:---|
| smn:TargetOrgPath     | string | 单值    | 主题策略授权的组织路径。 |
| smn:TargetOrgId       | string | 单值    | 主题策略授权的组织ID。 |
| smn:TargetAccountId   | string | 单值    | 主题策略授权的账号ID。 |
| smn:Protocol          | string | 单值    | 订阅终端协议。      |
| smn:Endpoint          | string | 单值    | 订阅终端地址。      |
| smn:TopicOwnerOrgPath | string | 单值    | 主题所属用户的组织路径。 |
| smn:TopicOwnerOrgId   | string | 单值    | 主题所属用户的组织ID。 |
| smn:Protocol          | string | 单值    | 订阅终端协议。      |
| smn:Endpoint          | string | 单值    | 订阅终端地址。      |
   
