调用CreatePhysicalConnectionOccupancyOrder接口创建资源占用费的订单。

说明 只有物理专线状态为等待用户支付( Complete)的实例允许执行此操作。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
RegionId String cn-hangzhou

物理专线所在的地域ID。

您可以通过调用DescribeRegions接口获取地域ID。

PhysicalConnectionId String pc-bp1hp0wr072f6****

物理专线的实例ID。

Period Integer 1

购买时长。

  • PricingCycle取值Month时,Period取值范围为1~9
  • PricingCycle取值Year时,Period取值范围为1~5
InstanceChargeType String PrePaid

实例的付费方式。取值:

PrePaid:预付费,包年包月。选择该类付费方式时,您必须确认您阿里云账号支持余额支付或信用支付。

AutoPay Boolean false

是否自动支付。取值:

  • true:自动支付。您需要确保账户余额充足,如果账户余额不足会生成异常订单,只能作废订单。
  • false(默认值):只生成订单不扣费。
PricingCycle String Month

预付费的计费周期,取值:

  • Month(默认值):按月购买。
  • Year:按年购买。
Action String CreatePhysicalConnectionOccupancyOrder

要执行的操作。

取值:CreatePhysicalConnectionOccupancyOrder

ClientToken String CBCE910E-D396-4944

客户端Token,用于保证请求的幂等性。

由客户端生成该参数值,要保证在不同请求间唯一。

返回数据

名称 类型 示例值 描述
RequestId String 9B9300FE-11E2-4E3B-949C-BED3B44DD26D

请求ID。

Data Object

数据的详细信息。

OrderId String 50187055895****

已下订单的ID。

示例

请求示例

http(s)://[Endpoint]/?RegionId=cn-hangzhou
&PhysicalConnectionId=pc-bp1hp0wr072f6****
&Period=1
&InstanceChargeType=PrePaid
&AutoPay=false
&PricingCycle=Month
&Action=CreatePhysicalConnectionOccupancyOrder
&ClientToken=CBCE910E-D396-4944
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreatePhysicalConnectionOccupancyOrderResponse>
    <RequestId>9B9300FE-11E2-4E3B-949C-BED3B44DD26D</RequestId>
    <Data>
        <OrderId>50187055895****</OrderId>
    </Data>
</CreatePhysicalConnectionOccupancyOrderResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9B9300FE-11E2-4E3B-949C-BED3B44DD26D",
  "Data" : {
    "OrderId" : "50187055895****"
  }
}

错误码

HttpCode 错误码 错误信息 描述
400 IAbs.InvalidStatus.ValueNotSupported status is not supported. status参数无效
400 InvalidPrice.NotFound Pricing plan result not found. Price参数无效
400 InvalidPhysicalConnectionChargeType.Malformed Specified Physical Connection ChargeType is not valid. InstanceChargeType参数无效
400 nvalidPhysicalConnectionPeriod.Malformed Specified Physical Connection Period is not valid. Period参数无效
400 InvalidPhysicalConnectionPeriod.Malformed Specified Physical Connection Period is not valid. Period参数无效
400 Forbidden.NotAllowedInState The request does not allow in this state. 该状态无法执行请求。
400 INSTANCE.STATUS.NOT.ALLOW Instance status not allow 实例状态不允许
400 Abs.InstanceNotExist The specified instance does not exist. 指定的实例不存在。
404 InvalidPhysicalConnectionId.NotFound The PhysicalConnectionId provided does not exist in our records. 该物理专线不存在。

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