Help Center/ Cloud Connect/ User Guide/ Cloud Connection Operation Guide/ Using IAM to Grant Access to Cloud Connect/ Using IAM Roles or Policies to Grant Access to Cloud Connections
Updated on 2026-01-16 GMT+08:00

Using IAM Roles or Policies to Grant Access to Cloud Connections

System-defined permissions in role/policy-based authorization provided by IAM let you control access to Cloud Connect resources. With IAM, you can:

  • Create IAM users for personnel based on your enterprise's organizational structure. Each IAM user has their own identity credentials for accessing Cloud Connect resources.
  • Grant users only the permissions required to perform a given task based on their job responsibilities.
  • Entrust a Huawei Cloud account or a cloud service to perform efficient O&M on your Cloud Connect resources.

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

Figure 1 shows the process of authorization with policies/roles.

Prerequisites

Before granting permissions to user groups, learn about system-defined permissions in Role/Policy-based Authorization for Cloud Connect. To grant permissions for other services, learn about all system-defined policies/roles supported by IAM.

Process Flow

Figure 1 Process of granting Cloud Connect permissions using role/policy-based authorization
  1. On the IAM console, create a user group and grant it permissions (the Cross Connect Administrator role as an example).
  2. Create an IAM user and add the user to the created user group.
  3. Log in to the Cloud Connect console as the IAM user and verify that the user only has read permissions for Cloud Connect.
    • In the service list, choose Networking > Cloud Connect. Click Create Cloud Connection in the upper right corner. If the cloud connection can be created, the Cross Connect Administrator role has taken effect.
    • Choose any other service in the service list. If a message appears indicating that you have insufficient permissions to access the service, the Cross Connect Administrator role is in effect.

Example Custom Policies

Custom policies can be created to supplement system-defined policies. For the actions supported by custom policies, see Actions Supported by Policy-based Authorization in the Cloud Connect API Reference.

You can create custom policies in either of the following ways:

  • Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
  • JSON: Create a JSON policy or edit an existing one.

For details, see Creating a Custom Policy. The following are examples of common custom policies.

  • Example 1: Allowing users to delete cloud connections
    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "cc:cloudConnections:delete"
                ]
            }
        ]
    }
  • Example 2: Denying bandwidth package deletion

    A policy with only "Deny" permissions must be used in conjunction with other policies to take effect. If the policies assigned to a user contain both Allow and Deny actions, the Deny actions take precedence over the Allow actions.

    The following method can be used if you need to assign permissions of the CC FullAccess policy to a user but also forbid the user from deleting topics. Create a custom policy for denying topic deletion, and assign both policies to the group the user belongs to. Then the user can perform all operations on Cloud Connect resources except deleting bandwidth packages. The following is an example of a deny policy:

    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Deny",
                "Action": [
                    "cc:bandwidthPackages:delete"
                ]
            }
        ]
    }
  • Example 3: Creating a custom policy containing multiple actions

    A custom policy can contain the actions of multiple services that are of the global or project-level type. The following is a custom policy containing multiple actions:

    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "cc:bandwidthPackages:create",
                    "cc:cloudConnections:create",
                    "cc:bandwidthPackages:delete",
                    "cc:cloudConnections:delete"
                ]
            },
            {
                "Effect": "Allow",
                "Action": [
                    "eps:enterpriseProjects:enable",
                    "eps:enterpriseProjects:update",
                    "eps:enterpriseProjects:create",
                    "eps:enterpriseProjects:delete"
                ]
            }
        ]
    }