docs
api
UHost(UHost)
ReinstallUHostInstance

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is ReinstallUHostInstance.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
UHostIdstringUHost Instance Resource ID See DescribeUHostInstanceYes
PasswordstringIf 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
ImageIdstringImage Id, default to use the original image. See DescribeImageNo
ReserveDiskstringShould 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
BootDiskSpaceintSystem disk size. Unit: GB, Range [20,100], Step: 10No
UserDatastringUse of cloudinit initialization. Note: 1, The total data size does not exceed 16K 2, Use base64 encoding.No
AutoDataDiskInitstringWhether 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
LoginModestringHost login mode. Password (default option): Password, KeyPair: KeyPair.No
KeyPairIdstringKeypairId is the ID of the key pair, which is mandatory when LoginMode is KeyPair.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
UHostIdstringUHost Instance Resource IDNo

Example

Request Example

https://api.surfercloud.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"
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved