Skip to content

fix(waf): [138921037] tencentcloud_waf_peak_points update doc #3279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3279.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
datasource/tencentcloud_waf_peak_points: update doc
```
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
38 changes: 18 additions & 20 deletions tencentcloud/services/waf/extension_waf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/waf_peak_points.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading