Permissions Policies and Supported Actions
Introduction
This section describes fine-grained permissions management for RES. If your HUAWEI CLOUD account does not require individual IAM users, skip this section.
By default, new IAM users do not have permissions assigned. You need to add the users to one or more groups, and attach permissions policies or roles to these groups. Users inherit permissions from the groups to which they are added and can perform specified operations on cloud services based on the permissions.
You can grant users permissions by using roles and policies. Role is a type of coarse-grained authorization mechanism provided by IAM that defines permissions related to user responsibilities. Policy defines 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 access to an API.
An account has all the permissions required to call all APIs, but 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 who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user queries ECSs using an API, the user must have been granted permissions that allow the ecs:servers:list action.
Supported Actions
RES 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. Actions supported by policies are specific to APIs. The following are common concepts related to policies:
- Permission: a statement in a policy that allows or denies certain operations.
- Action: added to a custom policy to control permissions for specific operations.
- API: RESTful APIs that can be called in a custom policy.
- Authorization scope: 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 for IAM projects can be used and only take effect for IAM. For details on the differences between IAM and enterprise projects, see Differences Between IAM and Enterprise Management.
RES supports the following actions that can be defined in custom policies:
|
Permission |
Action |
API |
Authorization Scope |
|---|---|---|---|
|
Creating a workspace |
res:workspace:add |
POST:/v2.0/{project_id:\w{32}}/workspaces |
IAM project
Enterprise projects |
|
Querying the details about a workspace |
res:workspace:get |
GET:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}} |
|
|
Querying the list of workspaces |
res:workspace:list |
GET:/v2.0/{project_id:\w{32}}/workspaces |
|
|
Modifying a workspace |
res:workspace:modify |
PUT:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}} |
|
|
Deleting a workspace |
res:workspace:delete |
DELETE:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}} |
|
|
Adding a data source |
res:data-source:add |
POST:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/data-sources |
|
|
Querying the data source details |
res:data-source:get |
|
|
|
Querying the list of data sources |
res:data-source:list |
GET:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/data-sources |
|
|
Modifying a data source |
res:data-source:modify |
|
|
|
Deleting a data source |
res:data-source:delete |
DELETE:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/data-sources/{datasource_id:\w{32}} |
|
|
Creating a scenario |
res:scene:add |
|
|
|
Querying a scenario |
res:scene:get |
|
|
|
Querying the list of scenarios |
res:scene:list |
GET:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/scenes |
|
|
Modifying a scenario |
res:scene:modify |
|
|
|
Deleting a scenario |
res:scene:delete |
DELETE:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/scenes/{scene_id:\w{32}} |
|
|
Running a scenario |
res:scene:run |
POST:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/resources/{resource_id:\w{32}}/schedule-scene |
|
|
Creating a job |
res:job:add |
|
|
|
Querying the details about a job |
res:job:get |
|
|
|
Querying the list of jobs |
res:job:list |
|
|
|
Modifying a job operator |
res:job:modify |
|
|
|
Deleting a task |
res:job:delete |
|
|
|
Running a job |
res:job:run |
POST:/v2.0/{project_id:\w{32}}/workspaces/{workspace_id:0|\w{32}}/resources/{resource_id:\w{32}}/jobs/{job_id:\w{32}}/schedule-job |
Last Article: Querying the Image Lists
Next Article: Appendix
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.