Unsubscribes from an instance that is no longer needed.
Operation description
-
Only the actual paid amount is refunded. Used vouchers are not refunded.
-
Carefully verify the information about the resource to be unsubscribed, and confirm the unsubscription terms and refund amount. Resources cannot be recovered after unsubscription.
-
This operation can be called only by direct customers. Reseller customers cannot use this operation.
-
For other questions, refer to: Refund rules for Alibaba Cloud International site
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:RefundBatchRemainRefund |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
Required for idempotent scenarios. A UUID-generated string. This field is used for idempotence. If the same value is passed in multiple calls, the result of the first call is returned. If a result is returned after the call, you can parse the refund order ID, which indicates that the call is successful. |
793F021C-B589-1225-82A9-99232AEBE494 |
| ImmediatelyRelease |
string |
No |
Required for unsubscription scenarios. Valid values: 1: immediately releases the instance. 0: stops the instance first based on the shutdown policy. Only some products support this value. Default value: 1. |
1 |
| ProductCode |
string |
No |
Required for unsubscription scenarios. The product code. If the error code returned after the call indicates that the product is not supported, submit a ticket to request that the cloud service enable this feature. |
ecs |
| InstanceId |
string |
No |
Required for unsubscription scenarios. The instance ID, not the custom name. |
i-bp1etb69sqxgl4******* |
| ProductType |
string |
No |
Required for unsubscription scenarios. The product type. Unless otherwise specified, pass an empty string. In the debugging tool, you do not need to manually enter a value. Hover over the input box, and a button labeled "Enter empty string" appears. Click this button. When initiating an unsubscription through code, pass an empty string "". |
Empty string |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
result |
||
| Message |
string |
The description of the execution result. |
success |
| RequestId |
string |
The Tracing Analysis character string for the execute. Provide this string to the platform when troubleshooting issues. |
UUID |
| Data |
object |
data |
|
| HostId |
string |
The site where the execution host resides. |
cn |
| OrderId |
integer |
The refund order ID returned when the unsubscription is successful. |
2100000000*** |
| Code |
string |
The response code. |
ResourceNotExists |
| Success |
boolean |
Indicates whether the call is successful. A value of true indicates that the call is complete. A value of false indicates that an error occurred. |
false |
Examples
Success response
JSON format
{
"Message": "success",
"RequestId": "UUID",
"Data": {
"HostId": "cn",
"OrderId": 0
},
"Code": "ResourceNotExists",
"Success": false
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. | System exception, please try again |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.