微消息队列 MQTT 版权限管理是通过阿里云的访问控制 RAM(Resource Access Management)产品实现的。使用 RAM 可以让您避免与其他用户共享云账号密钥,即 AccessKey(包含 AccessKey ID 和 AccessKey Secret),按需为用户分配最小权限。在使用 RAM 账号调用阿里云 OpenAPI 前,需要主账号通过创建授权策略对 RAM 账号进行授权。

微消息队列 MQTT 版的 Resource 与 Action 的对应规则

微消息队列 MQTT 版中,实例、Topic、Group 和规则各为一种 Resource,对这些 Resource 授予的权限即为 Action。

可授权的微消息队列 MQTT 版 OpenAPI

下表列举了微消息队列 MQTT 版中可授权的 OpenAPI 及其描述方式。

说明 如需访问微消息队列 MQTT 版的 OpenAPI,则需有访问微消息队列 MQTT 版实例的权限,即 mq:MqttInstanceAccess 权限。

更多信息请参见权限策略

API Resource 命名格式 Resource 命名示例 Action 描述
RevokeToken acs:mq:*:*:* acs:mq:*:*:*
  • mq:MqttInstanceAccess
  • mq:RevokeToken
QueryToken acs:mq:*:*:* acs:mq:*:*:*
  • mq:MqttInstanceAccess
  • mq:QueryToken
ApplyToken
  • 实例:acs:mq:*:*:instance/{mqttInstanceId}
  • Topic:acs:mq:*:*:topic/{mqttInstanceId}/{topic}
  • 实例:acs:mq:*:*:instance/post-cn-09k1noy****
  • Topic:acs:mq:*:*:topic/post-cn-09k1noy****/Topic_****
  • mq:MqttInstanceAccess
  • mq:ApplyToken
CreateGroupId
  • 实例:acs:mq:*:*:instance/{mqttInstanceId}
  • Group ID:acs:mq:*:*:groupId/{mqttInstanceId}/{gid}
  • 实例:acs:mq:*:*:instance/post-cn-09k1noy****
  • Group ID:acs:mq:*:*:groupId/post-cn-09k1noy****/GID_****
  • mq:MqttInstanceAccess
  • mq:CreateGroupId
DeleteGroupId
  • mq:MqttInstanceAccess
  • mq:DeleteGroupId
ListGroupId
  • mq:MqttInstanceAccess
  • mq:ListGroupId
CreateTopic
  • 实例:acs:mq:*:*:instance/{mqttInstanceId}
  • Topic:acs:mq:*:*:topic/{mqttInstanceId}/{topic}
  • 实例:acs:mq:*:*:instance/post-cn-09k1noy****
  • Topic:acs:mq:*:*:topic/post-cn-09k1noy****/Topic_****
  • mq:MqttInstanceAccess
  • mq:CreateMqttTopic
DeleteTopic
  • mq:MqttInstanceAccess
  • mq:DeleteMqttTopic
ListTopic
  • mq:MqttInstanceAccess
  • mq:ListMqttTopic
UpdateTopic
  • mq:MqttInstanceAccess
  • mq:UpdateMqttTopic
CreateMqttInboundRule
  • 实例:acs:mq:*:*:instance/{mqttInstanceId}
  • Rule:acs:mq:*:*:rule/{mqttInstanceId}/{ruleId}
  • 实例:acs:mq:*:*:instance/post-cn-09k1noy****
  • Rule:acs:mq:*:*:rule/post-cn-09k1noy****/111****
  • mq:MqttInstanceAccess
  • mq:CreateMqttInboundRule
DeleteMqttInboundRule
  • mq:MqttInstanceAccess
  • mq:DeleteMqttInboundRule
ListMqttInboundRuleInPage
  • mq:MqttInstanceAccess
  • mq:ListMqttInboundRule
UpdateMqttInboundRule
  • mq:MqttInstanceAccess
  • mq:UpdateMqttInboundRule
CreateMqttOutboundRule
  • mq:MqttInstanceAccess
  • mq:CreateMqttOutboundRule
DeleteMqttOutboundRule
  • mq:MqttInstanceAccess
  • mq:DeleteMqttOutboundRule
ListMqttOutboundRuleInPage
  • mq:MqttInstanceAccess
  • mq:ListMqttOutboundRule
UpdateMqttOutboundRule
  • mq:MqttInstanceAccess
  • mq:UpdateMqttOutboundRule
CreateClientStatusNotifyRule
  • mq:MqttInstanceAccess
  • mq:CreateClientStatusNotifyRule
DeleteClientStatusNotifyRule
  • mq:MqttInstanceAccess
  • mq:DeleteClientStatusNotifyRule
ListClientStatusNotifyRuleInPage
  • mq:MqttInstanceAccess
  • mq:ListClientStatusNotifyRule
UpdateClientStatusNotifyRule
  • mq:MqttInstanceAccess
  • mq:UpdateClientStatusNotifyRule