Resets a simple application server.

Description

  • In regions outside mainland China, you cannot switch simple application servers between different operating system families. You can switch the servers only among different Linux distributions or among different Windows Server versions.
  • If you reset or replace the operating system of a simple application server, the disk data, created snapshots, and related custom images of the server are all deleted. Back up your data before you reset your simple application server.
  • If a simple application server was created from a custom image that contains data of a data disk, the server cannot be reset.

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 ResetSystem

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

RegionId String Yes cn-hangzhou

The region ID of the simple application server.

InstanceId String Yes ace0706b2ac4454d984295a94213****

The ID of the simple application server.

ImageId String Yes 794c230fd3e64ea19f83f4d7a0ad****

The ID of the replacement image. You can call the ListImages operation to query the available images in the specified region.

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 value, but you must make sure that it is unique among different requests. The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to 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=ResetSystem
&ImageId=794c230fd3e64ea19f83f4d7a0ad****
&InstanceId=ace0706b2ac4454d984295a94213****	
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

HTTP status code Error code Error message Description
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.
404 InvalidImageId.NotFound The specified ImageId does not exist. The error message returned because the specified ImageId parameter does not exist.

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