Help Center/ Cloud Data Center/ User Guide/ Using IAM to Manage CloudDC Permissions/ Using IAM Identity Policies to Grant Access to CloudDC
Updated on 2026-10-10 GMT+08:00

Using IAM Identity Policies to Grant Access to CloudDC

System-defined permissions in Permissions provided by Identity and Access Management (IAM) let you control access to CloudDC. With IAM, you can:

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

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

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

Prerequisites

Before granting permissions, learn about system-defined permissions for CloudDC in Permissions.

Process Flow

Figure 1 Process of granting CloudDC permissions
  1. Create an IAM user or user group.

    On the IAM console, create an IAM 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 CloudDCConsoleReadOnlyPolicy to the user or group, or attach the system-defined identity policy to it.

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

    Log in to the CloudDC console as an authorized user and verify the permissions.

    • On the CloudDC console, click Buy Resources. If a message appears indicating that you have insufficient permissions to perform the operation, the CloudDCConsoleReadOnlyPolicy policy is in effect.
    • Choose any other service in Service List. If a message appears indicating that you have insufficient permissions to access the service, the CloudDCConsoleReadOnlyPolicy policy is in effect.

Example Custom Identity Policies

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

To create a custom identity policy, choose either visual editor or JSON.

  • 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.
  • The following lists examples of how to create common custom identity policies of CloudDC in the visual editor.

According to the IAM permission security principle, the permissions related to CBC billing and OBS buckets cannot be added to the system-defined policy FullAccess. If you need to use these permissions, add them to a custom policy.

For details about required identity policies, see Identity Policies Required for CloudDC Console Operations.

Example 1: Creating a custom identity policy (granting renewal and unsubscription permissions)

  1. Log in to the IAM console. In the left navigation pane, choose Identity Policies.
  2. Click Create Custom Policy in the upper right corner of the Identity Policies page.
  3. On the Create Custom Policy page, configure the identity policy.
  4. Enter a policy name for Policy Name.
  5. Select Visual editor for Policy View.
  6. Set Policy Content as follows:

    1. Select Allow.
    2. Select service: Search for the service to be authorized (for example, Billing Center).
    3. Select action: Select the actions to be authorized (for example, billing:subscription:renew and billing:subscription:unsubscribe).

  7. Click OK.

Example 2: Granting a custom identity policy for unsubscription and renewal to all users in a user group

  1. Log in to the IAM console, and choose User Groups in the navigation pane.
  2. Click the name of the user group to be authorized.
  3. On the displayed page, click Authorize. The Select Identity Policies page is displayed.

  4. In the search box in the upper right corner of the Select Identity Policies page, search for the custom identity policy to be authorized based on the identity policy name.

  5. Click OK.
  6. (Optional) Check the identity policies that have been authorized to the user group. Click the user group name. On the displayed page, click the Permissions tab page to view the authorized identity policies.

  7. (Optional) Click the name of a custom identity policy to view the policy content.

  • The following provides examples of common custom CloudDC identity policies in JSON view.
    • Example 1: Grant permissions related to OBS to create private images using CloudDC.
      {
        "Version": "5.0",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "obs:object:getObject",
              "obs:object:getObjectAcl",
              "obs:bucket:getBucketAcl",
              "obs:bucket:getBucketLocation",
              "obs:bucket:headBucket",
              "obs:bucket:listBucket"
            ]
          }
        ]
      }
    • Example 2: Create a custom identity policy containing multiple actions.

      A custom identity policy can contain the actions of one or multiple services. Example policy containing multiple actions:

      {
        "Version": "5.0",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "clouddc:instance:updateIP",
              "clouddc:imetal:updatePowerStatus"
            ]
          },
          {
            "Effect": "Allow",
            "Action": [
              "obs:object:getObject",
              "obs:object:getObjectAcl",
              "obs:bucket:getBucketAcl",
              "obs:bucket:getBucketLocation",
              "obs:bucket:headBucket",
              "obs:bucket:listBucket"
            ]
          },
          {
            "Effect": "Allow",
            "Action": [
              "billing:subscription:renew",
              "billing:subscription:unsubscribe"
            ]
          }
        ]
      }