# Create ULightHost - CreateULHostInstance

## Overview

Create ULightHost






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CreateULHostInstance`.                      | **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 |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/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|
| **ImageId** | string | Image ID. Please obtain it through [DescribeImage](api/uhost-api/describe_image) |**Yes**|
| **BundleId** | string | Package ID. For example: "ulh.c1m1s40b30t800". |**Yes**|
| **Password** | string | ULHost password. Please set the password according to the [field specification](api/uhost-api/specification). The password needs to be encoded with base64, as shown in the example below: # echo -n Password1 \| base64 |**Yes**|
| **Name** | string | Light application host name. Default: Package ID. Please set the instance name according to the [field specification](api/uhost-api/specification). |No|
| **ChargeType** | string | Billing Mode. Enumeration values: <br /><br /> > Year, Yearly payment; <br /><br /> > Month, Monthly payment; <br /><br /> > ThirtyDay, 30-day payment, used for cross-border e-commerce related packages; Default: Month |No|
| **Quantity** | int | Purchase duration. Default: 1. Purchase until the end of the month is not supported. |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|
| **SecurityGroupId** | string | Firewall ID, default: Web recommended firewall. For how to query SecurityGroupId, please refer to [DescribeFirewall](api/unet-api/describe_firewall.html). |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|
| **ULHostId** | string | Instance ID |**Yes**|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=CreateULHostInstance
&Region=cn-zj
&ProjectId=BiVhUqWM
&BundleId=WKrqUTuj
&ChargeType=iHquSVAk
&Password=KzuuLxoH
&Quantity=4
&Quantity=8
&ImageId=reBHwafg
&ImageId=qCkNplRb
&CouponId=JsBRKuuV
&ImageId=MmsUzsUT
&CouponId=ymmIIHOA
&BillActivityId=8
&BillActivityRuleId=6
&Name=dtIbqVbo
&VPCId=rWsGXPTF
&SubnetId=MZdVRtph
&SecurityGroupId=CsyANPJL
```

### Response Example
    
```json
{
  "Action": "CreateULHostInstanceResponse",
  "Message": "UQIsLeri",
  "RetCode": 0,
  "ULHostId": "DJCRwHar"
}
```





