Help Center> Distributed Message Service for RocketMQ> API Reference> Permissions Policies and Supported Actions
Updated on 2023-01-04 GMT+08:00

Permissions Policies and Supported Actions

This chapter describes fine-grained permissions management for your DMS for RocketMQ instances. If your HUAWEI CLOUD account does not require individual IAM users, you can skip this chapter.

By default, new IAM users do not have any permissions assigned. You need to add a user to one or more groups, and assign permissions policies to these groups. The user then inherits permissions from the groups it is a member of. This process is called authorization. After authorization, the user can perform specified operations on cloud resources based on the permissions.

You can grant users permissions by using roles and policies. Roles are a type of coarse-grained authorization mechanism that defines permissions related to user responsibilities. Policies define API-based permissions for operations on specific resources under certain conditions, allowing for more fine-grained, secure access control of cloud resources.

Policy-based authorization is useful if you want to allow or deny the access to an API.

An account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. The permissions required for calling an API are determined by the actions supported by the API. Only users who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user creates a RocketMQ instance using an API, the user must have been granted permissions that allow the dms:instance:create action.

Supported Actions

DMS for RocketMQ provides system-defined policies that can be directly used in IAM. You can also create custom policies and use them to supplement system-defined policies, implementing more refined access control. Operations supported by policies are specific to APIs. The following are common concepts related to policies:

  • Permissions: Statements in a policy that allow or deny certain operations.
  • APIs: REST APIs that can be called by a user who has been granted specific permissions.
  • Actions: Added to a custom policy to control permissions for specific operations.
  • IAM projects or enterprise projects: A custom policy can be applied to IAM projects or enterprise projects or both. Policies that contain actions for both IAM and enterprise projects can be used and take effect for both IAM and Enterprise Management. Policies that only contain actions for IAM projects can be used and only take effect for IAM. For details about the differences between IAM and enterprise projects, see What Are the Differences Between IAM and Enterprise Management?

DMS for RocketMQ supports the following actions that can be defined in custom policies. Permissions must be obtained before calling APIs. For details on how to obtain permissions, visit the Identity and Access Management help center.

Table 1 DMS for RocketMQ actions




IAM Project

Enterprise Project

Creating a Pay-per-Use Instance

POST /v2/{project_id}/instances


Querying the Instance List

GET /v2/{project_id}/instances


Querying an Instance

GET /v2/{project_id}/instances/{instance_id}


Deleting an Instance

DELETE /v2/{project_id}/instances/{instance_id}


Modifying Instance Information

PUT /v2/{project_id}/instances/{instance_id}


Batch Deleting Instances

POST /v2/{project_id}/instances/action


Modifying a Topic

PUT /v2/{project_id}/instances/{instance_id}/topics/{topic}


Querying the Topic Consumer Group List

GET /v2/{project_id}/instances/{instance_id}/topics/{topic}/groups


Querying the Number of Messages in a Topic

GET /v2/{project_id}/instances/{instance_id}/topics/{topic}/status


Querying Messages

GET /v2/{engine}/{project_id}/instances/{instance_id}/messages


Creating a User

POST /v2/{project_id}/instances/{instance_id}/users


Querying the User List

GET /v2/{project_id}/instances/{instance_id}/users


Querying User Details

GET /v2/{project_id}/instances/{instance_id}/users/{user_name}