Help Center/ Cloud Eye/ User Guide/ Using IAM to Grant Access to Cloud Eye/ Using IAM Identity Policies to Grant Access to Cloud Eye
Updated on 2025-11-21 GMT+08:00

Using IAM Identity Policies to Grant Access to Cloud Eye

System-defined permissions in "Identity Policy-based Authorization" provided by Identity and Access Management (IAM) let you control access to Cloud Eye resources. With IAM, you can:

  • Create IAM users or a user group for employees based on your enterprise's organizational structure. Each IAM user will have their own security credentials for accessing Cloud Eye resources.
  • Grant only the minimum permissions required for users to perform a given task.
  • Entrust an account of Huawei Cloud or a cloud service to perform efficient O&M on your Cloud Eye resources.

If your Huawei Cloud account meets your permissions requirements, you can skip this section.

Figure 1 shows the process flow of identity policy-based authorization.

Prerequisites

You have learned about system-defined permissions supported by Cloud Eye. For details, see section "Permissions" in Cloud Eye Service Overview. To grant permissions for other services, learn about all system-defined permissions supported by IAM.

Process Flow

Figure 1 Process of granting Cloud Eye permissions
  1. Refer to the operations described in Creating a User or Creating a User Group.

    Log in to the IAM console to create a user or user group.

  2. Attach a system-defined identity policy to the user or user group.

    Assign the permissions defined in the system-defined identity policy (CESServiceReadOnlyPolicy as an example) to the user or group, or attach the system-defined identity policy to it.

  3. Log in using the IAM user and verify permissions.

    Perform the following operations:

    • Choose Service List > Cloud Eye. In the navigation pane, choose Alarm Management > Alarm Rule, and click Create Alarm Rule in the upper right corner. If the alarm rule cannot be created, the CESServiceReadOnlyPolicy (assume that only this permission granted) is in effect.
    • Choose another service from Service List. If a message appears indicating that you have insufficient permissions to access the service, the CESServiceReadOnlyPolicy (assume that only this permission granted) is in effect.

Custom Identity Policies for Cloud Eye

You can create custom identity policies to supplement system-defined identity policies. For details about actions supported in custom identity policies, see Actions Supported by Identity Policy-based Authorization.

You can create custom identity policies in either of the following ways on Huawei Cloud:

  • Visual editor: Select cloud services, actions, resources, and request conditions. You do not need to have knowledge of the policy syntax.
  • JSON: Create a JSON policy or edit an existing one.

For details, see Creating a Custom Identity Policy and Attaching It to a Principal.

When creating a custom identity policy, use the Resource element to specify the resources the identity policy applies to and use the Condition element (service-specific condition keys) to control when the identity policy is in effect. For details about the supported resource types and condition keys, see Identity Policy-based Authorization. The following are examples of custom Cloud Eye identity policies.

  • Example 1: Granting permissions to modify an alarm rule
    {
        "Version": "5.0",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [              
                    "ces:alarms:put"
                ]
            }
        ]
    }

  • Example 2: Creating a custom identity policy containing multiple actions
    A custom identity policy can contain the actions of multiple services. The following is a policy with multiple actions:
    {
        "Version": "5.0",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "ces:alarms:put",
                    "ces:alarms:create",
                    "ces:alarms:list",
                    "ces:alarms:delete"                
                ]
            },        
            {
                "Effect": "Allow",
                "Action": [
                    "ecs:cloudServers:createServers",
                    "ecs:cloudServers:listServersDetails"
                ]
            }
        ]
    }