通过此接口退订符合退订规则的包年包月实例或包月预留实例券。
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UnsubscribeInstance | 要执行的操作,取值:UnsubscribeInstance |
Version | String | 是 | 2022-01-01 | API的版本,取值:2022-01-01 |
InstanceID | String | 是 | vol-hwdajoda-xxxxx | 实例ID |
Product | String | 是 | volume | 实例ID对应的商品编码 |
UnsubscribeRelatedInstance | Boolean | 是 | false | 是否退订当前实例ID关联的实例(同一实例组内的实例或者套装促销需整体退订的实例) |
ClientToken | String | 否 | 2023032417261286E73D9F9888C471372E | UUID生成的字符串。此字段用于幂等,多次调用传入同样的值,会返回第一次请求的响应。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
OrderID | String | Order72139298780xxxxxx | 退订订单的订单ID |
SuccessInstanceInfos | Array of SuccessInstanceInfo | [ { "产品":"ECS", "InstanceID":"i-ycrp7g23uo9e26iz93ae" }, { "产品":"ECS", "InstanceID":"i-ybuq7g23uo9e36iz39ec" } ] | 退订订单创建成功的所有实例信息 |
退订实例以及关联的实例
{ "Product":"volume", "InstanceID":"vol-924610xxxxx", "UnsubscribeRelatedInstance":true, "ClientToken:"2023032417261286E73D9F9888C471372E" }
{ "ResponseMetadata": { "RequestId": "20230327113355546653D988035BA94DB1", "Action": "UnsubscribeInstance", "Version": "2022-01-01", "Service": "billing", "Region": "cn-north-1", "Result": { "OrderID": "Order12930848201XXXXX", "SuccessInstanceInfos": [ { "Product": "volume", "InstanceID": "vol-924610xxxxx" } ] } } }
该实例不属于使用的AK/SK
{ "Product":"volume", "InstanceID":"vol-924610xxxxx", "UnsubscribeRelatedInstance":true, "ClientToken:"2023032417261286E73D9F9888C471372E" }
{ "ResponseMetadata": { "RequestId": "20230327113355546653D988035BA94DB1", "Action": "UnsubscribeInstance", "Version": "2022-01-01", "Service": "billing", "Region": "cn-north-1", "Error": { "Code": "InstancePermissionDenied", "Message": "This instance does not belong to this account" } } }
下表提供了该接口业务逻辑相关的错误码。公共错误码请参见公共错误码。
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ParamInvalid | Request param is invalid | 客户端参数错误 |
400 | BadRequest | Request error, failed to pass the validation | 客户端请求未通过校验,可能是业务规则导致无法请求成功 |
400 | CannotUnsubscribe | This instance cannot be unsubscribed | 由于退订规则,当前实例不可通过OpenAPI退订 |
400 | InvalidIdempotentParams | The ClientToken is illegal | ClientToken对应的参数发生变更,请更换ClientToken |
403 | InstancePermissionDenied | No permission to operate the instance | 当前AK/SK缺少操作此实例的权限 |
404 | InstanceNotFound | The specified instance was not found | 指定实例不存在或未查询到指定实例 |
412 | StatusWrong | Instance's status is unexpected | 实例或订单状态不符合预期 |
500 | InternalServerError | Internal server error | 系统错误,多次出现时请联系管理员 |