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

Permissions and Supported Actions

This chapter describes fine-grained permissions management for your RabbitMQ instances. If your HUAWEI ID does not need individual IAM users, then you may skip over 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 services 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.

You can use policies to allow or deny access to specific APIs.

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

Supported Actions

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

  • Permission: A statement in a policy that allows or denies certain operations.
  • APIs: REST APIs that can be called in a custom policy.
  • 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 supporting both IAM and enterprise projects can be assigned to user groups and take effect in both IAM and Enterprise Management. Policies that only contain actions supporting IAM projects can be assigned to user groups and only take effect for IAM. Such policies will not take effect if they are assigned to user groups in Enterprise Management.

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

Table 1 DMS for RabbitMQ actions

Permissions

APIs

Actions

IAM Projects

Enterprise Projects

Creating a Pay-per-Use Instance

POST /v2/{project_id}/instances

dms:instance:create

Deleting an Instance

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

dms:instance:delete

Modifying an Instance

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

dms:instance:modify

Querying an Instance

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

dms:instance:get

Restarting or Deleting Instances in Batches

POST /v2/{project_id}/instances/action

Restart: dms:instance:modifyStatus

Delete: dms:instance:delete

Listing All Instances

GET /v2/{project_id}/instances

dms:instance:list

Listing Plug-ins

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

dms:instance:list

Enabling or Disabling a Plug-in

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

dms:instance:modify

Resetting a Password

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

dms:instance:resetAuthInfo

Modifying Instance Specifications

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

dms:instance:scale

Listing Background Tasks

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

dms:instance:getBackgroundTask

Querying a Background Task

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

dms:instance:getBackgroundTask

Deleting a Background Task

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

dms:instance:deleteBackgroundTask

Adding or Deleting Instance Tags in Batches

POST /v2/{project_id}/rabbitmq/{instance_id}/tags/action

dms:instance:modify

Listing Tags of an Instance

GET /v2/{project_id}/rabbitmq/{instance_id}/tags

dms:instance:get

Querying Project Tags

GET /v2/{project_id}/rabbitmq/tags

dms:instance:get

Enabling or Disabling Public Access

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

dms:instance:modify