Resets the password for a root account.

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 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.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ResetMainPassword
&RegionId=cn-hangzhou
&UseRandomPassword=false
&<Common request parameters>

Sample success responses

XML format

<Account>
    <UserName>ainnd11</UserName>
    <Password>344&amp;^*&amp;@112</Password>
</Account>
<RequestId>BE365DEC-A7CF-4E0F-A55E-CDD8BFFF2847</RequestId>
<RegionId>cn-hangzhou</RegionId>

JSON format

{"Account":{"UserName":"ainnd11","Password":"344&^*&@112"},"RequestId":"BE365DEC-A7CF-4E0F-A55E-CDD8BFFF2847","RegionId":"cn-hangzhou"}

Error codes

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