Updated on 2023-12-20 GMT+08:00

Permissions and Supported Actions

This chapter describes fine-grained permissions management for your DMS for RocketMQ instances. If your HUAWEI ID 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

Permission

API

Action

IAM Project

Enterprise Project

Creating a Pay-per-Use Instance

POST /v2/{project_id}/instances

dms:instance:create

Querying the Instance List

GET /v2/{project_id}/instances

dms:instance:list

Querying an Instance

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

dms:instance:get

Deleting an Instance

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

dms:instance:delete

Modifying Instance Information

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

dms:instance:modify

Batch Deleting Instances

POST /v2/{project_id}/instances/action

dms:instance:delete

Modifying a Topic

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

dms:instance:modify

Querying the Topic Consumer Group List

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

dms:instance:get

Querying the Number of Messages in a Topic

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

dms:instance:get

Querying Messages

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

dms:instance:get

Creating a User

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

dms:instance:modify

Querying the User List

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

dms:instance:get

Querying User Details

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

dms:instance:get