Changes some information including the name and password of a simple application server.

Description

After you change the password of a simple application server, you must restart the server (RebootInstance) for the new password to take effect.

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 UpdateInstanceAttribute

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

InstanceId String Yes ace0706b2ac4454d984295a94213****

The ID of the simple application server.

RegionId String Yes cn-hangzhou

The region ID of the simple application server.

Password String No Test123!

The new password of the simple application server. The password must be 8 to 30 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include:

( ) ~ ! @ # $ % ^ & * - + = | { } [ ] : ; < > , . ? /
InstanceName String No test-InstanceName

The new name of the simple application server. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.),and hyphens (-).

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=UpdateInstanceAttribute
&InstanceId=2ad1ae67295445f598017499dc****    
&InstanceName=test-InstanceName
&Password=Test123! 
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

HTTP status code Error code Error message Description
400 InvalidPassword.ValueNotSupported The specified parameter Password is invalid. The error message returned because the specified Password parameter is invalid.
400 InvalidInstanceName.ValueNotSupported The specified parameter InstanceName is invalid. The error message returned because the specified InstanceName parameter is invalid.
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.

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