# Purchase UGA - BuyHighProtectGameService

## Overview

Purchase UGA






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `BuyHighProtectGameService`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.netlake.cn/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 |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |**Yes**|
| **ChargeType** | string | Billing method, value range {"Month", "Year", "Dynamic", "Day"}; where East China dual-line weekly payment uses Day, other supported weekly payments use Dynamic; |**Yes**|
| **Quantity** | int | Billing Duration |**Yes**|
| **LineType** | string | 'default': 'DUPLET', value range {"DUPLET", "BGP"} |**Yes**|
| **AreaLine** | string | Region of the route, possible range {"SouthChina", "EastChina"} |**Yes**|
| **SrcBandwidth** | int | Bandwidth |**Yes**|
| **EngineRoom.N** | string | The data center where the purchased package is located, the value range is {"Hangzhou2", "Hangzhou", "Xiamen"}. |**Yes**|
| **DefenceType** | string | Defense type, default is TypeFixed; Value range {"TypeFixed", "TypeDynamic"} |No|
| **HighProtectGameServiceName** | string | UDHCP Service Name |No|
| **Vendor** | int | Vendor Number |No|
| **DefenceDDosBaseFlowArr.N** | string | DDoS Basic Protection Value (when purchasing a package with multiple lines, the order is, Telecom, Unicom, Mobile..., when it is a single line, only pass DefenceDDosBaseFlowArr.0) |No|
| **DefenceDDosMaxFlowArr.N** | string | Maximum DDoS protection value (when purchasing a package with multiple lines, the order is Telecom, Unicom, Mobile...; when it is a single line, only pass DefenceDDosMaxFlowArr.0) |No|
| **ForwardType** | string | Forwarding type, default is: Proxy; Proxy: Proxy, Passthrough: Direct connection |No|
| **CouponId** | string | Coupon ID |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|
| **ResourceInfo** | [*ResourceInfo*](#resourceinfo) | Returned user resource information |**Yes**|

#### Data Model


#### ResourceInfo

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ResourceId** | string | Resource ID |No|

## Example

### Request Example
    
```
https://api.netlake.cn/?Action=BuyHighProtectGameService
&ChargeType="Month"
&DefenceType="TypeFixed"
&DefenceDDosBaseFlow=10
&DefenceDDosMaxFlow=20
&Quantity=1
&CouponId="93d238b6"
&HighProtectGameServiceName="bgp_test"
&LineType="BGP"
&ResourceId="ab3607ef-3fa8-4a6e-9872-33175f5612ba"
&ChangePayMode="BuyGame"
&DefenceDDosMaxFlowArr="20,20"
&DefenceDDosBaseFlowArr="10,10"
&EngineRoom="Hangzhou"
&AreaLine="EastChina"
&SrcBandwidth=10
&ChargeIPQuota=1
&EngineRoom=ajrRhaNd
&Vendor=8
&EngineRoom.1=VADeOllO
&DefenceDDosMaxFlowArr.1=XDLNLRdu
&DefenceDDosBaseFlowArr.1=kbyavTaR
&AccessMode=DMYpuJPf
&AccessMode=ycttAjiB
&ProjectId=fKyQBaha
&AccessMode=aMLmIgCR
&ForwardType=RvpwuQuG
```

### Response Example
    
```json
{
  "Action": "BuyHighProtectGameServiceResponse",
  "ResourceInfo": "{ResourceId: xxx, Region: xxx}",
  "RetCode": 0
}
```





