Help Center/ Distributed Cache Service/ API Reference/ Permissions Policies and Supported Actions
Updated on 2022-09-19 GMT+08:00

Permissions Policies and Supported Actions

This chapter describes fine-grained permissions management for your DCS. If your account does not need individual IAM users, you can skip the configurations described in 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.

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

An account has all the permissions required to call all APIs, and IAM users must be assigned the required permissions. 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 wants to query ECSs using an API, the user must have been granted permissions that allow the dcs:servers:list action.

Supported Actions

DCS 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. Actions supported by policies are specific to APIs. Common concepts related to policies include:

  • Permissions: Allow or deny certain operations.
  • APIs: APIs that will be called for performing certain operations.
  • Actions: added to a custom policy to control permissions for specific operations.
  • Dependent actions: When assigning permissions for an action, you also need to assign permissions for the dependent actions.
  • IAM projects and enterprise projects: type of projects for which an action will take effect. 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. If an action supports only IAM projects, the policy will take effect only for user groups assigned in IAM. Administrators can check whether an action supports IAM projects or enterprise projects in the action list. "√" indicates that the action supports the project and "×" indicates that the action does not support the project.

Table 1 lists the API actions supported by DCS.

Table 1 DCS actions

Permission

Action

API

IAM Projects

Enterprise Project

Creating a DCS instance

dcs:instance:create

POST /v1.0/{project_id}/instances

Querying an instance

dcs:instance:get

GET /v1.0/{project_id}/instances/{instance_id}

Modifying the information about an instance

dcs:instance:modify

PUT /v1.0/{project_id}/instances/{instance_id}

Deleting an instance

dcs:instance:delete

DELETE /v1.0/{project_id}/instances/{instance_id}

Scaling up an instance

dcs:instance:scale

POST /v1.0/{project_id}/instances/{instance_id}/extend

Querying all instances

dcs:instance:list

GET /v1.0/{project_id}/instances

Querying instance configuration parameters

dcs:instance:getConfiguration

GET /v1.0/{project_id}/instances/{instance_id}/configs

Modifying instance configuration parameters

dcs:instance:modifyConfigureation

PUT /v1.0/{project_id}/instances/{instance_id}/configs

Restarting an instance or clearing instance data

dcs:instance:modifyStatus

PUT /v1.0/{project_id}/instances/status

Changing the instance password

dcs:instance:modifyAuthInfo

PUT /v1.0/{project_id}/instances/{instance_id}/password

Backing up an instance

dcs:instance:backupData

POST /v1.0/{project_id}/instances/{instance_id}/backups

Restoring an instance

dcs:instance:restoreData

POST /v1.0/{project_id}/instances/{instance_id}/restores

Querying backup records

dcs:instance:getDataBackupLog

GET /v1.0/{project_id}/instances/{instance_id}/backups

Querying restoration records

dcs:instance:getDataRestoreLog

GET /v1.0/{project_id}/instances/{instance_id}/restores

Deleting backup files

dcs:instance:deleteDataBackupFile

DELETE /v1.0/{project_id}/instances/{instance_id}/backups/{backup_id}

Querying background tasks

dcs:instance:getBackgroundTask

GET /v1.0/{project_id}/instances/{instance_id}/tasks

Deleting background tasks

dcs:instance:deleteBackgroundTask

DELETE /v1.0/{project_id}/instances/{instance_id}/tasks/{task_id}

Resetting the instance password

dcs:instance:resetAuthInfo

API not supported.

Downloading backup files

dcs:instance:downloadBackupData

API not supported.

Migrating data

dcs:instance:migrateData

API not supported.

Web CLI

dcs:instance:webcli

API not supported.

Modifying the whitelist of an instance

dcs:whitelist:modify

PUT /v2/{project_id}/instance/{instance_id}/whitelist

Obtaining the whitelist of an instance

dcs:whitelist:list

GET /v2/{project_id}/instance/{instance_id}/whitelist

Creating a user for accessing an instance

dcs:aclaccount:create

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

Deleting an instance user

dcs:aclaccount:delete

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

Modifying the information about an instance user

dcs:aclaccount:modify

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

Obtaining the list of instance users

dcs:aclaccount:list

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