diff --git a/.changelog/3279.txt b/.changelog/3279.txt new file mode 100644 index 0000000000..04b0f8b771 --- /dev/null +++ b/.changelog/3279.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +datasource/tencentcloud_waf_peak_points: update doc +``` \ No newline at end of file diff --git a/tencentcloud/services/waf/data_source_tc_waf_peak_points.go b/tencentcloud/services/waf/data_source_tc_waf_peak_points.go index cb80b2a21d..b6e4f1892e 100644 --- a/tencentcloud/services/waf/data_source_tc_waf_peak_points.go +++ b/tencentcloud/services/waf/data_source_tc_waf_peak_points.go @@ -47,7 +47,7 @@ func DataSourceTencentCloudWafPeakPoints() *schema.Resource { Optional: true, Type: schema.TypeString, ValidateFunc: tccommon.ValidateAllowedStringValue(MetricNameList), - Description: "Thirteen values are available: access-Peak qps trend chart; botAccess- bot peak qps trend chart; down-Downstream peak bandwidth trend chart; up-Upstream peak bandwidth trend chart; attack-Trend chart of total number of web attacks; cc-Trend chart of total number of CC attacks; StatusServerError-Trend chart of the number of status codes returned by WAF to the server; StatusClientError-Trend chart of the number of status codes returned by WAF to the client; StatusRedirect-Trend chart of the number of status codes returned by WAF to the client; StatusOk-Trend chart of the number of status codes returned by WAF to the client; UpstreamServerError-Trend chart of the number of status codes returned to WAF by the origin site; UpstreamClientError-Trend chart of the number of status codes returned to WAF by the origin site; UpstreamRedirect-Trend chart of the number of status codes returned to WAF by the origin site.", + Description: "Twelve values are available: `access`-Peak qps trend chart; `botAccess`- bot peak qps trend chart; `down`-Downstream peak bandwidth trend chart; `up`-Upstream peak bandwidth trend chart; `attack`-Trend chart of total number of web attacks; `cc`-Trend chart of total number of CC attacks; `bw`- Black IP Attack Total Trend Chart; `tamper`- Anti Tamper Attack Total Trend Chart; `leak`- Trend chart of total number of anti leakage attacks; `acl`- Trend chart of total number of access control attacks; `http_status`- Trend chart of status code frequency; `wx_access`- WeChat Mini Program Peak QPS Trend Chart.", }, "points": { Computed: true, diff --git a/tencentcloud/services/waf/extension_waf.go b/tencentcloud/services/waf/extension_waf.go index 86bc87d4bd..c3c56efd2f 100644 --- a/tencentcloud/services/waf/extension_waf.go +++ b/tencentcloud/services/waf/extension_waf.go @@ -620,19 +620,18 @@ const ( ) const ( - METRIC_NAME_ACCESS = "access" - METRIC_NAME_BOTACCESS = "botAccess" - METRIC_NAME_DOWN = "down" - METRIC_NAME_UP = "up" - METRIC_NAME_ATTACK = "attack" - METRIC_NAME_CC = "cc" - METRIC_NAME_STATUSSERVERERROR = "StatusServerError" - METRIC_NAME_STATUSCLIENTERROR = "StatusClientError" - METRIC_NAME_STATUSREDIRECT = "StatusRedirect" - METRIC_NAME_STATUSOK = "StatusOk" - METRIC_NAME_UPSTREAMSERVERERROR = "UpstreamServerError" - METRIC_NAME_UPSTREAMCLIENTERROR = "UpstreamClientError" - METRIC_NAME_UPSTREAMREDIRECT = "UpstreamRedirect" + METRIC_NAME_ACCESS = "access" + METRIC_NAME_BOTACCESS = "botAccess" + METRIC_NAME_DOWN = "down" + METRIC_NAME_UP = "up" + METRIC_NAME_ATTACK = "attack" + METRIC_NAME_CC = "cc" + METRIC_NAME_BW = "bw" + METRIC_NAME_TAMPER = "tamper" + METRIC_NAME_LEAK = "leak" + METRIC_NAME_ACL = "acl" + METRIC_NAME_HTTP_STATUS = "http_status" + METRIC_NAME_WX_ACCESS = "wx_access" ) var MetricNameList = []string{ @@ -642,13 +641,12 @@ var MetricNameList = []string{ METRIC_NAME_UP, METRIC_NAME_ATTACK, METRIC_NAME_CC, - METRIC_NAME_STATUSSERVERERROR, - METRIC_NAME_STATUSCLIENTERROR, - METRIC_NAME_STATUSREDIRECT, - METRIC_NAME_STATUSOK, - METRIC_NAME_UPSTREAMSERVERERROR, - METRIC_NAME_UPSTREAMCLIENTERROR, - METRIC_NAME_UPSTREAMREDIRECT, + METRIC_NAME_BW, + METRIC_NAME_TAMPER, + METRIC_NAME_LEAK, + METRIC_NAME_ACL, + METRIC_NAME_HTTP_STATUS, + METRIC_NAME_WX_ACCESS, } var ( diff --git a/website/docs/d/waf_peak_points.html.markdown b/website/docs/d/waf_peak_points.html.markdown index 6a9b1f0bde..0dc2a29fff 100644 --- a/website/docs/d/waf_peak_points.html.markdown +++ b/website/docs/d/waf_peak_points.html.markdown @@ -44,7 +44,7 @@ The following arguments are supported: * `domain` - (Optional, String) The domain name to be queried. If all domain name data is queried, this parameter is not filled in. * `edition` - (Optional, String) Only support sparta-waf and clb-waf. If not passed, there will be no filtering. * `instance_id` - (Optional, String) WAF instance ID, if not passed, there will be no filtering. -* `metric_name` - (Optional, String) Thirteen values are available: access-Peak qps trend chart; botAccess- bot peak qps trend chart; down-Downstream peak bandwidth trend chart; up-Upstream peak bandwidth trend chart; attack-Trend chart of total number of web attacks; cc-Trend chart of total number of CC attacks; StatusServerError-Trend chart of the number of status codes returned by WAF to the server; StatusClientError-Trend chart of the number of status codes returned by WAF to the client; StatusRedirect-Trend chart of the number of status codes returned by WAF to the client; StatusOk-Trend chart of the number of status codes returned by WAF to the client; UpstreamServerError-Trend chart of the number of status codes returned to WAF by the origin site; UpstreamClientError-Trend chart of the number of status codes returned to WAF by the origin site; UpstreamRedirect-Trend chart of the number of status codes returned to WAF by the origin site. +* `metric_name` - (Optional, String) Twelve values are available: `access`-Peak qps trend chart; `botAccess`- bot peak qps trend chart; `down`-Downstream peak bandwidth trend chart; `up`-Upstream peak bandwidth trend chart; `attack`-Trend chart of total number of web attacks; `cc`-Trend chart of total number of CC attacks; `bw`- Black IP Attack Total Trend Chart; `tamper`- Anti Tamper Attack Total Trend Chart; `leak`- Trend chart of total number of anti leakage attacks; `acl`- Trend chart of total number of access control attacks; `http_status`- Trend chart of status code frequency; `wx_access`- WeChat Mini Program Peak QPS Trend Chart. * `result_output_file` - (Optional, String) Used to save results. ## Attributes Reference