View resource plans

Updated at:

After you purchase a DCDN resource plan, you can view its details, such as total capacity, remaining capacity, and expiration time.

Prerequisites

You have purchased a DCDN resource plan. For more information, see Resource plan overview.

Procedure

Method 1: Use the console

  1. Log on to the DCDN console.

  2. In the left-side navigation pane, choose Data Center > Usage .

  3. On the Resource Plans page, use the Active Resource Plans, Fully Used Resource Plans, and Expired Resource Plans tabs at the top to filter resource plans by status. The table on each tab displays the following information: Instance Name/ID, Resource Plan Name, Total, Remaining, Effective At, and Expired At. You can also directly purchase resource plans.

    Resource plans

  4. Optional:You can click Buy Resource Package to purchase resource plans based on your business requirements.

Method 2: Use Alibaba Cloud CLI

  1. Install and configure the Alibaba Cloud CLI. For more information, see Alibaba Cloud CLI documentation.

  2. Run the following command to query DCDN resource plan usage:

    aliyun dcdn DescribeDcdnUserResourcePackage
  3. The response contains the ResourcePackageInfos field with the following information for each resource plan: InstanceId, CommodityCode, DisplayName, Status, and CurrCapacity.

RAM Permission Configuration

To call the DescribeDcdnUserResourcePackage API operation, a Resource Access Management (RAM) user must be granted the dcdn:DescribeDcdnUserResourcePackage permission. If the permission is not granted, the call returns a Forbidden.RAM error.

You can use either of the following methods to grant the required permission:

  • Least privilege policy: Create a custom access policy with the following content and attach it to the RAM user:

    {
      "Version": "1",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": "dcdn:DescribeDcdnUserResourcePackage",
          "Resource": "*"
        }
      ]
    }
  • System policy: Grant the AliyunDCDNFullAccess system policy to the RAM user.

Troubleshooting

Symptom: When you run the aliyun dcdn DescribeDcdnUserResourcePackage command, the following error is returned:

ErrorCode: Forbidden.RAM
Message: You are not authorized to operate this resource

Cause: The RAM user does not have the dcdn:DescribeDcdnUserResourcePackage permission.

Solution: Grant the RAM user the dcdn:DescribeDcdnUserResourcePackage permission. For more information, see the RAM Permission Configuration section above.

FAQ

Related documents