docs
api
UHost(UHost)
CreateUHostInstance

Create UHost - CreateUHostInstance

Overview

Create UHost Instance.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateUHostInstance.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 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
ImageIdstringImage ID. Please obtain it through DescribeImageYes
Disks.N.IsBootstringIs 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.
Yes
Disks.N.TypestringDisk type. Please refer to Disk Type.Yes
Disks.N.SizeintDisk size, in GB. Please refer to Disk Type.Yes
Disks.N.BackupTypestringDisk backup scheme. Enumerated values:

> NONE, no backup

> SNAPSHOT, snapshot

The backup mode supported by the current disk refers to disk type, default value: NONE.
No
Disks.N.Encryptedboolean[Function only partially available in some zones, for details please consult technical support] Whether the disk is encrypted. Encrypted: true, Not encrypted: false
Encryption must pass in the corresponding KmsKeyId, default value is false
No
Disks.N.KmsKeyIdstring[Function is only available in some zones, for details please consult technical support] kms key id. Required when choosing an encrypted disk.No
Disks.N.CouponIdstringCloud Disk Coupon ID. Not applicable to system disk/local disk. Please query through the DescribeCoupon interface, or log in to the user center to view.No
Disks.N.SnapshotIdstringThe snapshot ID used when creating a disk from a snapshot, currently only supports data disks.No
LoginModestringHost login mode. Password (default option): Password, Key: KeyPair.Yes
PasswordstringUHost password. Please set the password according to the field specification. The password needs to be encoded with base64, as shown in the following example: # echo -n Password1 | base64 UGFzc3dvcmQx.No
NamestringUHost instance name. Default: UHost. Please set the instance name in accordance with the field specification.No
TagstringBusiness group. Default: Default (Default means ungrouped). Please set the business group according to the field specification.No
ChargeTypestringBilling mode. Enumerated values are:

> Year, pay annually;

> Month, pay monthly;

> Dynamic, prepaid hourly;

> Postpay, postpaid hourly (supports no charge when shut down, currently only supported in some availability zones, please contact your account manager)

> Spot billing is for preemptive instances (in beta)

Default is monthly payment.
No
QuantityintPurchase duration. Default: value 1. This parameter is not required when purchasing by the hour (Dynamic/Postpay). When paying monthly, pass this parameter as 0, which means purchasing until the end of the month.No
CPUintNumber of virtual CPU cores. Optional parameters: 1-64 (refer to the console for the specific relationship between the machine type and CPU). Default value: 4.No
MemoryintMemory size. Unit: MB. Range: [1024, 262144], must be a multiple of 1024 (optional range refers to the console). Default value: 8192No
GpuTypestringGPU type, enumeration values ["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "V100S",2080","2080TiS","2080TiPro","3090","4090","A100"]. Mandatory when MachineType is G.No
GPUintNumber of GPU card cores. Only GPU models support this field (optional range related to MachineType+GpuType).No
NetCapabilitystringNetwork enhancement features. Enumeration values: Normal, not enabled; Super, enable network enhancement 1.0; Ultra, enable network enhancement 2.0 (refer to the official website documentation for details)No
HotplugFeaturebooleanHot upgrade feature. True for enabled, False for not enabled, default is False.No
VPCIdstringVPC ID. The default is the default VPC for the current region.No
SubnetIdstringSubnet ID. The default is the default subnet for the current region.No
PrivateIp.Nstring[Array] Specify the intranet IP when creating a cloud host. If no value is passed, a random IP under the current subnet will be assigned. Call example: PrivateIp.0=x.x.x.x. Currently, only one intranet IP is supported.No
SecurityGroupIdstringFirewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to DescribeFirewall.No
IsolationGroupstringIsolation Group ID for hardware. Can be obtained through DescribeIsolationGroup.No
AlarmTemplateIdintAlarm template id, if the alarm template id is passed and the alarm template id is correct, then bind the alarm template. Failure to bind the alarm template will only have logs in the background, it will not affect the host creation process, nor will it report an error on the front end.No
MachineTypestringCloud Host Type (V2.0), only one of this field and the UHostType field is required. Enumeration values ["N", "C", "G", "O", "OS", "OM", "OPRO", "OPROG", "OMAX", "O.BM", "O.EPC"]. Refer to Cloud Host Type Description.No
MinimalCpuPlatformstringMinimum CPU platform, enumeration values ["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Intel/SapphireRapids", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"], the default value is "Intel/Auto".No
MaxCountintThe maximum number of hosts created this time, the value range is [1,100], and the default value is 1.
- When the inventory is insufficient, create according to the inventory.
- When the quota is insufficient, return an error.
- When using isolation groups, the available number of isolation groups shall prevail.
No
NetworkInterface.N.EIP.Bandwidthint[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
NetworkInterface.N.CreateCernetIpbooleanApply and bind an Education Network EIP. True for applying and binding, False for not applying and binding, default is False. Currently, only models with HPC characteristics are supported.No
UserDatastringUser-defined data. This field can be filled when the image supports the Cloud-init Feature. 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. Value > "On" for automatic mounting (default value) > "Off" for not automatically mounting.No
KeyPairIdstringKeypairId is the ID of the key pair, which is mandatory when LoginMode is KeyPair.No
Features.UNIbooleanElastic Network Interface feature. This feature only takes effect when the Elastic Network Interface permission bit is enabled. The default is false (not enabled), true is enabled, and it is only compatible with NetCapability Normal.No
SecGroupId.N.IdstringSecurity Group ID. Up to 5 security groups can be bound at the same time.No
SecGroupId.N.PriorityintSecurity Group Priority. Value range [1, 5]No
SecurityModestringHost Security Mode. Firewall: Firewall; SecGroup: Security Group; Default Value: Firewall.No
UDSetIdstring[Private Zone Attributes] Zone IDNo
UDHostIdstring[Private Zone Property] Host ID of the zoneNo
HostBindingboolean[UDSet Attributes] Enable the residence association attribute for the UDSet UHost.No
CouponIdstringHost coupon ID. Please query through the DescribeCoupon interface, or log in to the user center to view.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
UHostIdsarray[string]UHost Instance Id CollectionNo
IPsarray[string]Bulk creation will not return IP informationNo

Example

Request Example

https://api.surfercloud.com/?Action=CreateUHostInstance
&Region=ybxkcmgH
&Zone=cMZkATPf
&ProjectId=ehTYojNP
&ImageId=CHWlocIR
&Disks.N.IsBoot=SqelzPyQ
&Disks.N.Type=rqSALyZS
&Disks.N.Size=1
&LoginMode=eziJKyvi
&Password=wrHVYuPy
&Name=pPFrllkl
&Tag=eTVDLtCi
&ChargeType=dcWFEjRf
&Quantity=7
&UHostType=uUZLzSkQ
&CPU=5
&Memory=9
&GpuType=UyTqehtV
&GPU=8
&StorageType=xjnNxxIr
&BootDiskSpace=4
&DiskSpace=3
&NetCapability=WuweESSX
&TimemachineFeature=yes
&HotplugFeature=true
&DiskPassword=jWVGcxBI
&NetworkId=QgMHkVKB
&VPCId=NiKZcdzp
&SubnetId=PCrhwZPO
&PrivateIp.N=ZCkTUpMg
&PrivateMac=UfchnWOU
&SecurityGroupId=mBiLqsON
&HostType=KuIpUVnY
&InstallAgent=wYIplHyT
&ResourceType=QMlAGlJh
&Disks.N.BackupType=ynlUsysX
&IsolationGroup=zFjarlyJ
&Disks.N.Encrypted=true
&Disks.N.KmsKeyId=KnxSqvyV
&Disks.N.CouponId=AnDNoKBS
&AlarmTemplateId=1
&MachineType=UZiFiiup
&MinimalCpuPlatform=JEyLLGKk
&MaxCount=4
&NetworkInterface.N.EIP.Bandwidth=9
&NetworkInterface.N.EIP.PayMode=lAfYgVln
&NetworkInterface.N.EIP.ShareBandwidthId=UBundIIj
&NetworkInterface.N.EIP.OperatorName=cglBMIOQ
&NetworkInterface.N.EIP.CouponId=DhbealvD
&SetId=5
&HostIp=gtaBlcUT
&NetworkInterface.N.IPv6.ShareBandwidthId=wjqJnxBt
&UserData=xxxLxHCi
&Disks.N.Id=kezEAMkH
&AutoDataDiskInit=cnjYJjwW
&NetworkInterface.N.IPv6.Address=KudMCare
&CharacterName=TQFIAsCO
&PromotionId=YsPkxuTv
&ImageOsName=iGCjLLAJ
&PodId=YRZCbhxE
&BillActivityId=7
&BillActivityRuleId=8
&RestrictMode=aETwMsDO
&Volumes.N.Type=wmkzKvFL
&Volumes.N.IsBoot=UfWFbPlC
&Volumes.N.Size=4
&Volumes.N.VolumeId=oFmWoxUW
&Volumes.N.CouponId=JRAVIPJh
&HpcEnhanced=true
&NetworkInterface.N.CreateCernetIp=false
&KeyPairId=UgaGKBsN
&Features.UNI=false
&Disks.N.BackupMode=fxpdxHtq
&Disks.N.CustomBackup.Journal=muAfZjQM
&Disks.N.CustomBackup.Hour=KWbSJhsv
&Disks.N.CustomBackup.Day=sDMcKoMD
&SecGroupId.N.Id=FCFnWiyv
&SecGroupId.N.Priority=4
&SecurityMode=MXObOjBq
&UDSetId=ExUeRuel
&UDHostId=ELjbOgbF
&HostBinding=true
&Disks.N.SnapshotId=VYuYBGoo
&CouponId=UJvMdphR
&NetworkInterface.N.IPv6.ShareBandwidthId=SLUcRuex
&NetworkInterface.N.IPv6.Address=kGyaKakA
&Disks.N.SnapshotId=fMIDWADd
&NetworkInterface.N.IPv6.ShareBandwidthId=aoHzuvNS
&NetworkInterface.N.IPv6.Address=ztvbtlTL
&Disks.N.SnapshotId=xOfUFQge

Response Example

{
  "Action": "CreateUHostInstanceResponse",
  "IPs": [
    "xMEMVeOh"
  ],
  "MountedUFSId": "VzVDSUXx",
  "RetCode": 0,
  "UHostIds": [
    "cuQeraVH"
  ]
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.