文档中心 API文档 根据ID查询调度详情

根据ID查询调度详情

更新时间:2019-08-27 11:14:37

适用产品

云调度CloudGTM

接口描述

根据ID查询调度详情,查询条件:输入域名ID、策略ID

请求参数

Body 参数

JSON
参数名称类型必填描述
domainId
Int域名ID
policyId
Int策略ID
language
string为空返回中文结果(默认) en:返回英文提示结果

返回参数

Body 参数

JSON
参数名称类型描述
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 比例

示例

JSON
JSON
请求示例
复制代码 复制成功
#!/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
    }
}
本篇文档内容对您是否有帮助?
有帮助
没帮助
提交成功!非常感谢您的反馈,我们会继续努力做到更好!