Reinstall System - ReinstallUHostInstance
Overview
Reinstall the operating system of the specified UHost instance
ℹ️ 1. Please confirm that the instance has been shut down before reinstallation; 2. When reinstalling the original system to a different type of system (Linux->Windows), do not choose to keep the data disk; 3. When reinstalling a different version of the system (CentOS6->CentOS7), if you choose to keep the data disk, please note the file system format of the data disk;
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ReinstallUHostInstance . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | No |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
UHostId | string | UHost Instance Resource ID See DescribeUHostInstance | Yes |
Password | string | If the LoginMode is Password when reinstalling the UHost instance, it must be filled in. If the LoginMode is KeyPair, it is not necessary to fill in (the password format uses BASE64 encoding; for example: # echo -n Password1 | base64UGFzc3dvcmQx.) | No |
ImageId | string | Image Id, default to use the original image. See DescribeImage | No |
ReserveDisk | string | Should the data disk be retained? Retain: Yes, Do not retain: No, Default: Yes; If reinstalling from Windows to Linux or vice versa, the data disk cannot be retained (This parameter currently only works for local data disks) | No |
BootDiskSpace | int | System disk size. Unit: GB, Range [20,100], Step: 10 | No |
UserData | string | Use of cloudinit initialization. Note: 1, The total data size does not exceed 16K 2, Use base64 encoding. | No |
AutoDataDiskInit | string | Whether the data disk needs to be automatically partitioned and mounted. This field can be filled in when the image supports the Cloud-init Feature. The values are “On” (default value), “Off”. | No |
LoginMode | string | Host login mode. Password (default option): Password, KeyPair: KeyPair. | No |
KeyPairId | string | KeypairId is the ID of the key pair, which is mandatory when LoginMode is KeyPair. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
UHostId | string | UHost Instance Resource ID | No |
Example
Request Example
https://api.dezai.com/?Action=ReinstallUHostInstance
&Region=cn-bj2
&Zone=cn-bj2-04
&ProjectId=org-xxx
&UHostId=uhost-xxx
&Password=xxx
&BootDiskSpace=6
&UserData=TdFuRmBV
&AutoDataDiskInit=LpCzTmbU
&LoginMode=yOknHzpM
&KeyPairId=KfXBMRLJ
&KeyPairId=qqNpnbqV
Response Example
{
"Action": "ReinstallUHostInstanceResponse",
"RetCode": 0,
"UHostId": "uhost-xxx"
}