edit-icon download-icon

Delete permission

Last Updated: Oct 17, 2018

This interface is exclusive for MQ Enterprise Platinum edition users. For more information, go to Enterprise Platinum Edition Purchase.


OnsEmpowerDelete interface deletes a previously created authorization, to remove the created permission to access resources across accounts.


After creating authorizations, the owner account can call this interface to remove the Topic access permission across accounts.


  • The caller must be the resource owner account.
  • The authorization to be deleted must exist.

Restrictions on primary accounts and sub-accounts

This interface is exclusively available for primary accounts, and cannot be used by RAM sub-accounts.

Request parameters

Name Type Required Description
OnsRegionId String Yes The region where the queried MQ is currently located. It can be obtained through the OnsRegionList method.
OnsPlatform String No The source of the request, which by default is POP platform.
PreventCache Long Yes It’s used for CSRF verification. Set it to the current system time.
EmpowerUser Long Yes The authorized target user ID; supports sub-account ID
Topic String Yes The authorized target Topic which must be owned by the current user.

Response parameters

Name Type Description
RequestId String A public parameter unique for each request
HelpUrl String A help link
  • OnsEmpowerCreate: creates authorization
  • OnsEmpowerList: views the authorization list


  1. public static void main(String []args) {
  2. public static void main(String []args) {
  3. String regionId = "cn-hangzhou";
  4. String accessKey = "XXXXXXXXXXXXXXXXX";
  5. String secretKey = "XXXXXXXXXXXXXXXXX";
  6. String endPointName ="cn-hangzhou";
  7. String productName ="Ons";
  8. String domain ="ons.cn-hangzhou.aliyuncs.com";
  9. /**
  10. *Select Region based on the region you will access, and set the corresponding access point.
  11. */
  12. try {
  13. DefaultProfile.addEndpoint(endPointNameregionIdproductNamedomain);
  14. } catch (ClientException e) {
  15. e.printStackTrace();
  16. }
  17. IClientProfile profile= DefaultProfile.getProfile(regionIdaccessKeysecretKey);
  18. IAcsClient iAcsClient= new DefaultAcsClient(profile);
  19. OnsEmpowerDeleteRequest request = new OnsEmpowerDeleteRequest();
  20. request.setOnsRegionId("cn-qingdao-publictest");
  21. request.setPreventCache(System.currentTimeMillis());
  22. request.setAcceptFormat(FormatType.JSON);
  23. request.setEmpowerUser("16753563236808602");
  24. request.setTopic("Topic_for_public_msg_test");
  25. try {
  26. OnsEmpowerDeleteResponse response=iAcsClient.getAcsResponse(request);
  27. System.out.println(response.getRequestId());
  28. } catch (ServerException e) {
  29. e.printStackTrace();
  30. } catch (ClientException e) {
  31. e.printStackTrace();
  32. }
  33. }
  34. }
Thank you! We've received your feedback.