批量添加网站类规则
POST
https://ipanti.jdcloud-api.com/v1/regions/{regionId}/instances/{instanceId}:createWebRules
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
regionId | String | True | 区域 ID, 高防不区分区域, 传 cn-north-1 即可 | |
instanceId | String | True | 高防实例 Id |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
webRuleSpecList | WebRuleSpec[ ] | True | 批量添加网站类规则请求参数 |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
serviceIp | String | False | 高防 IP, serviceIps 为空时生效 | |
serviceIps | String[ ] | False | 高防 IP 列表, 不为空时忽略 serviceIp, 传多个时后台会在高防IP封禁后随机切换其他未封禁的IP | |
domain | String | True | 子域名 | |
protocol | WebRuleProtocol | True | 协议: http, https 至少一个为 true | |
port | Integer[ ] | False | HTTP 协议的端口号, 如80, 81; 如果 protocol.http 为 true, 至少配置一个端口 | |
httpsPort | Integer[ ] | False | HTTPS 协议的端口号, 如443, 8443; 如果 protocol.https 为 true, 至少配置一个端口 | |
originType | String | True | 回源类型:A 或者 CNAME | |
originAddr | OriginAddrItem[ ] | False | originType 为 A 时, 需要设置该字段 | |
onlineAddr | String[ ] | False | 备用的回源地址列表, 可以配置为一个域名或者多个 ip 地址 | |
originDomain | String | False | 回源域名, originType 为 CNAME 时需要指定该字段 | |
algorithm | String | True | 转发规则. - wrr: 带权重的轮询 - rr: 不带权重的轮询 - sh: 源地址hash |
|
forceJump | Integer | False | 是否开启 HTTPS 强制跳转, protocol.http 和 protocol.https 都为 true 时此参数生效. - 0: 不开启强制跳转. - 1: 开启强制跳转 |
|
customPortStatus | Integer | False | 是否为自定义端口号. 0: 默认 - 1: 自定义 |
|
httpOrigin | Integer | False | 是否开启 HTTP 回源, protocol.https 为 true 时此参数生效. - 0: 不开启. - 1: 开启 |
|
webSocketStatus | Integer | True | 是否开启 WebSocket. - 0: 不开启 - 1: 开启 |
|
geoRsRoute | GeoRsRoute[ ] | False | 按区域分流回源配置 | |
enableKeepalive | String | False | 是否开启回源长连接, protocol 选项开启 https 时生效, 可取值 - on: 开启 - off: 关闭 |
|
httpVersion | String | False | http 版本, protocol 选项开启 https 时生效, 可取值 http1 或 http2 | |
sslProtocols | String[ ] | False | SSL协议类型, protocol 选项开启 https 时生效, 可取值SSLv2,SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 | |
suiteLevel | String | False | 加密套件等级, protocol 选项开启 https 时生效, 可取值 - low: 低级 - middle: 中级 - high:高级 - custom:自定义 |
|
userSuiteLevel | String[ ] | False | 自定义加密套件等级, suiteLevel 为 custom 是有效 | |
enableHealthCheck | Integer | False | 健康检查开关, 0: 关闭, 1: 开启 | |
proxyConnectTimeout | Integer | False | 回源连接超时时长, 单位 秒 | |
enableUnderscores | Integer | False | 请求头支持下划线, 0: 关闭, 1: 开启 |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
geo | String | True | 要设置的区域编码, 查询 describeWebRuleRSGeoAreas 接口获取可设置的地域编码 | |
rsAddr | String[ ] | True | 对应区域的回源IP的列表 |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
ip | String | False | 回源ip | |
weight | Integer | False | 权重 | |
inJdCloud | Boolean | False | 是否为京东云内公网ip |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
http | Boolean | True | http 协议 | |
https | Boolean | True | https 协议 |
名称 | 类型 | 描述 |
---|---|---|
result | Result | 批量创建结果 |
requestId | String | |
error | Error |
名称 | 类型 | 描述 |
---|---|---|
err | Err |
名称 | 类型 | 描述 |
---|---|---|
code | Long | 同http code |
details | Object | |
message | String | |
status | String | 具体错误 |
名称 | 类型 | 描述 |
---|---|---|
webRuleIdIds | String[ ] | 创建成功的网站规则id |
failedDomains | FailedDomain[ ] | 创建失败的网站规则域名 |
名称 | 类型 | 描述 |
---|---|---|
domain | String | 子域名 |
message | String | 错误原因 |
返回码 | 描述 |
---|---|
200 | OK |
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通