Resets the password for a root account.


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 ResetMainPassword

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

RegionId String Yes cn-hangzhou

The region ID.

UseRandomPassword Boolean Yes false

Specifies whether to use a random password.

InitPassword String No 123@##$%%!

The initial password.

EnableKMS Boolean No false

Specifies whether to use Key Management Service (KMS) to manage the password.

ExternalUid String No 349809128734****

The ID of the Alibaba Cloud account.

ExternalAliyunUid String No 346722231486****

The ID of the Alibaba Cloud account.

ExternalBizAliyunUid String No 203302231286****

The ID of the Alibaba Cloud account.

Response parameters

Parameter Type Example Description
Account Struct

The information of the root account.

Password String 344&^*&@112

The password of the root account.

UserName String ainnd11

The username of the root account.

RegionId String cn-hangzhou

The region ID.

RequestId String BE365DEC-A7CF-4E0F-A55E-CDD8BFFF2847

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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