This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.
Purchase New Package
Operation description
- The package name and code can be obtained from the DescribeRatePlanPrice interface.
- If the acceleration area is not overseas, the site must have successfully completed the filing process.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| esa:PurchaseRatePlan | create | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| PlanName | string | No | Package name. | basic |
| PlanCode | string | No | Package code. | entranceplan |
| SiteName | string | No | Site name. | test.com |
| Coverage | string | No | The service location. Valid values:
| domestic |
| Type | string | No | The DNS setup option for the website. Valid values:
| CNAME |
| AutoRenew | boolean | No | Auto-renewal:
| true |
| Period | integer | No | Subscription period (in months). | 1 |
| ChargeType | string | No | The billing method. Valid values:
| PREPAY |
| AutoPay | boolean | No | Specifies whether to enable auto payment. | true |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "30423A7F-A83D-1E24-B80E-86DD25790758",
"OrderId": 123123,
"InstanceId": "esa-site-ads11w"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | CheckOrderFailed | Invalid order parameter. | Invalid order parameter. |
| 400 | InternalError | An internal exception occurred, please try again later. | An inner exception was triggered. Please try again later. |
| 400 | InvalidSiteICP | The specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again. | The specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again. |
| 400 | InvalidSiteName | Invalid website name. Check and try again. | Invalid website name. Check and try again. |
| 400 | SYSTEM.NoSpecificCodeFailed | Invalid subscription duration. Check and try again. | Invalid subscription duration. Check and try again. |
| 400 | CheckPlanFailed | Invalid plan name or code. Check and try again. | Invalid plan name or code. Check and try again. |
| 400 | SubSiteUnavailable | Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA. | Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA. |
| 400 | InsufficientAvailableQuota | Your account balance is insufficient. | Your account is in arrears, please pay the arrears before purchasing. |
| 400 | InsufficientBalance | Your account balance is insufficient. | Your account balance is insufficient, please recharge before purchasing. |
| 400 | InvalidComponent | The order parameters is invalid. | The order parameters is invalid. |
| 400 | RamAuthFailed | The sub-account has no operation permission. | - |
| 400 | BuyWithSiteAmountErr | Site-based purchase plans do not support bulk purchasing. | Site-based purchase plans do not support bulk purchasing. |
| 400 | EnterpriseAmountErr | Enterprise plans do not support bulk purchase. | Enterprise plans do not support bulk purchase. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-02-20 | The Error code has changed. The request parameters of the API has changed | View Change Details |
| 2024-09-18 | The Error code has changed | View Change Details |
