Updated on 2025-09-19 GMT+08:00

SWR Enterprise Edition Resources

A resource is an object that exists within a service. In SWR Enterprise Edition, resources include repositories, instances, charts. When creating a policy, you can select a resource by specifying its path.

Table 1 SWR resources and their paths

Resource

Resource Name

Path

repository

Image repository

[Format]

SWR:*:*:repository:image repository name

The first * is regionid, and the second * is domainid.

[Note]

For image repository resources, IAM automatically generates the resource path prefix (SWR:*:*:repository:).

For the path of a specific image repository, add the image repository name to the end. You can also use a wildcard character (*) to indicate any image repository. Example:

SWR:*:*:repository/* indicates any image repository.

swr:*:*:repository:test/nginx*: image repository whose name starts with nginx in the test namespace

swr:*:*:repository:test/nginx: image repository whose name starts with nginx in the test namespace

instance

SWR Enterprise Edition instance

[Format]

SWR:*:*:instance: SWR Enterprise Edition instance

The first * is regionid, and the second * is domainid.

[Notes]

For SWR Enterprise Edition instances, IAM automatically generates the resource path prefix (SWR:*:*:instance:).

For the path of a specific SWR Enterprise Edition instance, add the instance name to the end. You can also use a wildcard character (*) to indicate any instance. Example:

SWR:*:*:instance:example-instance indicates the SWR Enterprise Edition instance named example-instance.

chart

Chart repository

[Format]

SWR:*:*:chart:chart repository name

The first * is regionid, and the second * is domainid.

[Notes]

For chart repository resources, IAM automatically generates the resource path prefix (SWR:*:*:chart:).

For the path of a specific chart repository, add the chart repository name to the end. You can also use a wildcard character (*) to indicate any chart repository. Example:

SWR:*:*:chart:* indicates any chart repository.

For example, to allow users to perform operations only on the instance named example-instance, you can define the YAML file as follows:

{
    "Version": "1.1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "swr:instance:*"
            ],
            "Resource": [
                "SWR:*:*:instance:example-instance"
            ]
        }
    ]
}