Mi Galaxy EMQ Book

setPermission()


Set ACL to queue The user performing this operation needs the FULL_CONTROL permission of the queue
Queue's owner has FULL_CONTROL permission for queue by default

Parameters SetPermissionRequest

queueName : String : required
teamId : String : required

The teamId of the privileged user

permission : Permission : required

Need to set permissions. The permission here is already the result of the combination, and the permission combination is not supported again. The specific types of permissions are:

  1. NONE
    No permissions
  2. SEND_MESSAGE
    Can send message to queue
  3. RECEIVE_MESSAGE
    Can receive message from queue
  4. SEND_RECEIVE_MESSAGE
    Equivalent to a combination of permissions 2 and 3
  5. HANDLE_MESSAGE
    Can receive message from queue, can change message visibility, and can delete message
  6. SEND_HANDLE_MESSAGE
    Equivalent to a combination of permissions 2 and 5
  7. GET_QUEUE_INFO
    Can get Queue information
  8. USE_QUEUE
    Equivalent to a combination of permissions 6 and 7
  9. ADMIN_QUEUE
    Except for not setting permissions for users, all permissions of the queue owner
  10. PEEK_MESSAGE
    Query all status information
  11. DELETE_PEEK_MESSAGE
    Delete messages that have not been received
  12. FULL_CONTROL
    All permissions of the queue owner. The queue owner has this permission by default.

Return void

revokePermission()


Cancel other users' access to queue
The user performing this operation needs the FULL_CONTROL permission of the queue

Parameters RevokePermissionRequest

queueName : String : required
teamId : String : required

The teamId whose permissions were removed

Return void

queryPermission()


Query permissions for a queue
Users who perform this operation do not need to have any permissions for the queue that they want to query

Parameter QueryPermissionRequest

queueName : String : required

Return QueryPermissionResponse

permission : Permission

For the specific meaning of the permissions see setPermission()

queryPermissionForId()


Query other users' permissions for the queue. The user performing this operation needs to have the ADMIN_QUEUE permission for the queue

Parameters QueryPermissionForIdRequest

queueName : String : required
teamId : String : required

The teamId of the queried user

Return QueryPermissionForIdResponse

permission : Permission

listPermissions()


List each user's permissions for the queue. The user performing this operation needs to have the ADMIN_QUEUE permission for the queue

Parameters ListPermissionsRequest

queueName : String : required

Return ListPermissionsResponse

permissionList : Map< String, Permission >

Return the mapping from teamId to its owned permission