简要描述:
注:
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
productId | 是 | integer | 品牌编号 |
line_no | 否 | string | 线路编号 |
area_no | 否 | string | 可用区编号 |
输入示例
https://www.fwvps.com/api/cloud-product/areaPrice?productId=value
返回示例
JSON格式
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 0,
"Message" : "返回内容"
"Data": {
"1":{
"Line_no":"01",
"Area_no":'001',
"Harddisk_pirce" : '2',
"System_gift" : '20',
"Datadisk_gift" : '0',
"Datadisk_list" : '10-100',
"Bandwidth_price" : '50',
"Bandwidth_gift" : '3',
"Bandwidth_list" : '3-20',
"Ip_price" : '10',
"Ip_gift" : '1',
"Ip_list" : '1-64',
"Defense_price" : '0',
"Defense_gift" : '0',
"Defense_list" : '0',
"Broadband_price" : '0',
"Broadband_gift" : '0',
"Broadband_list" : '0',
"Trial_time" : '8',
"Day_rate" : '0',
"Week_rate" : '0',
"Months" : '1,2,6,12,24,36',
"Months_rate" : '1,3,5.5,10,20,30',
"Line_price" : '0',
},
"2":{
"Line_no":"02",
"Area_no":'002',
"Harddisk_pirce" : '2',
"System_gift" : '20',
"Datadisk_gift" : '0',
"Datadisk_list" : '10-100',
"Bandwidth_price" : '50',
"Bandwidth_gift" : '3',
"Bandwidth_list" : '3-20',
"Ip_price" : '10',
"Ip_gift" : '1',
"Ip_list" : '1-64',
"Defense_price" : '0',
"Defense_gift" : '0',
"Defense_list" : '0',
"Broadband_price" : '0',
"Broadband_gift" : '0',
"Broadband_list" : '0',
"Trial_time" : '8',
"Day_rate" : '0',
"Week_rate" : '0',
"Months" : '1,2,6,12,24,36',
"Months_rate" : '1,3,5.5,10,20,30',
"Line_price" : '0',
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Message | string | 返回内容 |
Area_no | string | 可用区编号 |
Harddisk_pirce | decimal | 数据盘价格 |
System_git | integer | 系统盘赠送值 |
Datadisk_git | integer | 数据盘赠送值 |
Bandwidth_price | decimal | 带宽价格 |
Bandwidth_gift | integer | 带宽赠送值 |
Bandwidth_list | string | 带宽区间值 |
Ip_price | decimal | ip价格 |
Ip_gift | integer | ip赠送值 |
Ip_list | integer | ip区间值 |
Defense_price | decimal | 防御价格 |
Defense_gift | decimal | 防御赠送值 |
Defense_list | string | 防御区间值 |
Broadband_price | decimal | 宽带价格 |
Broadband_gift | integer | 宽带赠送值 |
Broadband_list | string | 宽带区间值 |
Trial_time | integer | 试用时间 |
Day_rate | decimal | 日付费率 |
Week_rate | decimal | 周付费率 |
Months | string | 可选时长 |
Months_rate | string | 可选时长费率 |
Line_price | decimal | 线路基础价格 |
备注
简要描述:
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
productId | 是 | integer | 品牌编号 |
line_no | 否 | string | 线路编号 |
area_no | 否 | string | 可用区编号 |
type | 否 | integer | 返回值类别取值范围:1:全部;2:系统类别;3:系统信息 |
detail | 否 | integer | 可用区关联系统,默认值:1取值范围:1:输出;2:不输出 |
输入示例
https://www.fwvps.com/api/cloud-product/areaSystem?productId=value&type=1
返回示例
JSON格式
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 0,
"Message" : "返回内容"
"Data": {
"group_list":{
"1":{
"Name": "windows",
"Attribute": "1",
"Status": "1",
},
"2":{
"Name": "linux",
"Attribute": "1",
"Status": "1",
}
},
"system_list":{
"1":{
"Line_no":"",
"Group_name":"windows",
"Name": "windows 2008",
"System_no": "img-asdsaewf",
"Iogin_name": "administrator",
"Port": "",
"Max_cpu_limit": "",
"Cpu_limit": "",
"Max_memory_limit": "",
"Memory_limit": "",
"Status":"1",
"Type":"",
},
"2":{
"Line_no":"",
"Group_name":"windows",
"Name": "windows 2012",
"System_no": "img-sdfdfv",
"Iogin_name": "administrator",
"Port": "",
"Max_cpu_limit": "",
"Cpu_limit": "",
"Max_memory_limit": "",
"Memory_limit": "",
"Status":"1",
"Type":"create",
}
},
"detail":{
"1":{
"Line_no":"ap-guangzhou",
"Area_no": "ap-guangzhou-1",
"Group_name": "Windows",
"Name": "windows 2008",
"System_no": "img-xxxx",
"Max_memory_limit" : "",
"Memory_limit":"",
"Max_cpu_limit":"",
"Cpu_limit":"",
"Type":"",
"Attribute":"",
"Status":"1"
},
"2":{
"Line_no":"ap-guangzhou",
"Area_no": "ap-guangzhou-1",
"Group_name": "Windows",
"Name": "windows 2012",
"System_no": "img-xxxx",
"Max_memory_limit" : "",
"Memory_limit":"",
"Max_cpu_limit":"",
"Cpu_limit":"",
"Type":"",
"Attribute":"",
"Status":"1"
},
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Message | string | 返回内容 |
group_list | array | 系统分类列表,详情请参考group_list数据结构说明 |
system_list | array | 系统信息列表,详情请参考system_list数据结构说明 |
detail | array | 可用区关联系统列表,详情请参考detail数据结构说明 |
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 返回编号 |
Message | string | 返回内容 |
Name | string | 操作系统类别名称 |
Attribute | integer | 操作系统类型属性 1:静态 2:动态 |
Status | integer | 状态 0:禁用 1:启用 |
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 返回编号 |
Message | string | 返回内容 |
Line_no | string | 线路编号 |
Group_name | string | 镜像类别 |
Name | string | 操作系统名称 |
System_no | string | 操作系统编号 |
Login_name | string | 登录名 |
Port | string | 端口 |
Max_cpu_limit | integer | 最大cpu限制 |
Max_memory_limit | integer | 最大内存限制 |
Memory_limit | integer | 最小内存限制 |
Status | integer | 启用状态,0:禁用;1:启用 |
Type | string | 支持类型,create:创建;install:重装 |
参数名 | 类型 | 说明 |
---|---|---|
Line_no | string | 线路编号 |
Area_no | string | 可用区编号 |
Group_name | string | 镜像类别 |
Name | string | 镜像名称 |
System_no | string | 镜像编号 |
Max_memory_limit | string | 内存最大限制值 |
Memory_limit | string | 内存最小限制 |
Max_cpu_limit | string | CPU最大限制 |
Cpu_limit | string | CPU最小限制 |
Attribute | integer | 操作系统类型属性 1:静态 2:动态 |
Type | string | 操作类型类型:开通create,重装install |
Status | integer | 启用状态,0:禁用;1:启用 |
备注
简要描述:
注:
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
productId | 是 | integer | 品牌编号 |
line_no | 否 | string | 线路编号 |
area_no | 否 | string | 可用区编号 |
type | 否 | integer | 返回值类别取值范围:1:全部;2:规格组;3:规格信息 |
detail | 否 | integer | 可用区关联规格,默认值:1取值范围:1:输出;2:不输出 |
输入示例
https://www.fwvps.com/api/cloud-product/areaSpec?productId=104&type=1
返回示例
JSON格式
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 0,
"Message" : "返回内容"
"Data": {
"group_list":{
"1":{
"Name": "标准型S1",
"Group_id":"D1"
},
"2":{
"Name": "标准型S2",
"Group_id":"D2"
}
},
"spec_list":{
"1":{
"Group_id":"S2",
"Name": "标准型S2",
"Spec_no": "S2.SMALL1",
"Cpu":"1",
"Memory":"1",
"Systemdisk":"",
"Datadisk":"",
"Bandwidth":"",
"Ip":"",
"Defense":"",
"Months":"",
"Months_rate":"",
"Buy_status":"1",
"Upgrade_status":"1",
},
"2":{
"Group_id":"S2",
"Name": "标准型S2",
"Spec_no": "S2.SMALL2",
"Cpu":"1",
"Memory":"2",
"Systemdisk":"",
"Datadisk":"",
"Bandwidth":"",
"Ip":"",
"Defense":"",
"Months":"",
"Months_rate":"",
"Buy_status":"1",
"Upgrade_status":"1",
}
}
"detail":{
"1":{
"Line_no":"ap-beijing",
"Area_no":"ap-beijing-1",
"Group_name":"标准型S1",
"Group_id":"S1",
"Spec_name":"标准型S1",
"Spec_no":"S1.SMALL2",
"Price":""
"Cpu" : "1",
"Memory": "2",
"Trial_time":"",
"Day_rate":"",
"Week_rate":"",
"Months":"",
"Months_rate":"",
"Buy_status":1,
"Status":1,
"Upgrade_status":"",
},
"2":{
"Line_no":"ap-beijing",
"Area_no":"ap-beijing-1",
"Group_name":"标准型S1",
"Group_id":"S1",
"Spec_name":"标准型S1",
"Spec_no":"S1.MEDIUM2",
"Price":""
"Cpu" : "2",
"Memory": "2",
"Trial_time":"",
"Day_rate":"",
"Week_rate":"",
"Months":"",
"Months_rate":"",
"Buy_status":1,
"Status":1,
"Upgrade_status":"",
}
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Message | string | 返回内容 |
group_list | array | 规格组列表,详情请参考group_list数据结构说明 |
spec_list | array | 规格信息列表,详情请参考spec_list数据结构说明 |
detail | array | 可用区关联规格列表,详情请参考detail数据结构说明 |
参数名 | 类型 | 说明 |
---|---|---|
Name | string | 规格组名称 |
Group_id | string | 规格组编号 |
参数名 | 类型 | 说明 |
---|---|---|
Group_id | string | 规格组编号 |
Name | string | 规格名称 |
Spec_no | string | 规格编号 |
Cpu | integer | cpu |
Memory | decimal | 内存 |
Systemdisk | int | 系统盘 |
Datadisk | integer | 数据盘 |
Bandwidth | integer | 带宽 |
Ip | integer | ip数 |
Defense | integer | 防御值 |
Buy_status | integer | 购买状态 |
Upgrade_status | integer | 升级状态 |
参数名 | 类型 | 说明 |
---|---|---|
Line_no | string | 线路编号 |
Area_no | string | 可用区编号 |
Group_name | string | 规格组名称 |
Group_id | string | 规格组编号 |
Spec_name | string | 规格名称 |
Spec_no | string | 规格编号 |
Price | string | 销售价格 |
Cpu | integer | cpu |
Memory | decimal | 内存 |
Trial_time | string | 试用时间 |
Day_rate | string | 日付费率 |
Week_rate | string | 周付费率 |
Months | string | 可选时长 例如:1,3,6,12,24,36 |
Months_rate | string | 月付费率 例如:1,3,6,12,24,36 |
Buy_status | integer | 购买状态 1:开启 0:关闭 |
Upgrade_status | integer | 升级状态 1:开启 0:关闭 |
Status | integer | 规格状态 1:开启 0:关闭 |
备注
简要描述:
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
productId | 是 | integer | 品牌编号 |
line_no | 否 | string | 线路编号 |
输入示例
https://www.fwvps.com/api/cloud-product/areaList?type_id=1&productId=1
返回示例
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 0,
"Message" : "返回内容"
"Data": {
"1":{
"Name": "泰国一区",
"Area_no": "ap-bangkok-1",
"Line_no": "ap-bangkok",
"Status":1,
},
"2":{
"Super_id": "1",
"Name": "泰国二区",
"Area_no": "ap-bangkok-2",
"Status":0,
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Message | string | 返回内容 |
Name | string | 可用区名称 |
Area_no | string | 可用区编号 |
Line_no | integer | 线路编号 |
Status | integer | 可用区状态 1:启用 0:禁用 |
备注
简要描述:
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
productId | 是 | integer | 品牌编号 |
输入示例
https://www.fwvps.com/api/cloud-product/lineList?productId=104
返回示例
JSON格式
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 0,
"Message" : "返回内容"
"Data": {
"1":{
"Name": "'亚太地区(曼谷)",
"Line_no": "ap-bangkok",
"Line_status":1,
"Buy_status":1,
"Grade_status":1,
"Renew_status":1,
"Defense_status":1,
"Install_status":1,
"Ip_type":"",
"Vpc_type":""
},
"2":{
"Name": "华北地区(北京)",
"Line_no": "ap-beijing",
"Line_status":1,
"Buy_status":1,
"Grade_status":1,
"Renew_status":1,
"Defense_status":1,
"Install_status":1,
"Ip_type":"",
"Vpc_type":""
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Message | string | 返回内容 |
Line_no | string | 线路编号 |
Name | string | 线路名称 |
Line_status | integer | 线路状态 1:启用 0:禁用 |
Buy_status | integer | 购买状态 1:启用 0:禁用 |
Grade_status | integer | 升级状态 1:启用 0:禁用 |
Renew_status | integer | 续费状态 1:启用 0:禁用 |
Defense_status | integer | 防御状态 1:启用 0:禁用 |
Install_status | integer | 重装状态 1:liunx与windows允许互装 2:禁止互装 |
Ip_type | string | 弹性公网IP的类型 5_bgp:全动态BGP 5_sbgp:静态BGP |
Vpc_type | string | vpc类型 19_bgp:全动态BGP 19_sbgp:静态BGP |
备注
简要描述:
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
productId | 是 | integer | 品牌编号 |
package_no | 是 | varchar | 套餐编号 |
输入示例
https://www.fwvps.com/api/cloud-product/panel?productId=104&package_no=cqdx-A1
返回示例
JSON格式
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 0,
"Message" : "返回内容"
"Data": {
"1":{
"Id": "1253",
"Name": "重庆市-电信1(剩余5台)",
},
"2":{
"Id": "1254",
"Name": "重庆市-电信2(剩余10台)",
}
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Message | string | 返回内容 |
Id | integer | 宿主机ID |
Name | string | 机房名称及剩余数量 |
备注
正常返回示例:
JSON示例
{
"RequestId":"4C467B38-3910-447D-87BC-AC049166F216",
"Code" : "200"
}
异常返回示例:
您可以根据接口错误码,参考 公共错误码 以及 API 错误中心 排查错误。当您无法排查错误时,可以 提交工单 联系我们,并在工单中注明 RequestId。
JSON示例
{
"RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
"Code" : "-2"
"Message":"xxxxxxx"
}
备注
简要描述:
本接口用于查询品牌列表。接口请求地址
输入示例
https://www.fwvps.com/api/common/brandlist
返回示例
JSON格式
{
"RequestId":'423369C7-AD6F-3GT6-NMJ7-E2RG5N6HG7D3',
"Code": 200,
"Data": {
"1":{
"Id": "'100",
"Other_name":"阿里云"
},
}
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
RequestId | string | 请求编号 |
Code | integer | 状态码 |
Id | integer | 品牌编号 |
Other_name | string | 品牌名称 |
备注
此示例Python使用Selenium调用Chrome浏览器并通过代理进行自动化测试。
import time
import string
import zipfile
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
targetURL = "http://myip.ipip.net" # 访问的目标站点
proxyHost = "61.171.76.145" # 代理IP地址
proxyPort = "50353" # 代理IP端口号
authKey = "x" # 代理IP的AuthKey
password = "x" # 代理IP的AuthPwd
def create_proxy_auth_extension(proxy_host, proxy_port, proxy_username, proxy_password, scheme='http',
plugin_path=None):
if plugin_path is None:
plugin_path = r'./{}_{}_qgnet_proxyauth_plugin.zip'.format(proxy_username, proxy_password)
manifest_json = """
{
"version": "1.0.0",
"manifest_version": 2,
"name": "Chrome Proxy",
"permissions": [
"proxy",
"tabs",
"unlimitedStorage",
"storage",
"",
"webRequest",
"webRequestBlocking"
],
"background": {
"scripts": ["background.js"]
},
"minimum_chrome_version":"22.0.0"
}
"""
background_js = string.Template(
"""
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "${scheme}",
host: "${host}",
port: parseInt(${port})
},
bypassList: ["localhost"]
}
};
chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
function callbackFn(details) {
return {
authCredentials: {
username: "${username}",
password: "${password}"
}
};
}
chrome.webRequest.onAuthRequired.addListener(
callbackFn,
{urls: [""]},
['blocking']
);
"""
).substitute(
host=proxy_host,
port=proxy_port,
username=proxy_username,
password=proxy_password,
scheme=scheme,
)
with zipfile.ZipFile(plugin_path, 'w') as zp:
zp.writestr("manifest.json", manifest_json)
zp.writestr("background.js", background_js)
return plugin_path
if __name__ == '__main__':
# 此处指定您的webdriver路径,版本需要跟您所使用的Chrome版本一致,
# 下载地址https://registry.npmmirror.com/binary.html?path=chromedriver/
driver_location = "./chromedriver/chromedriver_v106_win.exe"
proxy_auth_plugin_path = create_proxy_auth_extension(
proxy_host=proxyHost,
proxy_port=proxyPort,
proxy_username=authKey,
proxy_password=password)
option = webdriver.ChromeOptions()
option.add_argument("--start-maximized") # 窗口最大化运行
option.add_extension(proxy_auth_plugin_path) # 添加proxy插件
# 此处selenium版本为4.8.0
driver = webdriver.Chrome(service=Service(driver_location), options=option)
driver.get(targetURL)
time.sleep(100)
driver.quit()
此示例Python使用Selenium调用Chrome浏览器并通过代理进行自动化测试。
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
targetURL = "http://myip.ipip.net" #访问的目标站点
proxyAddr = "您的代理IP:端口号"
if __name__ == '__main__':
browser_location = r".\Chrome\chrome.exe" #指定浏览器路径位置
driver_location = r".\Chrome\chromedriver.exe" #指定Driver路径位置
option = webdriver.ChromeOptions()
option.binary_location = browser_location #设置浏览器位置
option.add_argument("--start-maximized") #窗口最大化运行
option.add_argument('--proxy-server=%(server)s' % {"server": proxyAddr})
driver = webdriver.Chrome(service=Service(driver_location), options=option)
driver.get(targetURL)
print(driver.page_source)