Create UHost - CreateUHostInstance
Overview
Create UHost Instance.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateUHostInstance . | 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 | 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 | Image ID. Please obtain it through DescribeImage | Yes |
Disks.N.IsBoot | string | 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. | Yes |
Disks.N.Type | string | Disk type. Please refer to Disk Type. | Yes |
Disks.N.Size | int | Disk size, in GB. Please refer to Disk Type. | Yes |
Disks.N.BackupType | string | Disk 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.Encrypted | boolean | [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.KmsKeyId | string | [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.CouponId | string | Cloud 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.SnapshotId | string | The snapshot ID used when creating a disk from a snapshot, currently only supports data disks. | No |
LoginMode | string | Host login mode. Password (default option): Password, Key: KeyPair. | Yes |
Password | string | UHost 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 |
Name | string | UHost instance name. Default: UHost. Please set the instance name in accordance with the field specification. | No |
Tag | string | Business group. Default: Default (Default means ungrouped). Please set the business group according to the field specification. | No |
ChargeType | string | Billing 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 |
Quantity | int | Purchase 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 |
CPU | int | Number 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 |
Memory | int | Memory size. Unit: MB. Range: [1024, 262144], must be a multiple of 1024 (optional range refers to the console). Default value: 8192 | No |
GpuType | string | GPU 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 |
GPU | int | Number of GPU card cores. Only GPU models support this field (optional range related to MachineType+GpuType). | No |
NetCapability | string | Network 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 |
HotplugFeature | boolean | Hot upgrade feature. True for enabled, False for not enabled, default is False. | No |
VPCId | string | VPC ID. The default is the default VPC for the current region. | No |
SubnetId | string | Subnet ID. The default is the default subnet for the current region. | No |
PrivateIp.N | string | [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 |
SecurityGroupId | string | Firewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to DescribeFirewall. | No |
IsolationGroup | string | Isolation Group ID for hardware. Can be obtained through DescribeIsolationGroup. | No |
AlarmTemplateId | int | Alarm 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 |
MachineType | string | Cloud 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 |
MinimalCpuPlatform | string | Minimum 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 |
MaxCount | int | The 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.Bandwidth | int | [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 |
NetworkInterface.N.CreateCernetIp | boolean | Apply 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 |
UserData | string | User-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 |
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. Value > “On” for automatic mounting (default value) > “Off” for not automatically mounting. | No |
KeyPairId | string | KeypairId is the ID of the key pair, which is mandatory when LoginMode is KeyPair. | No |
Features.UNI | boolean | Elastic 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.Id | string | Security Group ID. Up to 5 security groups can be bound at the same time. | No |
SecGroupId.N.Priority | int | Security Group Priority. Value range [1, 5] | No |
SecurityMode | string | Host Security Mode. Firewall: Firewall; SecGroup: Security Group; Default Value: Firewall. | No |
UDSetId | string | [Private Zone Attributes] Zone ID | No |
UDHostId | string | [Private Zone Property] Host ID of the zone | No |
HostBinding | boolean | [UDSet Attributes] Enable the residence association attribute for the UDSet UHost. | No |
CouponId | string | Host coupon ID. Please query through the DescribeCoupon interface, or log in to the user center to view. | 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 |
UHostIds | array[string] | UHost Instance Id Collection | No |
IPs | array[string] | Bulk creation will not return IP information | No |
Example
Request Example
https://api.dezai.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"
]
}