文档中心 API文档 编辑调度域名

编辑调度域名

更新时间:2023-08-01 17:27:49

适用产品

云调度CloudGTM

接口描述

编辑调度域名

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Body 参数

参数名称类型必填描述
domainName
String域名
domainId
Integer域名id
dispatchZone
String可选,国内:cdngtm.cn, 海外:cdngtm.com;默认值为cdngtm.com
ttl
Integer默认值为10,不得低于10,否则返回解析记录TTL错误提示。
domainDesc
String备注
sessionHold
Integer1:开启 空为不开启
sessionInterval
Integer保持时间
language
String为空返回中文结果(默认) en:返回英文提示结果

返回参数

Body 参数

参数名称类型描述
resCode
String状态码
msg
String详情

错误码

错误代码(code)描述(message)HTTP状态码语义
1Other errors400其他错误
100Server side error500服务器端错误
101Parameter cannot be empty400参数不能为空
102Parameter format error400参数格式错误
103user does not exist400用户不存在

示例

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/UpdateDispatchDomain " \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
            "domainId ":11111,
            "domainName": "aaa.com ",
        “dispatchZone”: “cdngtm.cn”,
        “ttl”:10,
        “domainDesc”: “备注”
}'
返回示例
复制代码 复制成功
{
    "resCode":0,
    "msg":"操作成功",
    "content":{
      }
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!