获取可用边缘节点列表
更新时间:2025-08-05
接口描述
本接口用于获取可用边缘节点列表。
请求结构
Plain Text
1GET /v1/node/type/{type}?country={country} HTTP/1.1
2Host: bec.baidubce.com
3Content-Type: application/json; charset=utf-8
4Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
type | String | 是 | URI参数 | 需要查询的节点种类,目前支持gpu、container、vm、lb、bm、nat、eip、cds或cds_hdd,分别代表创建GPU、容器、虚机、负载均衡、裸金属、NAT网关、弹性公网IP、云磁盘SSD或云磁盘HDD资源时可用的节点列表 |
country | String | 否 | Query参数 | 指定查询某个国家下的节点列表,不传默认all,查询全部国家节点 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
regionList | List<RegionInfo> | 当前可用节点列表 |
nodeSum | Integer | 当前可用节点数目 |
错误码
请参照错误返回章节的内容。
请求示例
Plain Text
1GET /v1/node/type/container HTTP/1.1
2Host: bec.baidubce.com
3Content-Type: application/json; charset=utf-8
4Authorization: bce-auth-v1/365c9f187eb6430696e57721364381e5/2020-06-24T06:17:39Z/1800/host/0332ac7438b701f9f34c7769f25efc954b84469ba6de09cf074667f33213b4e7
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 08 Jul 2019 03:28:11 GMT
4x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
5X-Bce-Gateway-Region: BJ
6{
7 "regionList": [
8 {
9 "region": "SOUTH_CHINA",
10 "name": "华南",
11 "country":"CHINA",
12 "countryName":"中国",
13 "cityList": [
14 {
15 "city": "GUANGZHOU",
16 "name": "广州",
17 "serviceProviderList": [
18 {
19 "serviceProvider": "CHINA_UNICOM",
20 "name": "联通",
21 "regionId": "cn-guangzhou-un"
22 }
23 ]
24 }
25 ]
26 },
27 {
28 "region": "NORTH_EAST",
29 "name": "东北",
30 "country":"CHINA",
31 "countryName":"中国",
32 "cityList": [
33 {
34 "city": "CHANGCHUN",
35 "name": "长春",
36 "serviceProviderList": [
37 {
38 "serviceProvider": "CHINA_UNICOM",
39 "name": "联通",
40 "regionId": "cn-changchun-un"
41 }
42 ]
43 }
44 ]
45 },
46 {
47 "region": "SOUTH_WEST",
48 "name": "西南",
49 "country":"CHINA",
50 "countryName":"中国",
51 "cityList": [
52 {
53 "city": "CHENGDU",
54 "name": "成都",
55 "serviceProviderList": [
56 {
57 "serviceProvider": "CHINA_MOBILE",
58 "name": "移动",
59 "regionId": "cn-chengdu-cm"
60 }
61 ]
62 }
63 ]
64 },
65 {
66 "cityList":[
67 {
68 "city":"SINGAPORE",
69 "name":"新加坡",
70 "serviceProviderList":[
71 {
72 "name":"BGP",
73 "regionId":"sg-singapore-bgp",
74 "serviceProvider":"BGP"
75 }
76 ]
77 }
78 ],
79 "country":"SINGAPORE",
80 "countryName":"新加坡",
81 "name":"新加坡",
82 "region":"SINGAPORE"
83 },
84 {
85 "cityList":[
86 {
87 "city":"DALLAS",
88 "name":"达拉斯",
89 "serviceProviderList":[
90 {
91 "name":"BGP",
92 "regionId":"us-dallas-bgp",
93 "serviceProvider":"BGP"
94 }
95 ]
96 }
97 ],
98 "country":"AMERICA",
99 "countryName":"美国",
100 "name":"美国",
101 "region":"AMERICA"
102 }
103 ],
104 "nodeSum": 7
105}
Model对象定义
RegionInfo
参数名称 | 类型 | 描述 |
---|---|---|
region | Region | 节点所属区域英文名称 |
name | String | 节点所属区域中文名称,如region为"CENTRAL_CHINA",对应name为"华中" |
country | String | 节点所属国家英文名称,例如 "CHINA" |
countryName | String | 节点所属国家中文名称,例如 country为"CHINA",对应countryName为"中国" |
cityList | List<CityInfo> | 节点所在城市信息 |
CityInfo
参数名称 | 类型 | 描述 |
---|---|---|
city | String | 节点所在城市英文名称,格式如“CHENGDU” |
name | String | 节点所在城市中文名称,如city为“CHENGDU”,则对应name为“成都” |
serviceProviderList | List<ServiceProviderInfo> | 节点所在运营商信息 |
ServiceProviderInfo
参数名称 | 类型 | 描述 |
---|---|---|
serviceProvider | ServiceProvider | 节点所属运营商英文名称 |
name | String | 节点所属运营商中文名称 |
regionId | String | 节点ID,由“国家码-城市-运营商”的小写字母组成字符串。例如 cn-hangzhou-cm,其中国家码标准为ISO 3166-2,城市为拼音,运营商为中国移动cm/中国电信ct/中国联通un/三线ix/bgp。 |
Region
枚举名称 | 描述 |
---|---|
CENTRAL_CHINA | 华中 |
EAST_CHINA | 华东 |
NORTH_CHINA | 华北 |
SOUTH_CHINA | 华南 |
NORTH_EAST | 东北 |
NORTH_WEST | 西北 |
SOUTH_WEST | 西南 |
SINGAPORE | 新加坡 |
AMERICA | 美国 |
GERMANY | 德国 |
ServiceProvider
枚举名称 | 描述 |
---|---|
CHINA_UNICOM | 联通 |
CHINA_MOBILE | 移动 |
CHINA_TELECOM | 电信 |
TRIPLE_LINE | 三线 |
BGP | BGP |