# Add Node (UHost) - AddUK8SUHostNode

## Overview

Add a Node node to the UK8S cluster, the machine type is UHost.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `AddUK8SUHostNode`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Zone** | string | Availability Zone. See [Availability Zone List](/docs/api/summary/regionlist) |**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](/docs/api/summary/get_project_list). |No|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **ClusterId** | string | UK8S Cluster ID. Can be obtained from the UK8S control panel. |**Yes**|
| **CPU** | int | Number of virtual CPU cores. Optional parameters: 2-64 (refer to the console for the specific relationship between the machine type and CPU). Default value: 4. |**Yes**|
| **Count** | int | Create Node node quantity, the value range is [1,50]. |**Yes**|
| **Password** | string | Node node password. Please set the password according to the [field specification](api/uhost-api/specification). The password needs to be encoded with base64, as follows: # echo -n Password1 \| base64 |**Yes**|
| **Mem** | int | Memory size. Unit: MB. Range: [4096, 262144], multiples of 1024 (optional range refer to the console). Default value: 8192 |**Yes**|
| **ChargeType** | string | Billing Mode. Enumeration values are: <br /><br /> > Year, pay annually; <br /><br /> > Month, pay monthly; <br /><br /> > Dynamic, prepaid hourly; <br /><br /> > Postpay, postpaid hourly (supports no charge when shut down, currently only supported in some available zones, please contact your customer manager) <br /><br /> Default is monthly payment. |**Yes**|
| **BootDiskType** | string | Disk type. Please refer to [Disk Type](api/uhost-api/disk_type). The default is SSD cloud disk. |No|
| **BootDiskSize** | int | System disk size, in GB. Default is 40. Range: [40, 500]. Please note that SSD local disk cannot be adjusted. |No|
| **DataDiskType** | string | Disk type. Please refer to [Disk Type](api/uhost-api/disk_type). The default is SSD cloud disk. |No|
| **DataDiskSize** | int | Data disk size, in GB. Default is 0. Range: [20, 1000] |No|
| **Quantity** | int | Purchase duration. Default: 1. This parameter is not required when purchasing hourly (Dynamic). When paying monthly, pass this parameter as 0, which represents purchase until the end of the month. |No|
| **MachineType** | string | Cloud host machine type. Enumeration values ["N", "C", "G", "O", "OS"]. Refer to [Cloud host machine type description](api/uhost-api/uhost_type). |No|
| **GpuType** | string | GPU type, enumeration values ["K80", "P40", "V100",], required 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|
| **Labels** | string | Node labels. In the form of key=value, multiple groups are separated by ",", up to 5 groups. For example, env=pro,type=game |No|
| **MaxPods** | int | Default is 110, it is recommended to be less than or equal to 110 in the production environment. |No|
| **IsolationGroup** | string | Isolation Group ID for hardware. Can be obtained through DescribeIsolationGroup. |No|
| **ImageId** | string | Image Id, if not filled, the backend program will automatically select an available Image Id. It supports user-defined images, and user-defined images must be based on basic images. |No|
| **SubnetId** | string | Subnet ID. The default is the subnet ID filled in when the cluster is created, or you can fill in the subnet ID within the same VPC as the cluster. |No|
| **DisableSchedule** | boolean | Indicates whether to temporarily disable the node after adding it. Enter "true" to disable, enter anything else or leave it blank to not disable. |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|
| **InitScript** | string | User-defined Shell script. The difference from UserData is that InitScript is executed after the node initialization is completed, while UserData is executed during the initialization of the cloud host. |No|
| **MinimalCpuPlatform** | string | Lowest CPU platform, enumeration values ["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", “Amd/Epyc2”, "Amd/Auto"], the default value is "Intel/Auto". |No|
| **Taints** | string | Node taints, in the form of key=value:effect, multiple taints are separated by ",", up to five groups are supported. |No|
| **Tag** | string | Business Group |No|
| **NodeGroupId** | string | Node Pool ID |No|
| **SecurityMode** | string | Host Security Mode. Firewall: Firewall; SecGroup: Security Group; Default Value: Firewall. |No|
| **NamePrefix** | string | The custom node name prefix. The full custom node name should be {NamePrefix}-{NodeIP}. |No|
| **NetCapability** | string | Network enhancement features. Enum values: Normal, not enabled; Super, enable Network Enhancement 1.0; Ultra, enable Network Enhancement 2.0; Extreme, enable Network Enhancement 3.0 (for details, refer to the official website documentation) |No|
| **UNIFeature** | boolean | Elastic Network Interface Feature. This feature is effective only when the Elastic Network Interface permission bit is enabled. By default, it is set to false (disabled), true (enabled). |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|
| **SecurityGroupId** | string | Firewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to [DescribeFirewall](api/unet-api/describe_firewall.html). |No|
| **SecGroupId.N.Id** | string | Security Group ID. Up to 5 security groups can be bound at the same time. |No|
| **SecGroupId.N.Priority** | string | Security Group Priority. Value range [1, 5] |No|
| **SecGroupId.N.Name** | string | Security Group Name. |No|
| **UserLabels** | string | UK8S user tags, in key=value format, multiple groups separated by ",", with a maximum of 5 groups. For example: env=pro,type=game<br /> |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|
| **NodeIds** | array[string] | Collection of Node Instance Ids |No|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=AddUK8SUHostNode
&Zone=HjafOmlI
&ProjectId=QhySZaWP
&Region=ofGfDPlB
&ClusterId=PDncjlGz
&NodeCpu=3
&NodeNum=4
&Password=immkVITW
&NodeMem=4
&ChargeType=GLtOpVbU
&NodeUHostType=fjbWacib
&NodeBootDiskType=BcUliGXM
&NodeDataDiskType=HkETvOPs
&NodeDataDiskSize=axIciunR
&NodeDiskType=kFeAdCpF
&NodeDiskSize=5
&Quantity=2
&MachineType=MpjsOzvE
&MinmalCpuPlatform=mdRRKIma
&GpuType=PaxzMqMa
&GPU=cXzHPXgm
&Labels=vUeEMXvc
&Kubelet.MaxPods=8
&IsolationGroup=wuiIQmnd
&SubnetId=GziWrdTB
&ImageId=XyBBPJwo
&DisableSchedule=CYWxsWrP
&UserData=hOaOlcSE
&InitScript=QqwXgCtj
&Taints=AySpTyWA
&Tag=madApXSs
&NodeGroupId=ypaIEiSw
&BootDiskSize=9
&NetCapability=vqWxJNNz
&UNIFeature=true
&Nodes.N.NamePrefix=gGxvUuZh
&NamePrefix=HXHdwHmb
&NamePrefix=DWHYqWCV
&NetworkInterface.N.EIP.Bandwidth=nHVuZUEC
&NetworkInterface.N.EIP.PayMode=YYvPUasx
&NetworkInterface.N.EIP.ShareBandwidthId=sISnDiFM
&NetworkInterface.N.EIP.OperatorName=XhfxkrsL
&NetworkInterface.N.EIP.CouponId=sWzBPskc
&SecurityMode=nFkozyNX
&SecGroupId=wQcwsKKA
&NetworkInterface.N.EIP.Bandwidth=hUXdpRbD
&NetworkInterface.N.EIP.PayMode=hYanNvck
&NetworkInterface.N.EIP.ShareBandwidthId=yMwdCowa
&NetworkInterface.N.EIP.OperatorName=SRPAwVoG
&NetworkInterface.N.EIP.CouponId=fqhevYCM
&SecurityMode=paRgxihP
&SecurityGroupId=mrbzSJpX
&SecGroupId.N.Id=CtLNZxND
&SecGroupId.N.Priority=ViZOqzHD
&SecGroupId.N.Name=nxNSncqY
&UserLabels=YOZdrUzx
```

### Response Example
    
```json
{
  "Action": "AddUK8SUHostNodeResponse",
  "Message": "XcuSztKl",
  "NodeId": [
    "dKbhpRvd"
  ],
  "NodeIds": [
    "WoyWlKQx"
  ],
  "RetCode": 0
}
```





