云调度CloudGTM
启停调度域名
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domainIds | String | 是 | 域名id 多个用英文分号隔开 ; |
controlType | Int | 是 | 类型: 1 :启动 2 :停用 |
language | String | 否 | 为空返回中文结果(默认) |
参数名称 | 类型 | 描述 |
---|---|---|
resCode | String | 状态码 |
msg | String | 详情 |
content | List | domainId调度域名id code 授权处理结果代码请参见“附录1业务状态码” status 0启用 1停用 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
1 | Other errors | 400 | 其他错误 |
100 | Server side error | 500 | 服务器端错误 |
101 | Parameter cannot be empty | 400 | 参数不能为空 |
102 | Parameter format error | 400 | 参数格式错误 |
103 | user does not exist | 400 | 用户不存在 |
#!/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/ControlDispatchDomain " \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -d '{ "domainIds ":”11111;22222”, “controlType”:1 }'
{ "resCode":0, "msg":"操作成功", "content":[ { "code":0, "domainId":4641, "status":0, //0启用 1停用 "msg":"success" } ] }