Saas域名保存
更新时间:2026-03-11
POST
/v1/waf/domain/saas/update
Saas域名保存
请求参数
Headers 参数
除公共头域外,无其它特殊头域
Body 参数
sourceConfig
object {6}
回源能力
必选
显示子属性
隐藏子属性
connectTimeout
integer
必选
sendTimeout
integer
必选
readTimeout
integer
必选
keepAliveTimeout
integer
必选
keepAliveSize
integer
必选
retryTimes
integer
必选
healthConfig
object {10}
必选
显示子属性
隐藏子属性
hcSwitch
integer
默认 0
必选
hcType
string
默认http。可选值: http(http协议), tcp(tcp协议)
必选
hcHost
string
不必和subdomain必须一致,hcSwitch=0时可以为空,可以不为空,默认为空。 hcSwitch=1时,必须不能为空。 不为空时添加参数格式检查,和subdomain参数检查正则规则保持一致即可
必选
hcPort
integer
默认0,hcSwitch=1时允许1-65535,hcSwitch=0时默认 0-65535
必选
hcHTTPPath
string
默认 /
可选
hcHTTPStatus
array
默认2xx。可选值: 200, 300, 400, 500
必选
显示子属性
隐藏子属性
items
integer
hcTimeout
integer
默认 5
必选
hcInterval
integer
默认 10
必选
hcTCPFailures
integer
3-30,默认 3
必选
hcSuccesses
integer
3-30,默认 3
必选
advanceConfig
object {4}
高级设置
必选
显示子属性
隐藏子属性
httpsRedirect
integer
可选值: 0(关闭), 1(开启)
必选
ipv6Switch
integer
可选值: 0(关), 1(开)
必选
hostSwitch
integer
回源host开关。可选值: 0(关闭), 1(开启)
必选
hostValue
string
指定回源 host
必选
subdomain
string
必选
instanceID
string
格式必需是waf-开头,后面8位字母数字
必选
forwardConfig
object {5}
必选
显示子属性
隐藏子属性
configs
array
转发配置
必选
显示子属性
隐藏子属性
items
object {7}
显示子属性
隐藏子属性
forwardProtocol
string
转发协议。可选值: http(http), https(https)
必选
forwardPort
string
转发端口
必选
sourceProtocol
string
回源协议。可选值: http(http), https(https)
必选
sourcePort
string
回源端口
必选
sourceAddrType
string
源站类型【ip=>ip、domain=>域名】
必选
sourceAddr
array
回源地址
必选
显示子属性
隐藏子属性
items
string
sourceType
string
回源算法【simple_rr=>轮询、hash=>哈希】
必选
l7ProxySwitch
integer
是否有7层代理。可选值: 0(否), 1(是)
必选
clientIPFrom
string
获取ip字段
必选
certID
string
证书唯一标识
必选
tls
string
tls版本。可选值: 1.0(1.0), 1.1(1.1), 1.2(1.2)
必选
uuid
string
可选
请求结构
{
"instanceID": "waf-xxxxxxxx",
"subdomain": "example.com",
"uuid": "site-uuid",
"forwardConfig": {
"configs": [
{
"forwardProtocol": "https",
"forwardPort": "443",
"sourceProtocol": "http",
"sourcePort": "80",
"sourceAddrType": "ip",
"sourceAddr": ["1.1.1.1"],
"sourceType": "simple_rr"
}
],
"l7ProxySwitch": 1,
"clientIPFrom": "X-Forwarded-For",
"certID": "cert-123",
"tls": "1.2"
},
"sourceConfig": {
"connectTimeout": 10,
"sendTimeout": 60,
"readTimeout": 60,
"keepAliveTimeout": 60,
"keepAliveSize": 100,
"retryTimes": 3
},
"healthConfig": {
"hcSwitch": 1,
"hcType": "http",
"hcHost": "example.com",
"hcPort": 80,
"hcHTTPPath": "/health",
"hcHTTPStatus": [200],
"hcTimeout": 5,
"hcInterval": 10,
"hcTCPFailures": 3,
"hcSuccesses": 3
},
"advanceConfig": {
"httpsRedirect": 1,
"ipv6Switch": 1,
"hostSwitch": 1,
"hostValue": "origin.example.com"
}
}
示例代码
Saas域名保存
curl -X POST "/v1/waf/domain/saas/update" \
-H "Content-Type: application/json" \
-d '{
"instanceID": "waf-xxxxxxxx",
"subdomain": "example.com",
"forwardConfig": {
"configs": [
{
"forwardProtocol": "https",
"forwardPort": "443",
"sourceProtocol": "http",
"sourcePort": "80",
"sourceAddrType": "ip",
"sourceAddr": ["1.1.1.1"],
"sourceType": "simple_rr"
}
],
"l7ProxySwitch": 1,
"clientIPFrom": "X-Forwarded-For",
"certID": "cert-123",
"tls": "1.2"
},
"sourceConfig": {
"connectTimeout": 10,
"sendTimeout": 60,
"readTimeout": 60,
"keepAliveTimeout": 60,
"keepAliveSize": 100,
"retryTimes": 3
},
"healthConfig": {
"hcSwitch": 1,
"hcType": "http",
"hcHost": "example.com",
"hcPort": 80,
"hcHTTPPath": "/health",
"hcHTTPStatus": [200],
"hcTimeout": 5,
"hcInterval": 10,
"hcTCPFailures": 3,
"hcSuccesses": 3
},
"advanceConfig": {
"httpsRedirect": 1,
"ipv6Switch": 1,
"hostSwitch": 1,
"hostValue": "origin.example.com"
}
}'
返回响应
Headers 参数
除公共头域外,无其它特殊头域
返回参数
success
boolean
必选
result
object {0}
必选
显示子属性
隐藏子属性
暂无参数
成功响应
{
"success": true,
"result": {}
}
评价此篇文章
