Resets a simple application server.

Description

You can reset a simple application server to re-install its applications or operating system and re-initialize the server. You can reset a simple application server by resetting the operating system or replacing the image.

You can use one of the following methods to reset a simple application server:

  • Reset the operating system. You can re-install the operating system without replacing the image.
  • Replace the image. You can replace the existing image on the simple application server by using another Alibaba Cloud image or a custom image. This effectively replaces the operating system.

Limits

  • If a simple application server was created from a custom image that contains data of a data disk, the server cannot be reset.
  • If you reset a simple application server by replacing the existing image with a custom image,
    • The custom image must reside in the same region as the current server.
    • The custom image cannot be created from the current server. If you want to recover the data on the server, you can use a snapshot of the server to roll back the disks.
    • If your simple application server resides in a region outside the Chinese mainland, you cannot switch the operating system of the server between Windows Server and Linux. You cannot use a Windows Server custom image to reset a Linux simple application server. Similarly, you cannot use a Linux custom image to reset a Windows Server simple application server. You can switch the operating system of simple application servers only between Windows Server operating systems or between Linux distributions.
    • The following limits apply to the disks on the simple application server:
      • If the custom image contains a system disk and data disks, but the simple application server is attached only with a system disk, you cannot use the custom image to reset the simple application server.
      • If the system disk size of the custom image is greater than the system disk size of the simple application server, you cannot directly use the custom image to reset the simple application server.
      • If the system disk size of the custom image is smaller than or equal to the system disk size of the simple application server, you can use the custom image to reset the simple application server. You can upgrade the configurations of the simple application server to increase the system disk size. When the system disk size of the server is greater than or equal to the system disk size of the custom image, you can use the custom image to reset the simple application server. For more information, see Upgrade configurations.
      • If the data disk size of the custom image is greater than the data disk size of the simple application server, you cannot use the custom image to reset the simple application server.

QPS limits

The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Request parameters

Parameter Type Required Example Description
InstanceId String Yes ace0706b2ac4454d984295a94213****

The ID of the simple application server.

RegionId String Yes cn-hangzhou

The region ID of the simple application server. You can call the ListRegions operation to query the most recent region list.

ImageId String No 794c230fd3e64ea19f83f4d7a0ad****

The ID of the image that is used to replace the image on the simple application server. If you do not specify this parameter, the operating system of the simple application server is reset by default.

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 ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Action String Yes ResetSystem

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

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

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HTTP status code Error code Error message Description
400 InvalidImageId.NotSupport The specified ImageId does not support the operation. The error message returned because the specified image does not support the current operation.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter is invalid.
404 InvalidImageId.NotFound The specified ImageId does not exist. The error message returned because the specified ImageId parameter is invalid.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket.

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