云调度CloudGTM
根据ID查询调度详情,查询条件:输入域名ID、策略ID
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domainId | Int | 是 | 域名ID |
policyId | Int | 是 | 策略ID |
language | string | 否 | 为空返回中文结果(默认) en:返回英文提示结果 |
参数名称 | 类型 | 描述 |
---|---|---|
policyDesc | string | 策略描述 |
policyType | int | 策略类型,0:负载均衡+主备,1:负载均衡 |
domainId | int | 域名ID标识 |
view | Json | 线路信息: type 线路类型, 0:标准线路,1:自定义线路 viewId 线路ID 线路类型为0时选项 viewCn线路中文 线路类型为0时选项 viewEn线路英文 线路类型为0时选项 userView 自定义线路 线路类型为1时选项 viewTag自定义线路标签 viewMembers 自定义线路包含的实际线路 viewId线路ID viewCn 线路中文 |
rate | Int | 调度频率 以分钟为单位, 可选值1、2、5、10、30、60 |
monitor | Json | 监控配置: monitorType 监控类型,0 http 1 https 2 udp(暂不支持) 3 tcp 4 ping monitorNodes 监控节点 isp 监控节点运营商 area 监控节点区域 path 监控路径,当监控方式为http,https 时选项 port监控端口,当监控方式为http,https,tcp 时选项 responseTimeout响应超时时间,单位:秒,当监控方式为http,https时选项 excludedCodes状态排除码,当监控方式为http,https 时选项,多个状态码用英文分号分隔 httpMethod 监控方式为http/https时支持,可选值:0 默认请求方法 1 post请求 requestData 监控方式为http/https时支持,httpMethod为1时 必填(可为空串) packetLossLimit 丢包率,当监控方式为ping时选项 delayLimit时延,单位:毫秒,当监控方式为ping时选项 |
warning | Json | 告警配置: warnMethod告警方式, 1 邮件告警 warnInterval连续告警提醒周期,单位:分钟 warnEmail 告警邮箱,多个邮箱以英文分号分隔 |
policyResource | List | 策略资源: partType资源类型, 0 主解析资源 1 一级备 2 二级备 3 三级备 type 资源记录类型, 0 A记录 1 CNAME value 资源记录值 loadRatio 比例 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/clouddns/QueryDispatchPolicyDetail" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -d '{ "domainId":4641, "policyId":1 }'
{ "resCode":0, "msg":"操作成功", "content":{ "switchType":1, "policyDesc":"", "monitor":{ "port":80, "httpMethod":0, "monitorNodes":[ { "id":"0-zhejiang", "area":"zhejiang", "ispCn":"电信", "isp":"0", "areaEn":"zhejiang", "nodeEn":"CTCC-ZJ", "areaCn":"浙江" }, { "id":"1-fujian", "area":"fujian", "ispCn":"联通", "isp":"1", "areaEn":"fujian", "nodeEn":"CUCC-FJ", "areaCn":"福建" }, { "id":"0-tianjin", "area":"tianjin", "ispCn":"电信", "isp":"0", "areaEn":"tianjin", "nodeEn":"CTCC-TJ", "areaCn":"天津" }, { "id":"1-hebei", "area":"hebei", "ispCn":"联通", "isp":"1", "areaEn":"hebei", "nodeEn":"CUCC-HB", "areaCn":"河北" }, { "id":"0-chongqing", "area":"chongqing", "ispCn":"电信", "isp":"0", "areaEn":"chongqing", "nodeEn":"CTCC-ZQ", "areaCn":"重庆" }, { "id":"0-guangdong", "area":"guangdong", "ispCn":"电信", "isp":"0", "areaEn":"guangdong", "nodeEn":"CTCC-GD", "areaCn":"广东" }, { "id":"1-guangdong", "area":"guangdong", "ispCn":"联通", "isp":"1", "areaEn":"guangdong", "nodeEn":"CUCC-GD", "areaCn":"广东" }, { "id":"0-liangning", "area":"liangning", "ispCn":"电信", "isp":"0", "areaEn":"liangning", "nodeEn":"CTCC-LN", "areaCn":"辽宁" }, { "id":"0-hubei", "area":"hubei", "ispCn":"电信", "isp":"0", "areaEn":"hubei", "nodeEn":"CTCC-HB", "areaCn":"湖北" }, { "id":"1-hunan", "area":"hunan", "ispCn":"联通", "isp":"1", "areaEn":"hunan", "nodeEn":"CUCC-HN", "areaCn":"湖南" } ], "monitorType":0, "path":"/img/cggall01.jpg", "excludedCodes":"", "delayLimit":0, "packetLossLimit":0, "responseTimeout":20, "requestData":"", "availability":0 }, "rate":2, "policyResource":[ { "partType":0, "value":"58.221.78.86", "type":0, "loadRatio":1 } ], "status":0, "policyId":7073, "domainId":4641, "view":{ "viewEn":"*", "viewCn":"默认", "type":0, "viewId":"*" }, "warning":{ "warnMethod":1, "warnEmail":"512334906@qq.com", "warnInterval":15 }, "policyType":1 } }