PurchaseRatePlan - 套餐新购

调用PurchaseRatePlan购买套餐。

接口说明

  1. 套餐名称和套餐 code 从 DescribeRatePlanPrice 接口查询获取。
  2. 加速区域不是 overseas 时,站点必须已成功备案。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
esa:PurchaseRatePlancreate
*全部资源
*

请求参数

名称类型必填描述示例值
PlanNamestring

套餐名称。

中国站

  • 基础版:basic
  • 标准版:medium
  • 高级版:high

国际站

  • Entrance:entranceplan_intl
  • Pro:basicplan_intl
  • Premium:vipplan_intl
basic
PlanCodestring

套餐 code。

中国站

  • 基础版:basicplan
  • 标准版:standardplan
  • 高级版:advancedplan

国际站

  • Entrance:entranceplan
  • Pro: standardplan
  • Premium: advancedpla
basicplan
SiteNamestring

站点名称。

test.com
Coveragestring

加速区域:

  • domestic:仅中国内地。
  • global:全球。
  • overseas:全球(不包含中国内地)。
domestic
Typestring

站点接入类型:

  • NS:NS 接入。
  • CNAME:CNAME 接入。
CNAME
AutoRenewboolean

是否自动续费:

  • true:自动续费。
  • false:不自动续费。
true
Periodinteger

购买周期(单位:月)。

1
ChargeTypestring

计费类型

  • PREPAY:预付费。
  • POSTPAY:后付费。
PREPAY
AutoPayboolean

自动支付。

true
Amountinteger

购买套餐数量。

1

返回参数

名称类型描述示例值
object

响应结构。

RequestIdstring

请求 ID。

30423A7F-A83D-1E24-B80E-86DD25790758
OrderIdstring

订单 ID。

123123
InstanceIdstring

实例 ID。

esa-site-ads11w

示例

正常返回示例

JSON格式

{
  "RequestId": "30423A7F-A83D-1E24-B80E-86DD25790758",
  "OrderId": 123123,
  "InstanceId": "esa-site-ads11w"
}

错误码

HTTP status code错误码错误信息描述
400CheckOrderFailedInvalid order parameter.订单参数不合法。
400InternalErrorAn internal exception occurred, please try again later.触发内部异常,请稍后再试。
400InvalidSiteICPThe specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again.您配置的站点未备案或ICP备案信息不合法,请确保站点已完成备案后重试。
400InvalidSiteNameInvalid website name. Check and try again.您配置的站点名称不正确,请确保传入正确的站点名称后重试。
400SYSTEM.NoSpecificCodeFailedInvalid subscription duration. Check and try again.您配置的套餐购买周期不正确,请检查后重试。
400CheckPlanFailedInvalid plan name or code. Check and try again.您配置的套餐名或套餐Code不正确,请确保已传入正确的套餐名或套餐Code后重试。
400SubSiteUnavailableSubdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA.仅企业版支持以子域名创建站点,请升级您的套餐。
400InsufficientAvailableQuotaYour account balance is insufficient.您的账号已欠费,请缴清欠费后再购买。
400InsufficientBalanceYour account balance is insufficient.您的账号余额不足,请充值后再购买。
400InvalidComponentThe order parameters is invalid.订单配置参数不符合校验条件。
400RamAuthFailedThe sub-account has no operation permission.子账号无操作权限.
400BuyWithSiteAmountErrSite-based purchase plans do not support bulk purchasing.带站点购买套餐不支持批量购买。
400EnterpriseAmountErrEnterprise plans do not support bulk purchase.企业版套餐不支持批量购买。
400TrialService.HasOpenedYou have already activated the trial service.您已开通试用服务,不能重复开通。
400UserQuantityExceedYour current purchase quantity exceeds the available quantity. Please select a new quantity.您当前购买数量超过还可购买的数量余量,请重新选择数量!
400BASIC_INFO_UNCOMPLETEDYou have not completed your personal basic information. Please complete the information and try again.您未完善个人基本信息,请完善信息后重新操作。(如果当前账号为托管子账号,请联系主账号点击此链接完善信息。) <a href="https://myaccount.alibabacloud.com/user_info.htm?callback=#/userinfo"> 去完善 </a>
400NoRealNameAuthenticationYou have not completed real-name authentication.您尚未进行实名认证!
400NoAvaliablePaymentMethodNo payment method is specified for your account. We recommend that you add a payment method.没有为您的帐户指定付款方式。我们建议您添加付款方式。
400CloudUserCannotBuyNotInnerCommodityNo group cloud product label, can not be purchased.无集团上云商品标签,无法购买。
400AccountStatusIllegalThe account status is illegal.账号状态不合法。
400ContainForbiddenLabelErrorPlacing an order is blocked due to an applied restriction label.存在禁止下单的标签,不可下单。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2025-02-20OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情
2024-09-18OpenAPI 错误码发生变更查看变更详情