修改独享模式域名配置
功能介绍
修改独享模式域名配置
URI
PUT /v1/{project_id}/premium-waf/host/{host_id}
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 用户操作的项目id |
| host_id | 是 | String | 独享模式域名id |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| enterprise_project_id | 否 | String | 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| Content-Type | 是 | String | 内容类型 缺省值:application/json;charset=utf8 |
| X-Auth-Token | 是 | String | 用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| proxy | 否 | Boolean | 是否开启了代理。
|
| certificateid | 否 | String | https证书id,通过查询证书列表接口(ListCertificates)接口获取证书id |
| certificatename | 否 | String | https证书名称,通过查询证书列表接口(ListCertificates)接口获取证书id |
| locked | 否 | Integer | 是否锁定 |
| protect_status | 否 | Integer | 域名防护状态:
|
| access_status | 否 | Integer | 接入状态。
|
| timestamp | 否 | Integer | 时间戳 |
| block_page | 否 | BlockPage object | 告警页面 |
| traffic_mark | 否 | TrafficMark object | 流量标识 |
| flag | 否 | Map<String,String> | 特殊标识,用于前端使用 |
| extend | 否 | Map<String,String> | 可扩展字段 |
| circuit_breaker | 否 | CircuitBreaker object | 熔断配置 |
| timeout_config | 否 | TimeoutConfig object | 超时配置 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| template | 是 | String | 模板名称 |
| custom_page | 否 | CustomPage object | 自定义告警页面 |
| redirect_url | 否 | String | 重定向URL |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| status_code | 是 | String | 返回状态码 |
| content_type | 是 | String | 页面内容类型 |
| content | 是 | String | 页面内容 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| sip | 否 | Array of strings | 惩罚ip |
| cookie | 否 | String | cookie |
| params | 否 | String | 参数 |
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | 域名id |
| policyid | String | 防护域名初始绑定的策略ID,可以通过策略名称调用查询防护策略列表(ListPolicy)接口查询到对应的策略id |
| hostname | String | 创建的独享模式防护域名 |
| domainid | String | 用户Domain ID |
| project_id | String | 用户的project_id |
| access_code | String | cname前缀 |
| protocol | String | http协议类型 |
| server | Array of PremiumWafServer objects | 源站信息 |
| certificateid | String | 证书id,通过查询证书列表接口(ListCertificates)接口获取证书id
|
| certificatename | String | 证书名
|
| proxy | Boolean | 是否开启了代理。
|
| locked | Integer | 锁定状态 缺省值:0 |
| protect_status | Integer | 域名防护状态:
|
| access_status | Integer | 接入状态。
|
| web_tag | String | 网站名称 |
| timestamp | Long | 创建防护域名的时间 |
| flag | Flag object | 特殊标识,用于前端使用 |
| block_page | BlockPage object | 告警页面 |
| extend | Map<String,String> | 可扩展属性 |
| traffic_mark | TrafficMark object | 流量标识 |
| timeout_config | TimeoutConfig object | 超时配置 |
| access_progress | Array of Access_progress objects | 冗余参数,仅用于前端使用 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| front_protocol | String | 客户端请求访问源站服务器的协议 枚举值:
|
| back_protocol | String | WAF转发客户端请求到源站服务器的协议 枚举值:
|
| address | String | 客户端访问的源站服务器的公网IP地址或者域名 |
| port | Integer | 客户端访问的网站服务器的端口号,取值为(0, 65535),例如:8080 |
| type | String | 源站地址为ipv4或ipv6 枚举值:
|
| vpc_id | String | 虚拟私有云id,通过以下步骤获取VPC id:
|
| 参数 | 参数类型 | 描述 |
|---|---|---|
| pci_3ds | String | 是否通过pci_3ds标准认证。
枚举值:
|
| pci_dss | String | 是否通过pci_dss标准认证。
枚举值:
|
| cname | String | 域名使用老的cname还是新的cname
枚举值:
|
| is_dual_az | String | WAF是否支持多可用区容灾
枚举值:
|
| 参数 | 参数类型 | 描述 |
|---|---|---|
| template | String | 模板名称 |
| custom_page | CustomPage object | 自定义告警页面 |
| redirect_url | String | 重定向URL |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| connect_timeout | Integer | WAF连接源站超时配置 |
| send_timeout | Integer | WAF发送请求到源站超时配置 |
| read_timeout | Integer | WAF接收源站响应超时配置 |
状态码: 400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误信息 |
状态码: 401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误信息 |
状态码: 500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误信息 |
请求示例
PUT https://{Endpoint}/v1/{project_id}/premium-waf/host/{host_id}?enterprise_project_id=0
{
"proxy" : false
} 响应示例
状态码: 200
ok
{
"id" : "27995fb98a2d4928a1e453e65ee8117a",
"hostname" : "www.demo.com",
"protocol" : "HTTP",
"server" : [ {
"address" : "192.168.0.209",
"port" : 80,
"type" : "ipv4",
"weight" : 1,
"front_protocol" : "HTTP",
"back_protocol" : "HTTP",
"vpc_id" : "cf6dbace-b36a-4d51-ae04-52a8459ae247"
} ],
"proxy" : false,
"locked" : 0,
"timestamp" : 1650590814885,
"flag" : {
"pci_3ds" : "false",
"pci_dss" : "false"
},
"description" : "",
"policyid" : "9555cda636ef4ca294dfe4b14bc94c47",
"domainid" : "d4ecb00b031941ce9171b7bc3386883f",
"projectid" : "05e33ecd328025dd2f7fc00696201fb4",
"enterprise_project_id" : "0",
"protect_status" : 1,
"access_status" : 0,
"web_tag" : ""
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | ok |
| 400 | 非法请求 |
| 401 | Token无权限 |
| 500 | 服务器内部错误 |
错误码
请参见错误码。