Docs
api
Physical Cloud Host(UPHost)
CreatePHost

Create Physical Machine - CreatePHost

Overview

Specify the data center and create a specified number of UPHost physical cloud host instances based on resource usage.

💡 The password needs to be encoded through base64

# echo -n password1 | base
cGFzc3dvcmQx

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreatePHost.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
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 ListYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
ImageIdstringImageId, can be obtained through the interface DescribePHostImageYes
PasswordstringPassword (The password needs to be encoded with base64)Yes
TypestringPhysical machine type, default is: db-2 (Basic-SAS-V3)No
NamestringPhysical machine name, default is phostNo
RemarkstringPhysical machine remarks, default is emptyNo
TagstringBusiness group, default is ‘default’No
ChargeTypestringBilling mode, enumeration values are: Year, pay annually; Month, pay monthly; default is monthly payment.No
QuantitystringPurchase duration, 1-10 months or 1-10 years; the default value is 1. When paying monthly, pass this parameter as 0, representing purchase until the end of the month, 1 represents the entire month.No
SecurityGroupIdstringFirewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to DescribeFirewall.No
RaidstringParameters required for local disk and BareMetal 1.0. Raid configuration, default Raid10. Supports: Raid0, Raid1, Raid5, Raid10, NoRaidNo
VPCIdstringVPC ID, leave blank for default, this field needs to be filled in under VPC2.0.No
SubnetIdstringSubnet ID, default if not filled, this field needs to be filled under VPC2.0.No
ClusterstringNetwork environment, options include Gigabit: 1G, Ten Gigabit: 10G, default is 1G. Smart network card can choose 25G.No
Disks.N.IsBootstringBareMetal Machine Parameters -> Is it a system disk. Enumeration value: True, it is a system disk. False, it is a data disk (default). There can only be one disk in the Disks array that is a system disk.No
Disks.N.TypestringBareMetal Machine Parameters->Disk Type: Enumeration Value: CLOUD_RSSDNo
Disks.N.SizeintBareMetal Machine Parameters -> Disk size, in GB, must be an integer multiple of 10GB. System disk 20-500GB, single data disk 20-32000GB.No
Disks.N.CouponIdstringBareMetal machine parameters -> Cloud disk coupon id. Not applicable to system disk. Please query through the DescribeCoupon interface, or log in to the user center to view.No
VpcIpstringCreate with specified internal IPNo
ActivityIdintParameters required for short-term promotional activitiesNo
RuleIdintParameters required for short-term promotional activitiesNo
NetworkInterface.N.EIP.Bandwidthstring[If EIP is bound, this parameter is required] The bandwidth of the Elastic IP in the public network, in Mbps. Shared bandwidth mode must specify 0M bandwidth, non-shared bandwidth mode must specify non-0Mbps bandwidth. The bandwidth range of non-shared bandwidth in various regions is as follows: Traffic billing [1-300], Bandwidth billing [1-800]No
NetworkInterface.N.EIP.PayModestringBilling mode of Elastic IP. Enumerated values: “Traffic”, traffic billing; “Bandwidth”, bandwidth billing; “ShareBandwidth”, shared bandwidth mode. “Free”: Free bandwidth mode, default is “Bandwidth”.No
NetworkInterface.N.EIP.ShareBandwidthIdstringThe ID of the bound shared bandwidth, effective only when PayMode is set to ShareBandwidth.No
NetworkInterface.N.EIP.OperatorNamestring[If EIP is bound, this parameter is required] The line of the Elastic IP. Enumeration value: International: International BGP: Bgp. The line parameters allowed in each region are as follows: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul: International us-ws: International ge-fra: International sg: International tw-kh: International. All other overseas lines are InternationalNo
NetworkInterface.N.EIP.CouponIdstringThe current EIP coupon id. Please query through the DescribeCoupon interface, or log in to the user center to view.No
CouponIdstringCouponNo

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
PHostIdarray[string]Array of Resource IDs for PHostNo

Example

Request Example

https://api.dezai.com/?Action=CreatePHost
&Region=BqkGovfY
&Zone=iDdYQGOm
&ProjectId=fElWtlMQ
&ImageId=sxdCFGzq
&Password=nMNtjgYM
&Type=lHQxZUvy
&Name=mxqNHeqr
&Remark=tujHeoKztbfagmsbNAwQgkBFzfCLTWUNuXKpwQXtzQwFNdMawOyPRouLdZMuezKkyHmHvujRLBCwZqNYFtmehSDdowWzpXUuMmWgjnkyerzgncXzMxhoQTEOTkuPSojp
&Tag=uerGHrup
&ChargeType=BuChuPmk
&Quantity=DgbHAEBp
&Count=6
&SecurityGroupId=DuueiYgv
&Raid=XDJZHSQt
&VPCId=JoyUhbrc
&SubnetId=YBMQSOOj
&Cluster=BTJvvyCm
&Disks.N.IsBoot=UxWWeVmL
&Disks.N.Type=NjRvbaPt
&Disks.N.Size=7
&Disks.N.CouponId=NKehxKWX
&CouponId=nDNLOYMb
&VpcIp=UZNQMwbL
&ActivityId=7
&RuleId=5
&CharacterName=rBuhSnga
&NetworkInterface.N.EIP.Bandwidth=BsEioBBJ
&NetworkInterface.N.EIP.PayMode=HKUSPfdn
&NetworkInterface.N.EIP.ShareBandwidthId=ORapYtXt
&NetworkInterface.N.EIP.OperatorName=Ipkulqrt
&NetworkInterface.N.EIP.CouponId=jqGeqYvH
&NetworkInterface.N.EIP.Bandwidth=XIOVRpWP
&NetworkInterface.N.EIP.PayMode=akQZEiQl
&NetworkInterface.N.EIP.ShareBandwidthId=OFPiSwyR
&NetworkInterface.N.EIP.OperatorName=wwKNXlZu
&NetworkInterface.N.EIP.CouponId=yfCllFRn

Response Example

{
  "Action": "CreatePHostResponse",
  "PHostId": [
    "FLICopDY"
  ],
  "RetCode": 0
}