更新时间:2020-10-06 21:17:26
用于批量启用/停用调度策略配置的资源。生效耗时1分钟。
限制说明:
建议调用频率不超过240次/分钟。
域名必须不包含如下信息:出售药物和管制刀具类,含有不法言论、信息。
视频类域名必须有视听许可证;博客论坛或社区类加速域名必须有BBS专项审批资质。
鉴权方法:见概览页公共鉴权示例。
参数 | 类型 | 必填 | 描述 |
---|---|---|---|
domainId | Int | 是 | 要操作调度策略所属的域名 |
policyId | String | 是 | 要操作的调度策略ID |
value | string | 是 | 操作类型 0表示启用策略;1表示停用策略 |
language | string | 否 | 要操作的资源值(例如:192.168.0.1或者xxxx.com) |
operate | Int | 是 | 操作类型 1表示启用资源;0表示停用资源 |
language | string | 否 | 为空返回中文结果(默认)en:返回英文提示结果 |
参数 | 类型 | 描述 |
---|---|---|
resCode | int | 状态码。resCode的详细说明请参见“调度业务状态码”。 |
msg | string | 状态码的详细说明。 |
content | List | policyId调度策略ID,用于标识调度策略 |
#!/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/ControlDispatchResource" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"domainId":4641,
"policyId": 212,
"value":"192.168.1.1",
"operate":1
}'
{
"resCode": 0,
"msg":"操作成功",
"content": null
}