huawei-cloud-api-definitions-WAF 0.1.20250117

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":"/","components":null,"consumes":"","definitions":{"BlockPage":{"description":"告警页面配置参数,用于配置“自定义”或者“重定向”页面","properties":{"custom_page":{"$ref":"#/definitions/CustomPage","description":"自定义告警页面"},"redirect_url":{"description":"“重定向”页面URL","type":"string"},"template":{"description":"模板名称,默认页面请输入default,自定义告警页面时请输入custom,重定向请输入redirect","type":"string"}},"required":["template"]},"CreatePremiumHostRequestBody":{"description":"创建独享模式域名的请求体","example":{"hostname":"www.test.com","proxy":true,"server":[{"address":"x.x.x.x","back_protocol":"HTTP","front_protocol":"HTTP","port":80,"type":"ipv4","vpc_id":"34e414f6-2407-456b-b61d-93d64e9e56f0"}]},"properties":{"block_page":{"$ref":"#/definitions/BlockPage","description":"告警页面配置,该参数为非必填参数。当需要配置自定义页面时,该参数的子字段都为必填参数"},"certificateid":{"description":"证书id,通过查询证书列表接口(ListCertificates)接口获取证书id \n - 对外协议为HTTP时不需要填写 \n - 对外协议HTTPS时为必填参数","type":"string"},"certificatename":{"description":"证书名 \n - 对外协议为HTTP时不需要填写 \n - 对外协议HTTPS时为必填参数","type":"string"},"description":{"description":"防护域名备注","type":"string"},"forward_header_map":{"additionalProperties":{"type":"string"},"description":"字段转发配置,WAF会将添加的字段插到header中,转给源站;Key不能跟nginx原生字段重复。Value支持的值包括: \n - $time_local \n - $request_id \n - $connection_requests \n - $tenant_id \n - $project_id \n - $remote_addr \n - $remote_port \n - $scheme \n - $request_method \n - $http_host \n -$origin_uri \n - $request_length \n - $ssl_server_name \n - $ssl_protocol \n - $ssl_curves \n - $ssl_session_reused","type":"object"},"hostname":{"description":"防护域名或IP(可带端口)","type":"string"},"listener_id":{"description":"监听器id,可在ELB侧监听器页签下查询其id;不输入时,负载均衡器(ELB)下的所有监听器都将接入WAF防护,包括该ELB下未来新增的符合条件的监听器,添加云模式elb接入域名时,可考虑输入此项id","type":"string"},"loadbalancer_id":{"description":"负载均衡器(ELB)id,可以在ELB侧查询其id,添加云模式elb接入域名时,此为必须输入的值","type":"string"},"mode":{"description":"添加云模式elb接入域名时,请输入elb-shared,否则不输入","type":"string"},"policyid":{"description":"防护域名初始绑定的防护策略ID,可以通过策略名称调用查询防护策略列表(ListPolicy)接口查询到对应的策略id","type":"string"},"protocol_port":{"description":"业务端口,添加云模式elb接入域名时,此为必须输入的值(0 - 65535)","type":"integer"},"proxy":{"description":"防护域名是否使用代理 \n - false:不使用代理 \n - true:使用代理","type":"boolean"},"server":{"description":"防护域名的源站服务器配置信息","items":{"$ref":"#/definitions/PremiumWafServer"},"type":"array"}},"required":["hostname","server","proxy"]},"CreatePremiumWafHostResponseBody":{"description":"创建独享模式域名的响应","properties":{"access_status":{"description":"域名接入状态,0表示未接入,1表示已接入","type":"integer"},"block_page":{"$ref":"#/definitions/BlockPage","description":"告警页面配置"},"cipher":{"description":"对外协议为https时才有cipher参数,加密套件(cipher_1,cipher_2,cipher_3,cipher_4,cipher_default):\n - cipher_1: 加密算法为ECDHE-ECDSA-AES256-GCM-SHA384:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!DES:!MD5:!PSK:!RC4:!kRSA:!SRP:!3DES:!DSS:!EXP:!CAMELLIA:@STRENGTH \n - cipher_2:加密算法为EECDH+AESGCM:EDH+AESGCM \n - cipher_3:加密算法为ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH \n - cipher_4:加密算法为ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!EDH \n  cipher_5:加密算法为AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:!DHE:@STRENGTH \n  cipher_6:加密算法为ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 \n - cipher_default: 加密算法为ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM","enum":["cipher_1","cipher_2","cipher_3","cipher_4","cipher_5","cipher_6","cipher_default"],"type":"string"},"description":{"description":"域名描述","type":"string"},"domainid":{"description":"账号ID,对应华为云控制台用户名->我的凭证->账号ID","type":"string"},"enterprise_project_id":{"description":"企业项目ID,对应华为云控制台用户名->企业->项目管理->点击项目名称->ID","type":"string"},"extend":{"additionalProperties":{"type":"string"},"description":"扩展字段,用于保存防护域名的一些配置信息。","type":"object"},"flag":{"$ref":"#/definitions/Flag","description":"特殊标识,用于前端使用"},"forward_header_map":{"additionalProperties":{"type":"string"},"description":"字段转发配置,WAF会将添加的字段插到header中,转给源站;Key不能跟nginx原生字段重复。Value支持的值包括: \n - $time_local \n - $request_id \n - $connection_requests \n - $tenant_id \n - $project_id \n - $remote_addr \n - $remote_port \n - $scheme \n - $request_method \n - $http_host \n -$origin_uri \n - $request_length \n - $ssl_server_name \n - $ssl_protocol \n - $ssl_curves \n - $ssl_session_reused","type":"object"},"hostname":{"description":"防护域名","type":"string"},"id":{"description":"域名id","type":"string"},"listener_id":{"description":"云模式elb接入域名返回此字段,表示监听器id","type":"string"},"loadbalancer_id":{"description":"云模式elb接入域名返回此字段,表示负载均衡器(ELB)id","type":"string"},"locked":{"description":"域名冻结状态,0表示未冻结,1表示为冻结,冗余参数","type":"integer"},"mode":{"description":"云模式elb接入域名返回此字段:elb-shared","type":"string"},"policyid":{"description":"防护域名初始绑定的防护策略ID,可以通过策略名称调用查询防护策略列表(ListPolicy)接口查询到对应的策略id","type":"string"},"projectid":{"description":"项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID","type":"string"},"protect_status":{"description":"域名防护状态:\n - 0:暂停防护,WAF只转发该域名的请求,不做攻击检测\n - 1:开启防护,WAF根据您配置的策略进行攻击检测","type":"integer"},"protocol":{"description":"对外协议,客户端(例如浏览器)请求访问网站的协议类型","enum":["HTTPS","HTTP","HTTP&HTTPS"],"type":"string"},"protocol_port":{"description":"云模式elb接入域名返回此字段, 表示业务端口","type":"integer"},"proxy":{"description":"是否使用代理 \n - true:代表使用代理 \n - false:代表未使用代理","type":"boolean"},"server":{"description":"防护域名的源站服务器配置信息","items":{"$ref":"#/definitions/PremiumWafServer"},"type":"array"},"timestamp":{"description":"创建域名的时间,13位毫秒时间戳","format":"int64","type":"integer"},"tls":{"description":"配置的最低TLS版本(TLS v1.0/TLS v1.1/TLS v1.2),默认为TLS v1.0版本,对于低于最低TLS版本的请求,将无法正常访问网站","enum":["TLS v1.0","TLS v1.1","TLS v1.2"],"type":"string"}}},"CustomPage":{"description":"自定义告警页面","properties":{"content":{"description":"根据选择的“页面类型”配置对应的页面内容,具体示例可以参考“Web应用防火墙 WAF”用户手册","type":"string"},"content_type":{"description":"“自定义”告警页面内容类型,可选择text/html、text/xml和application/json三种类型","type":"string"},"status_code":{"description":"返回状态码","type":"string"}},"required":["status_code","content_type","content"]},"Flag":{"description":"特殊标识,用于前端使用","properties":{"cname":{"description":"old:代表域名使用的老的cname,new:代表域名使用新的cname","enum":["old","new"],"type":"string"},"ipv6":{"description":"域名是否开启ipv6 \n - true:支持 \n - false:不支持","enum":["true","false"],"type":"string"},"is_dual_az":{"description":"域名是否开启ipv6 \n - true:支持 \n - false:不支持","enum":["true","false"],"type":"string"},"pci_3ds":{"description":"是否开启pci_3ds合规认证 \n - true:开启 \n - false:不开启","enum":["true","false"],"type":"string"},"pci_dss":{"description":"是否开启pci_dss合规认证 \n - true:开启 \n - false:不开启","enum":["true","false"],"type":"string"}}},"IAM5ErrorDetails":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此信息0。","properties":{"error_code":{"description":"下游服务错误码","type":"string"},"error_msg":{"description":"下游服务报错信息","type":"string"}}},"PremiumWafServer":{"description":"防护域名的源站服务器配置信息","properties":{"address":{"description":"客户端访问的源站服务器的IP地址","type":"string"},"back_protocol":{"description":"WAF转发客户端请求到防护域名源站服务器的协议","enum":["HTTP","HTTPS"],"type":"string"},"front_protocol":{"description":"客户端请求访问防护域名源站服务器的协议","enum":["HTTP","HTTPS"],"type":"string"},"port":{"description":"WAF转发客户端请求到源站服务的业务端口","type":"integer"},"type":{"description":"源站地址为ipv4或ipv6","enum":["ipv4","ipv6"],"type":"string"},"vpc_id":{"description":"VPC id,通过以下步骤获取VPC id: \n - 1.找到独享引擎所在的虚拟私有云名称,VPC\\子网这一列就是VPC的名称:登录WAF的控制台->单击系统管理->独享引擎->VPC\\子网 \n - 2.登录虚拟私有云 VPC控制台->虚拟私有云->单击虚拟私有云的名称->基本信息的ID","type":"string"},"weight":{"description":"源站权重,负载均衡算法将按该权重将请求分配给源站,默认值是1,云模式的冗余字段","format":"int32","type":"integer"}},"required":["front_protocol","back_protocol","address","port","type","vpc_id"]},"RestErrorResponse":{"properties":{"details":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此字段。","items":{"$ref":"#/definitions/IAM5ErrorDetails"},"type":"array"},"encoded_authorization_message":{"description":"编码 (加密) 后的详细拒绝原因,用户可以自行调用 STS 服务的decode-authorization-message接口进行解码,可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。","type":"string"},"error_code":{"description":"错误码","type":"string"},"error_msg":{"description":"错误信息","type":"string"}},"title":"RestErrorResponse","type":"object"}},"description":null,"group_id":"29975c0bd7ce463ca70ad5c074e3974b","host":"waf.cn-north-4.myhuaweicloud.com","id":"c177cdf4d25749fb9755fd7c8ca62777","info_version":"v1","method":"post","name":"CreatePremiumHost","parameters":{},"paths":{"/v1/{project_id}/premium-waf/host":{"post":{"consumes":["application/json"],"description":"创建独享模式域名","operationId":"CreatePremiumHost","parameters":[{"description":"项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID","in":"path","name":"project_id","required":true,"type":"string"},{"default":"application/json;charset=utf8","description":"内容类型","in":"header","name":"Content-Type","required":true,"type":"string"},{"description":"您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id","in":"query","name":"enterprise_project_id","required":false,"type":"string"},{"description":"用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","name":"X-Auth-Token","required":true,"type":"string"},{"description":"创建独享模式域名的请求体","in":"body","name":"CreatePremiumHostRequestBody","required":false,"schema":{"$ref":"#/definitions/CreatePremiumHostRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"OK","examples":{"application/json":{"access_status":0,"description":"","domainid":"d4ecb00b031941ce9171b7bc3386883f","enterprise_project_id":"0","flag":{"pci_3ds":"false","pci_dss":"false"},"hostname":"www.demo.com","id":"51a5649e52d341a9bb802044950969dc","locked":0,"policyid":"1607df035bc847b582ce9c838c083b88","protect_status":1,"protocol":"HTTP","proxy":false,"server":[{"address":"x.x.x.x","back_protocol":"HTTP","front_protocol":"HTTP","port":80,"type":"ipv4","vpc_id":"cf6dbace-b36a-4d51-ae04-52a3319ae247","weight":1}],"timestamp":1650596007113}},"schema":{"$ref":"#/definitions/CreatePremiumWafHostResponseBody"}},"400":{"description":"非法请求","schema":{"$ref":"#/definitions/RestErrorResponse"}},"401":{"description":"Token无权限","schema":{"$ref":"#/definitions/RestErrorResponse"}},"500":{"description":"服务器内部错误","schema":{"$ref":"#/definitions/RestErrorResponse"}}},"summary":"创建独享模式域名","tags":["独享模式防护网站管理"],"x-hybridcloud":true,"x-is-registered":"Y","x-request-examples-1":{"description":"","hostname":"www.demo.com","proxy":false,"server":[{"address":"x.x.x.x","back_protocol":"HTTP","front_protocol":"HTTP","port":80,"type":"ipv4","vpc_id":"cf6dbace-b36a-4d51-ae04-52a3319ae247"}]},"x-request-examples-description-1":"在项目id为project_id的项目中创建创建独享模式域名,域名为\\\"www.demo.com\\\",防护域名的源站服务器配置中,客户端请求访问防护域名源站服务器的协议和\\t\\nWAF转发客户端请求到防护域名源站服务器的协议是HTTP协议,独享引擎所在的虚拟私有云id是\\\"cf6dbace-b36a-4d51-ae04-52a3319ae247\\\",源站地址为ipv4,源站IP地址是x.x.x.x,WAF转发客户端请求到源站服务的业务端口是80。","x-request-examples-url-1":"POST https://{Endpoint}/v1/{project_id}/premium-waf/host?enterprise_project_id=0","x-support-sdk":"Y"}}},"product_short":"WAF","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建独享模式域名","tags":"独享模式防护网站管理","uri":null,"version":"2.0"}