Help Center/ SoftWare Repository for Container/ API Reference/ Permissions and Supported Actions
Updated on 2025-08-04 GMT+08:00

Permissions and Supported Actions

You can use Identity and Access Management (IAM) for fine-grained permissions management of your SWR. If your account does not need individual IAM users, you can skip this section.

New IAM users do not have any permissions assigned by default. You need to first add them to one or more groups and attach policies or roles to these groups. The users then inherit permissions from the groups and can perform specified operations on cloud services based on the permissions they have been assigned. For more information about policy syntax and examples, see Permissions Overview.

You can grant users permissions using roles and policies. Roles are provided by IAM to define service-based permissions that match users' job 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 the permissions required to call all APIs, but IAM users must be assigned the required permissions. The required permissions are determined by the actions supported by the API. Only users with the policies allowing for those actions can call the API successfully. For example, if an IAM user wants to call an API to query ECSs, the user must be granted the permissions allowing for action ecs:servers:list.

Supported Actions

SWR provides system-defined policies that 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 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: specific operations that are allowed or denied.
  • Dependencies: actions which a specific action depends on. When allowing an action for a user, you also need to allow any existing action dependencies for that user.
  • IAM projects/Enterprise projects: the authorization scope of a custom policy. 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 applied for both IAM and Enterprise Management. Policies that contain actions only for IAM projects can be used and applied to IAM only. For details about the differences between IAM and enterprise management, see What Are the Differences Between IAM and Enterprise Management?
  • SWR Shared Edition supports only IAM projects and does not support enterprise projects.
  • In the following table, √ indicates "supported" and x indicates "not supported".
Table 1 SWR actions in custom policies

Permission

API

Action

IAM Project

Creating an organization

POST /v2/manage/namespaces

swr:namespace:createNamespace

Deleting an organization

DELETE /v2/manage/namespaces/{namespace}

swr:namespace:deleteNamespace

Listing organizations

GET /v2/manage/namespaces

swr:namespace:listNamespaces

Querying details about an organization

GET /v2/manage/namespaces/{namespace}

swr:namespace:getNamespace

Creating an image

POST /v2/manage/namespaces/{namespace}/repos

swr:repo:createRepo

Deleting an image

DELETE /v2/manage/namespaces/{namespace}/repos/{repository}

swr:repo:deleteRepo

Updating an image

PATCH /v2/manage/namespaces/{namespace}/repos/{repository}

swr:repo:updateRepo

Listing images

GET /v2/manage/repos

swr:repo:listRepos

Querying details about an image

GET /v2/manage/namespaces/{namespace}/repos/{repository}

swr:repo:getRepo

Listing shared images

GET /v2/manage/shared-repositories

swr:repo:listSharedRepos

Deleting an image tag

DELETE /v2/manage/namespaces/{namespace}/repos/{repository}/tags/{tag}

swr:repo:deleteRepoTag

Listing image tags

GET /v2/manage/namespaces/{namespace}/repos/{repository}/tags

swr:repo:listRepoTags

Sharing an image with an account

POST /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains

swr:repo:createRepoDomain

Deleting an account from the sharing list

DELETE /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains/{access_domain}

swr:repo:deleteRepoDomain

Updating an account an image is shared with

PATCH /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains/{access_domain}

swr:repo:updateRepoDomain

Listing accounts an image is shared with

GET /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains

swr:repo:listRepoDomains

Querying details about an account an image is shared with

GET /v2/manage/namespaces/{namespace}/repositories/{repository}/access-domains/{access_domain}

swr:repo:getRepoDomain

Creating an automatic image synchronization task

POST /v2/manage/namespaces/{namespace}/repos/{repository}/sync_repo

swr:repo:createAutoSyncRepoJob

Deleting an automatic image synchronization task

DELETE /v2/manage/namespaces/{namespace}/repos/{repository}/sync_repo

swr:repo:deleteAutoSyncRepoJob

Listing automatic image synchronization tasks

GET /v2/manage/namespaces/{namespace}/repos/{repository}/sync_repo

swr:repo:listAutoSyncRepoJobs

Creating a manual image synchronization task

POST /v2/manage/namespaces/{namespace}/repos/{repository}/sync_images

swr:repo:createManualSyncRepoJob

Querying details about a manual image synchronization task

GET /v2/manage/namespaces/{namespace}/repos/{repository}/sync_job

swr:repo:getSyncRepoJobInfo

Creating a trigger

POST /v2/manage/namespaces/{namespace}/repos/{repository}/triggers

swr:repo:createTrigger

Deleting a trigger

DELETE /v2/manage/namespaces/{namespace}/repos/{repository}/triggers/{trigger}

swr:repo:deleteTrigger

Updating a trigger

PATCH /v2/manage/namespaces/{namespace}/repos/{repository}/triggers/{trigger}

swr:repo:updateTrigger

Listing triggers

GET /v2/manage/namespaces/{namespace}/repos/{repository}/triggers

swr:repo:listTriggers

Querying details about a trigger

GET /v2/manage/namespaces/{namespace}/repos/{repository}/triggers/{trigger}

swr:repo:getTrigger

Creating an image retention policy

POST /v2/manage/namespaces/{namespace}/repos/{repository}/retentions

swr:repo:createRetention

Deleting an image retention policy

DELETE /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/{retention_id}

swr:repo:deleteRetention

Updating an image retention policy

PATCH /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/{retention_id}

swr:repo:updateRetention

Listing image retention records

GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/histories

swr:repo:listRetentionHistories

Listing image retention policies

GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions

swr:repo:listRetentions

Querying details about an image retention policy

GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/{retention_id}

swr:repo:getRetention

Obtaining a login command

POST /v2/manage/utils/secret

swr:system:createLoginSecret

Querying quotas

GET /v2/manage/projects/{project_id}/quotas

swr:system:listQuotas

Creating an organization authorization

POST /v2/manage/namespaces/{namespace}/access

swr:namespace:createNamespaceAccess

Deleting an organization authorization

DELETE /v2/manage/namespaces/{namespace}/access

swr:namespace:deleteNamespaceAccess

Updating an organization authorization

PATCH /v2/manage/namespaces/{namespace}/access

swr:namespace:updateNamespaceAccess

Listing organization authorizations

GET /v2/manage/namespaces/{namespace}/access

swr:namespace:getNamespaceAccess

Creating an image authorization

POST /v2/manage/namespaces/{namespace}/repos/{repository}/access

swr:repo:createRepoAccess

Deleting an image authorization

DELETE /v2/manage/namespaces/{namespace}/repos/{repository}/access

swr:repo:deleteRepoAccess

Updating an image authorization

PATCH /v2/manage/namespaces/{namespace}/repos/{repository}/access

swr:repo:updateRepoAccess

Listing image authorizations

GET /v2/manage/namespaces/{namespace}/repos/{repository}/access

swr:repo:getRepoAccess

Querying resource statistics of the tenant

/v2/manage/reports/{resource_type}/{frequency}

swr:system:getDomainResourceReports

Querying brief tenant information

/v2/manage/overview

swr:system:getDomainOverview

(Shared Edition) Pulling an image

-

swr:repo:download

(Shared Edition) Pushing an image

-

swr:repo:upload

Querying details about an image with a specific tag

GET /v2/manage/namespaces/{namespace}/repos/{repository}/tags/{tag}

swr:repo:getRepoTag

In addition to the fine-grained authentication provided by IAM, you can also use the authentication provided by SWR. If an action is allowed by SWR authentication and it is not denied on IAM, this action will be allowed.

The actions swr::createLoginSecret, swr:namespace:listNamespaces, swr:repo:listRepos, swr::getDomainOverview, swr::getDomainResourceReports, swr:repo:listSharedRepos are allowed by SWR authentication by default. So, to block users from performing these actions, you need to configure "deny" policies for them in IAM.