跳转至

下行限速配置接口

POST 更新缓存规则

POST /prod-api/cdn/layer7/advance/modifyLimitRateRules

Body 请求参数

新增规则(请求体中不写 locationId):

{
    "type": "1",
    "value": 1,
    "domainId": 205,
    "name": "jpg"
}

编辑规则(需带上 locationId):

{
    "type": "1",
    "value": 1,
    "domainId": 205,
    "name": "jpg",
    "locationId": 925
}

填写说明

场景 locationId
新增规则 请求体中不写该参数
编辑规则 必填,取 查询目录限速规则 返回的 data.row[].locationId

请求参数

名称 位置 类型 必选 中文名 说明
Authorization header string -
body body L7LimitRateRuleVo L7LimitRateRuleVo -

返回示例

200 Response

{
    "msg": "更新成功",
    "code": 200
}

201 Response

{}

返回结果

状态码 状态码含义 说明 数据模型
200 OK - Inline
201 Created - Inline
401 Unauthorized - Inline
403 Forbidden - Inline
404 Not Found - Inline

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» msg string true - -
» code integer true - -

数据模型

L7LimitRateRuleVo

{
  "domainId": 0,
  "name": "string",
  "type": 0,
  "value": 0
}

编辑时在上述基础上增加 locationId

L7LimitRateRuleVo

属性

名称 类型 必选 约束 中文名 说明
domainId integer(int64) true - 域名id -
locationId integer(int64) - 规则 ID 下行限速规则的唯一标识。新增时请求体中不写该参数;编辑时必填,与查询接口 data.row[].locationId 一致
name string true - 规则内容 -
type integer(int32) true - 规则类型 -
value integer(int32) true - 限速设置 -