Skip to content

fix(cls): [137852259] modify doc #3256

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 1 commit into from
Apr 2, 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
18 changes: 9 additions & 9 deletions tencentcloud/services/cls/resource_tc_cls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
"path": {
Type: schema.TypeString,
Optional: true,
Description: "Log collection path containing the filename.",
Description: "Log collection path containing the filename. Required for document collection.",
},
"log_type": {
Type: schema.TypeString,
Expand Down Expand Up @@ -110,7 +110,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
"un_match_log_key": {
Type: schema.TypeString,
Optional: true,
Description: "Unmatched log key.",
Description: "Unmatched log key. Required when UnMatchUpLoadSwitch is true.",
},
"backtracking": {
Type: schema.TypeInt,
Expand All @@ -120,7 +120,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
"is_gbk": {
Type: schema.TypeInt,
Optional: true,
Description: "GBK encoding. Default 0.",
Description: "GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.",
},
"json_standard": {
Type: schema.TypeInt,
Expand All @@ -130,22 +130,22 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
"protocol": {
Type: schema.TypeString,
Optional: true,
Description: "syslog protocol, tcp or udp.",
Description: "syslog protocol, tcp or udp. The value can be tcp or udp. It is effective only when LogType is service_syslog. Other types do not need to be filled in.",
},
"address": {
Type: schema.TypeString,
Optional: true,
Description: "syslog system log collection specifies the address and port that the collector listens to.",
Description: "syslog system log collection specifies the address and port that the collector listens to. This parameter is only valid when LogType is service_syslog. It does not need to be filled in for other types.",
},
"parse_protocol": {
Type: schema.TypeString,
Optional: true,
Description: "parse protocol.",
Description: "parse protocol. This parameter is only valid when LogType is service_syslog. It does not need to be filled in for other types.",
},
"metadata_type": {
Type: schema.TypeInt,
Optional: true,
Description: "metadata type.",
Description: "metadata type. 0: Do not use metadata information; 1: Use machine group metadata; 2: Use user-defined metadata; 3: Use collection configuration path. Note: COS import does not support this field.",
},
"path_regex": {
Type: schema.TypeString,
Expand All @@ -155,7 +155,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
"meta_tags": {
Type: schema.TypeList,
Optional: true,
Description: "metadata tags.",
Description: "metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"key": {
Expand Down Expand Up @@ -196,7 +196,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
"user_define_rule": {
Type: schema.TypeString,
Optional: true,
Description: "Custom collection rule, which is a serialized JSON string.",
Description: "Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.",
},
},
}
Expand Down
18 changes: 9 additions & 9 deletions website/docs/r/cls_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ The following arguments are supported:
* `exclude_paths` - (Optional, List) Collection path blocklist.
* `log_type` - (Optional, String) Type of the log to be collected. Valid values: json_log: log in JSON format; delimiter_log: log in delimited format; minimalist_log: minimalist log; multiline_log: log in multi-line format; fullregex_log: log in full regex format. Default value: minimalist_log.
* `output` - (Optional, String) Log topic ID (TopicId) of collection configuration.
* `path` - (Optional, String) Log collection path containing the filename.
* `user_define_rule` - (Optional, String) Custom collection rule, which is a serialized JSON string.
* `path` - (Optional, String) Log collection path containing the filename. Required for document collection.
* `user_define_rule` - (Optional, String) Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.

The `exclude_paths` object supports the following:

Expand All @@ -63,23 +63,23 @@ The `exclude_paths` object supports the following:

The `extract_rule` object supports the following:

* `address` - (Optional, String) syslog system log collection specifies the address and port that the collector listens to.
* `address` - (Optional, String) syslog system log collection specifies the address and port that the collector listens to. This parameter is only valid when LogType is service_syslog. It does not need to be filled in for other types.
* `backtracking` - (Optional, Int) Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
* `begin_regex` - (Optional, String) First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
* `delimiter` - (Optional, String) Delimiter for delimited log, which is valid only if log_type is delimiter_log.
* `filter_key_regex` - (Optional, List) Log keys to be filtered and the corresponding regex.
* `is_gbk` - (Optional, Int) GBK encoding. Default 0.
* `is_gbk` - (Optional, Int) GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
* `json_standard` - (Optional, Int) standard json. Default 0.
* `keys` - (Optional, Set) Key name of each extracted field. An empty key indicates to discard the field. This parameter is valid only if log_type is delimiter_log. json_log logs use the key of JSON itself.
* `log_regex` - (Optional, String) Full log matching rule, which is valid only if log_type is fullregex_log.
* `meta_tags` - (Optional, List) metadata tags.
* `metadata_type` - (Optional, Int) metadata type.
* `parse_protocol` - (Optional, String) parse protocol.
* `meta_tags` - (Optional, List) metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
* `metadata_type` - (Optional, Int) metadata type. 0: Do not use metadata information; 1: Use machine group metadata; 2: Use user-defined metadata; 3: Use collection configuration path. Note: COS import does not support this field.
* `parse_protocol` - (Optional, String) parse protocol. This parameter is only valid when LogType is service_syslog. It does not need to be filled in for other types.
* `path_regex` - (Optional, String) metadata path regex.
* `protocol` - (Optional, String) syslog protocol, tcp or udp.
* `protocol` - (Optional, String) syslog protocol, tcp or udp. The value can be tcp or udp. It is effective only when LogType is service_syslog. Other types do not need to be filled in.
* `time_format` - (Optional, String) Time field format. For more information, please see the output parameters of the time format description of the strftime function in C language.
* `time_key` - (Optional, String) Time field key name. time_key and time_format must appear in pair.
* `un_match_log_key` - (Optional, String) Unmatched log key.
* `un_match_log_key` - (Optional, String) Unmatched log key. Required when UnMatchUpLoadSwitch is true.
* `un_match_up_load_switch` - (Optional, Bool) Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.

The `filter_key_regex` object of `extract_rule` supports the following:
Expand Down
Loading