
# 创建边缘小站
#### 场景描述
本章节指导用户通过API查询支持边缘小站接入的CloudPond，以及查询用于标识小站部署大致位置的场地，最后创建一个边缘小站。API的调用方法请参见[如何调用API](https://support.huaweicloud.com/api-cloudpond/ies_05_0300.html)。
#### 涉及接口
场景边缘小站，涉及的接口如下：
- [查询支持的区域列表](https://support.huaweicloud.com/api-cloudpond/ListSupportedRegions.html)：获取CloudPond拟接入的华为云区域。
- [创建边缘小站](https://support.huaweicloud.com/api-cloudpond/CreateEdgeSite.html)：用于创建边缘小站。
 
#### 操作步骤
1. 查询支持边缘小站接入的区域列表并确认拟接入的区域ID。
   - 接口相关信息 URI格式：GET /v1/{domain_id}/regions
     接口详情请参见：[查询支持的区域列表](https://support.huaweicloud.com/api-cloudpond/ListSupportedRegions.html)。
     
   
   - 请求示例
     ```
     GET https://{endpoint}/v1/{domain_id}/regions
     ```
     {endpoint}信息请从[地区和终端节点](https://developer.huaweicloud.com/endpoint?CBR)获取。
     {domain_id}信息获取方式参见[获取账号ID](https://support.huaweicloud.com/api-cloudpond/ies_05_0603.html)。
     
   
   - 响应示例 **状态码： 200**
     OK
     ```
     {
       "regions" : [ {
         "region_id" : "cn-north-9",
         "display_name" : "华北-乌兰察布一"
       }, {
         "region_id" : "cn-south-1",
         "display_name" : "华南-广州"
       } ]
     }
     ```
     
    
2. 创建边缘小站。
   - 接口相关信息 URI格式：POST /v1/{domain_id}/edge-sites
     接口详情请参见：[创建边缘小站](https://support.huaweicloud.com/api-cloudpond/CreateEdgeSite.html)
     
   
   - 请求示例
     ```
     POST https://{endpoint}/v1/{domain_id}/edge-sites
     ```
     {endpoint}信息请从[地区和终端节点](https://developer.huaweicloud.com/endpoint?CBR)获取。
     {domain_id}信息获取方式参见[获取账号ID](https://support.huaweicloud.com/api-cloudpond/ies_05_0603.html)。
     请求Body体
     ```
     {
     "edge_site": {
     "name": "test11111111",
     "description": "teasra",
     "region_id": "br-iaas-odin1",
     "location": {
     "name": "test11111111111",
     "description": "description",
     "country": "CN",
     "province": "安徽省",
     "city": "合肥市",
     "district": "瑶海区",
     "condition": {
     "environment": 0,
     "space": 0,
     "transport": 0
     }
     }
     }
     }
     ```
     
   
   - 响应示例 **状态码： 200**
     OK
     ```
     {
     "edge_site": {
     "id": "cc89b1e5-521d-4a85-be83-e6f7217fc63e",
     "domain_id": "2b76febbe5d34eac85d26435c1f15809",
     "name": "test11111111",
     "description": "teasra",
     "region_id": "br-iaas-odin1",
     "project_id": "060576838600d5762f2dc000470eb164",
     "availability_zone_id": null,
     "status": "initial",
     "location": {
     "name": "test11111111111",
     "description": "description",
     "country": "CN",
     "province": "安徽省",
     "city": "合肥市",
     "district": "瑶海区",
     "condition": {
     "environment": 0,
     "space": 0,
     "transport": 0
     }
     },
     "created_at": "2022-04-15T07:59:20.641Z",
     "updated_at": null
     }
     }
     ```
     
    
 
