All Products
Search
Document Center

Application Real-Time Monitoring Service:Custom RAM policies for ARMS

Last Updated:Oct 16, 2026

If system policies do not meet your requirements, you can create custom policies. Custom policies provide fine-grained access control and enhance the security of your resource access. This topic describes how to use custom policies for ARMS.

What is a custom policy?

Resource Access Management (RAM) policies are classified into system policies and custom policies. You can manage custom policies based on your business requirements.

  • After you create a custom policy, you must attach the policy to a RAM user, RAM user group, or RAM role. This way, the permissions that are specified in the policy can be granted to the principal.

  • You can delete a RAM policy that is not attached to a principal. If the RAM policy is attached to a principal, before you can delete the RAM policy you must detach the RAM policy from the principal.

  • Custom policies support version control. You can manage custom policy versions based on the version management mechanism provided by RAM.

References

Prerequisites

Important

This feature is enabled by default for Alibaba Cloud accounts that activated ARMS after 00:00 on April 1, 2022. If you activated ARMS before this date, you must submit a ticket to enable the feature.

  • Before you create a custom policy, understand the basic structure and syntax of permission policies. For more information, see Basic elements of a permission policy.

  • The RAM user must have the ReadOnlyAccess or AliyunARMSReadOnlyAccess system policy attached to log on to the ARMS console.

    Important

    To grant the read-only permissions on all ARMS features to a specific resource group, you must attach the AliyunARMSReadOnlyAccess policy to and grant the ReadTraceApp permission to the resource group. Otherwise, ARMS cannot display the application list that belongs to the authenticated resource group.

  • Make sure that the AliyunARMSFullAccess system policy is not attached to the RAM user.

Background information

ARMS provides system policies that grant coarse-grained permissions. If these policies do not meet your requirements, you can create custom policies. For example, to control a RAM user's permissions on a specific application, you must use a custom policy.

Step 1: Create a custom policy

  1. Log on to the RAM console as a RAM administrator.

  2. In the left-side navigation pane, choose Permissions > Policies.

  3. On the Policies page, click Create Policy.

  4. On the Create Policy page, click the JSON tab. Write your policy content in the policy editor.

    For more information about the elements in a permission policy, see Policy elements.

    Example: This policy grants read-only permissions on applications in the China (Hangzhou) region that have the tag key0: value01 or key0: value02.

    {
      "Version": "1",
      "Statement": [
        {
          "Action": [
            "arms:ReadTraceApp"
          ],
          "Resource": "acs:arms:cn-hangzhou:*:armsapp/*",
          "Effect": "Allow",
          "Condition": {
            "StringEquals": {
              "arms:tag/key0":[
                "value01",
                "value02"
              ]
            }
          }
        }
      ]
    }
  5. At the top of the page, click Optimize, and then click Perform to perform advanced optimization on the policy.

    The advanced policy optimization feature performs the following tasks:

    • Splits resources or conditions for incompatible actions.

    • Narrows the scope of resources.

    • Removes duplicate statements or merges statements.

  6. On the Create Policy page, click OK.

  7. In the Create Policy dialog box, enter a Policy Name and Description, and then click OK.

Step 2: Attach a permission policy

Attach permission policy to a RAM user

Console

The RAM console offers two entry points, both supporting single and batch authorization:

  • Users page: The principal is auto-selected based on the users you choose. Best for user-centric workflows.

  • Grants page: You manually select principals and can view all authorization records across your account. Best for permission-centric workflows.

Note

Tip: For large-scale management, add RAM users with identical responsibilities to a user group, then grant permissions to the group. Navigate to Identities > User Groups to manage groups.

From the Users page
  1. Log on to the RAM console.

  2. In the left-side navigation pane, choose Identities > Users.

  3. On the Users page, find the target RAM user and click Actions column > Attach Policy.

    You can also select multiple RAM users and click Attach Policy below the user list for batch authorization.

  4. In the Grant Permission panel, configure the following settings:

    • Resource scope:

      • Account level: Permissions apply to all resources in your Alibaba Cloud account.

      • Resource group level: Permissions apply only within the specified resource group. After logging on, the RAM user must switch to the authorized resource group in the top navigation bar.

        Note
        1. The system marks high-risk system policies (such as AdministratorAccess and AliyunRAMFullAccess) with a warning indicator. These policies typically grant full control over all cloud resources or full management of RAM. Grant these policies with caution.

        2. For resource group authorization examples, see Control RAM user access to specific ECS instances.

    • Principal:

      The principal is the RAM user receiving permissions. From the Users page, the system auto-selects the current user. From the Grants page, you must manually select the user. Batch selection is supported.

    • Permission policy:

      • System policy: Search and select. Filter by product name (e.g., ECS, OSS), access level (e.g., ReadOnly, FullAccess), or full policy name. For example, to grant permissions for financial management (expenses and costs), search for BSS to find AliyunBSSFullAccess (full access to Billing and Cost Management) and other finance-related policies.

        The following table lists system policy names for commonly requested Alibaba Cloud products to help you quickly find the right policy.

        Product

        System policy name

        Access level

        Billing and cost management (finance)

        AliyunBSSFullAccess

        Full access

        Cloud Monitor

        AliyunCloudMonitorReadOnlyAccess

        Read-only

        China Gateway (Website Builder)

        AliyunWebsiteBuildFullAccess

        Full access

        Alibaba Cloud DevOps

        AliyunRDCFullAccess

        Full access

        Model Studio (Bailian)

        AliyunBailianFullAccess

        Full access

        Alibaba Cloud DNS

        AliyunDNSFullAccess

        Full access

        SSL Certificates Service

        AliyunYundunCertFullAccess

        Full access

        Cloud Phone

        AliyunECDFullAccess

        Full access

        Support Center

        AliyunSupportFullAccess

        Full access

        Resource Center

        AliyunResourceCenterFullAccess

        Full access

        AgentBay

        AliyunAgentBayFullAccess

        Full access

        Security Center

        AliyunYundunSASFullAccess

        Full access

        If you cannot find the policy for your target product, see the System policy reference for the complete list, or create a custom policy for fine-grained access control.

      • Custom policy: You must Create a custom policy before you can grant it.

      • Pagination limit for select all: The policy list is paginated. Selecting all applies only to the current page. After you switch pages, previously selected policies remain in the selected list, but policies on the new page are not automatically selected; you must select them page by page.

      • Quickly grant administrator permissions: To grant administrator permissions, search for AdministratorAccess in the search box and select it directly, instead of selecting policies page by page. Selecting this policy triggers a high-risk authorization warning.

    • (Optional) Description: Enter the authorization reason or scenario for audit purposes.

    • Click Confirm.

  5. Review the authorization result and click Close.

From the Grants page
  1. Log on to the RAM console.

  2. In the left-side navigation pane, choose Permissions > Grants.

  3. On the Grants page, click Grant Permission.

  4. In the Grant Permission panel, select the principal and configure the same settings as described above.

  5. Review the authorization result and click Close.

Note

RAM users created through the Quick Start feature on the RAM console Overview page are automatically granted the corresponding system policy based on the selected scenario, with no manual authorization required:

  • Super user: Automatically granted the PowerUserAccess policy. This user can manage cloud services and resources, but cannot manage RAM identities and their permissions, resource directories, or billing accounts.

  • Account administrator: Automatically granted the AdministratorAccess policy. This user can manage all Alibaba Cloud resources, including RAM identities and permissions.

Use these options only when super administrator privileges are truly required. For routine operations, follow the principle of least privilege and grant only the permissions required for the specific task.

OpenAPI

Grant a custom policy
  1. Call CreatePolicy to create a custom policy. For policy syntax, see Permission policy elements and Overview of sample policies.

  2. Call AttachPolicyToUser to grant the policy at the account level (set PolicyType to Custom).

    Alternatively, call AttachPolicy to grant the policy at the resource group level.

Grant a system policy

Attach a permission policy to a RAM role

After you attach a permission policy to a RAM role, you can use the RAM role to log on to the ARMS console. For more information, see Assume a RAM role.

Permission policy elements

Effect

The authorization effect can be Allow or Deny.

Action

Action

Permission description

arms:ReadTraceApp

Read-only permission for Application Real-Time Monitoring Service (ARMS). This permission lets you view information such as application overviews, API calls, and application diagnostics.

arms:EditTraceApp

Edit permission for ARMS. This permission lets you customize application configurations and set custom parameters.

arms:DeleteTraceApp

Delete permission for ARMS. This permission lets you delete applications.

Resource

Specifies the object that the authorization applies to.

The format is as follows:

"Resource": [
     "acs:arms:<regionid>:*:armsapp/<appname>"
 ]
  • Replace <regionid> with the ID of a specific region. To grant permissions on resources in all regions, use an asterisk (*).

  • Replace <appname> with the name of a specific application. To grant permissions on all applications, use an asterisk (*). If the authorization applies to applications that share a name prefix, use prefix*, such as k8s*.

Condition

A condition block consists of one or more condition clauses. A condition clause consists of a condition operator, a condition key, and a condition value. Condition block evaluation logic

Evaluation logic:

  • The condition is met if the key's value in the request matches any of the values in the policy (a logical OR).

  • If a condition clause contains multiple condition keys, all keys must match for the clause to be met (a logical AND).

  • The entire condition block is met only if all its clauses are met (a logical AND).

ARMS lets you use tag key-value pairs to specify the objects for authorization. For more information about how to set application tags, see Tag management.

  • The following condition operators are supported for tag key-value pairs:

    • StringEquals

    • StringNotEquals

    • StringEqualsIgnoreCase

    • StringNotEqualsIgnoreCase

    • StringLike

    • StringNotLike

  • Condition key: arms:tag.

  • Condition value: The tag key-value pair.

Example: Grant permissions to applications where the tag key-value pair is key0: value01 or key0: value02.

"Condition": {
  "StringEquals": {       // Condition operator.
    "arms:tag/key0":[      // Condition key
      "value01",        // Condition value
      "value02"
    ]
  }
}

Authorization reference

To use custom policies, understand your service's permission requirements and the authorization information for Application Real-Time Monitoring Service (ARMS). For more information, see Authorization information.