Before you use Message Queue for MQTT, you must activate it on the Alibaba Cloud official website. If you are a RAM user, you must be granted required permissions before you can use the console or API to access the corresponding Message Queue for MQTT resources and use SDKs to send and receive messages.
Prerequisites
Step 1: Activate Message Queue for MQTT
Step 1: Grant permissions to a RAM user (Required for a RAM user)
If you activate Message Queue for MQTT as a RAM user, you must use your Alibaba Cloud account to grant required permissions to the RAM user before you can access Message Queue for MQTT resources as the RAM user. If you activate Message Queue for MQTT by using an Alibaba Cloud account, you have the permissions to access Message Queue for MQTT resources by default. In this case, skip this step.
- Log on to the RAM console by using your Alibaba Cloud account.
- In the left-side navigation pane, choose .
- On the Users page, find the RAM user to which you want to grant permissions and click Add Permissions in the Actions column.
- In the Add Permissions panel, grant permissions to the RAM user.
- Click OK.
- Click Complete.
Policy | Description |
---|---|
AliyunMQFullAccess | The permissions to manage Message Queue for MQTT. They are equivalent to the permissions that the Alibaba Cloud account has. A RAM user to which these permissions are granted can send and subscribe to all messages and use all the features of the console. |
AliyunMQPubOnlyAccess | The permissions to send messages in Message Queue for MQTT. A RAM user to which these permissions are granted can use all the resources of the Alibaba Cloud account to send messages by using SDKs. |
AliyunMQSubOnlyAccess | The subscription permissions of Message Queue for MQTT. A RAM user to which these permissions are granted can use all the resources of the Alibaba Cloud account to subscribe to messages by using SDKs. |
AliyunMQReadOnlyAccess | The read-only permissions on Message Queue for MQTT. A RAM user to which these permissions are granted can only read resource information by using the console or by calling API operations. |