Upgrades the plan of a simple application server.

Description

  • The plans of simple application servers can only be upgraded. For more information about plans, see Billable items.
  • When you call this operation to upgrade the plan of a simple application server, you must make sure that you have sufficient balance within your account to pay for upgrading the plan of the server. Otherwise, the server cannot be upgraded.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpgradeInstance

The operation that you want to perform. Set the value to UpgradeInstance.

InstanceId String Yes ace0706b2ac4454d984295a94213****

The ID of the simple application server.

RegionId String Yes cn-hangzhou

The region ID of the simple application server.

PlanId String Yes swas.s2.c2m2s50b4t08

The ID of the new plan. You can call the ListPlans operation to query the plans provided by Simple Application Server.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token. Make sure that the token is unique among different requests. ClientToken can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see Ensure idempotence.

Response parameters

Parameter Type Example Description
RequestId String 20758A-585D-4A41-A9B2-28DA8F4F534F

The ID of the request.

Examples

Sample requests

https://swas.cn-hangzhou.aliyuncs.com/?Action=UpgradeInstance
&InstanceId=ace0706b2ac4454d984295a94213****
&PlanId=swas.s2.c2m2s50b4t08
&<Common request parameters>

Sample success responses

XML format

<UpgradeInstanceResponse>
      <RequestId>20758A-585D-4A41-A9B2-28DA8F4F534F</RequestId>
</UpgradeInstanceResponse>

JSON format

{
    "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F"
}

Error codes

HTTP status code Error code Error message Description
404 InvalidPlanId.NotFound The specified PlanId does not exist. The error message returned because the specified PlanId parameter does not exist.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter does not exist.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket.
400 InvalidPlanIdUpgrade.ValueNotSupported The specification of the specified planId is lower than the current server specification. The error message returned because the specifications of the new plan is lower than those of the current plan of the server.
403 PaymentFailed Payment failed. Please check your account balance. The error message returned because the payment failed. Check whether you have a sufficient balance within your account.
403 InvalidInstance.UnPaidOrder The specified Instance has an unpaid order. The error message returned because you have an unpaid order. Pay for the order and try again.
500 NotEnoughUpgradeStock The upgrade stock is insufficient. The error message returned because the resources used to upgrade the plan of the server are insufficient.

For a list of error codes, visit the API Error Center.