调度策略相关接口
更新时间:2022-11-18
查询域名的调度策略
描述
- 查询指定域名的调度策略
请求参数
URI | GET /v1/domains/{domain_name}/strategy |
Query String | 无 |
Request Body | 无 |
示例:
GET /v1/domains/www.mydomain.com/strategy HTTP/1.1
Host: itm.baidubce.com
Authorization: authorization string
x-bce-date: 2022-11-18T06:22:24Z
返回数据
{
"status": "start", // 域名调度状态: "", "start", "stop", "pause"
"strategy": {
"start": "根规则",
"rules": [
{
"type": "geoProximity",
"area": "none.CN",
"isp": "other",
"name": "根规则",
"enable": true,
"items": [
{"reference": "北京","weight": 0,"priority": 0,"usersets": ""}
]
},
{
"type": "wrr",
"area": "beijing.CN",
"isp": "other",
"name": "北京",
"enable": true,
"items": [
{"reference": "220.181.38.135","weight": 1,"priority": 0,"usersets": ""}
]
}
]
},
"endpointsConf": [ // 调度策略中的端点配置信息
{"type": "A","value": "220.181.38.135","area": "beijing.CN","isp": "ct","evalHealth": true,"enable": true}
]
}
生成默认调度策略并启用默认策略
描述
- 为域名生成默认调度策略 & 启用此策略
请求参数
URI | POST /v1/domains/{domain_name}/recommend-strategy |
Query String | 无 |
Request Body | 无 |
示例:
POST /v1/domains/www.mydomain.com/recommend-strategy HTTP/1.1
Host: itm.baidubce.com
Authorization: authorization string
x-bce-date: 2022-11-18T06:22:24Z
返回数据
null