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 Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreatePHost . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | 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 | Yes |
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 |
ImageId | string | ImageId, can be obtained through the interface DescribePHostImage | Yes |
Password | string | Password (The password needs to be encoded with base64) | Yes |
Type | string | Physical machine type, default is: db-2 (Basic-SAS-V3) | No |
Name | string | Physical machine name, default is phost | No |
Remark | string | Physical machine remarks, default is empty | No |
Tag | string | Business group, default is 'default' | No |
ChargeType | string | Billing mode, enumeration values are: Year, pay annually; Month, pay monthly; default is monthly payment. | No |
Quantity | string | Purchase 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 |
SecurityGroupId | string | Firewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to DescribeFirewall. | No |
Raid | string | Parameters required for local disk and BareMetal 1.0. Raid configuration, default Raid10. Supports: Raid0, Raid1, Raid5, Raid10, NoRaid | No |
VPCId | string | VPC ID, leave blank for default, this field needs to be filled in under VPC2.0. | No |
SubnetId | string | Subnet ID, default if not filled, this field needs to be filled under VPC2.0. | No |
Cluster | string | Network environment, options include Gigabit: 1G, Ten Gigabit: 10G, default is 1G. Smart network card can choose 25G. | No |
Disks.N.IsBoot | string | BareMetal 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.Type | string | BareMetal Machine Parameters->Disk Type: Enumeration Value: CLOUD_RSSD | No |
Disks.N.Size | int | BareMetal 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.CouponId | string | BareMetal 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 |
VpcIp | string | Create with specified internal IP | No |
ActivityId | int | Parameters required for short-term promotional activities | No |
RuleId | int | Parameters required for short-term promotional activities | No |
NetworkInterface.N.EIP.Bandwidth | string | [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.PayMode | string | Billing 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.ShareBandwidthId | string | The ID of the bound shared bandwidth, effective only when PayMode is set to ShareBandwidth. | No |
NetworkInterface.N.EIP.OperatorName | string | [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 International | No |
NetworkInterface.N.EIP.CouponId | string | The current EIP coupon id. Please query through the DescribeCoupon interface, or log in to the user center to view. | No |
CouponId | string | Coupon | 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 |
PHostId | array[string] | Array of Resource IDs for PHost | No |
Example
Request Example
https://api.surfercloud.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
}