RefundInstance - 退订实例
调用本接口退订不再需要的实例。
接口说明
-
退订只退还实付金额的部分,已使用的代金券不退还。
-
请仔细核对退订资源的信息,并确认退订条款和退订金额,资源一经退订无法恢复。
-
该接口仅支持直销客户调用,分销客户无法使用。
-
其他问题请参照:退订规则
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
bss:RefundBatchRemainRefund |
update |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
ClientToken |
string |
否 |
需要幂等场景必填。UUID 生成的字符串。此字段用于幂等,多次调用传入同样的值,会返回第一次的结果。调用后如果返回了结果,可以解析到退款订单编号,代表调用成功。 |
793F021C-B589-1225-82A9-99232AEBE494 |
ImmediatelyRelease |
string |
否 |
退订场景必填。1:标识立即释放。0:标识先停机,根据停机策略停机。仅部分商品支持。默认都是立即释放。 |
1 |
ProductCode |
string |
否 |
退订场景必填,产品 code。如果调用后错误码提示产品不支持,可提交工单申请云产品允许开通此功能。 |
ecs |
InstanceId |
string |
否 |
退订场景必填,实例 id,非自定义名称。 |
i-bp1etb69sqxgl4******* |
ProductType |
string |
否 |
退订场景必填,产品类型,无特殊说明传入空字符串。在调试工具上,无需手动输入,鼠标放到输入框上,会弹出"输入空字符串"的按钮,点击此按钮即可。通过代码发起退订时,传入英文字符下的空字符串 ""。 |
空字符串 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
result |
||
Message |
string |
执行结果说明 |
success |
RequestId |
string |
执行链路追踪字符串,排查问题时,可以提供给平台。 |
UUID |
Data |
object |
data |
|
HostId |
string |
执行主机所在站点 |
cn |
OrderId |
integer |
退订成功的情况下,返回退款订单 id |
2100000000*** |
Code |
string |
响应码 |
ResourceNotExists |
Success |
boolean |
success=true 代表调用执行完成。success=false 代表执行出现错误。 |
false |
示例
正常返回示例
JSON
格式
{
"Message": "success",
"RequestId": "UUID",
"Data": {
"HostId": "cn",
"OrderId": 0
},
"Code": "ResourceNotExists",
"Success": false
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | ResourceNotExists | The specific resource is not exists. | |
400 | ResourceStatusError | The resource status error. | |
400 | InvalidOwner | The specified owner does not belong to caller. | |
400 | InvalidParameter | The specified request contains invalid parameters. | |
400 | MissingParameter | The specified request lacks essential parameters. | |
400 | NotApplicable | The specified API is not applicable for the user. | |
400 | NotAuthorized | The user is not authorized for the specified API. | |
400 | BindMirrorInstanceError | Charged images that are related to ECS. | |
400 | ExceedRefundQuotaError | The number of unsubscription times has reached the upper limit. | |
400 | ExistUnPaidOrderError | The instance has an unsettled order. | |
400 | ExistRefundingOrderError | The instance ID is invalid: the instance may have expired, been refunded, or been released. | |
400 | NoRestValueError | The refund amount is 0. | |
400 | AmbassadorOrderLimitError | The instance has an ambassador order that may raise risks. | |
400 | ActivityForbiddenError | Promotional orders do not support refunds. | |
400 | ProductCheckError | The cloud service failed SPI preflight verification. | |
400 | CommodityNotSupported | The specified commodity is not supported. | |
500 | InternalError | An error occurred in the internal server. | 系统异常,请重试 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。