Skip to content

Commit 6bff107

Browse files
committed
fix: modify doc
1 parent 4b6f714 commit 6bff107

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

tencentcloud/services/cls/resource_tc_cls_config.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
3737
"path": {
3838
Type: schema.TypeString,
3939
Optional: true,
40-
Description: "Log collection path containing the filename.",
40+
Description: "Log collection path containing the filename. Required for document collection.",
4141
},
4242
"log_type": {
4343
Type: schema.TypeString,
@@ -110,7 +110,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
110110
"un_match_log_key": {
111111
Type: schema.TypeString,
112112
Optional: true,
113-
Description: "Unmatched log key.",
113+
Description: "Unmatched log key. Required when UnMatchUpLoadSwitch is true.",
114114
},
115115
"backtracking": {
116116
Type: schema.TypeInt,
@@ -120,7 +120,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
120120
"is_gbk": {
121121
Type: schema.TypeInt,
122122
Optional: true,
123-
Description: "GBK encoding. Default 0.",
123+
Description: "GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.",
124124
},
125125
"json_standard": {
126126
Type: schema.TypeInt,
@@ -130,22 +130,22 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
130130
"protocol": {
131131
Type: schema.TypeString,
132132
Optional: true,
133-
Description: "syslog protocol, tcp or udp.",
133+
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.",
134134
},
135135
"address": {
136136
Type: schema.TypeString,
137137
Optional: true,
138-
Description: "syslog system log collection specifies the address and port that the collector listens to.",
138+
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.",
139139
},
140140
"parse_protocol": {
141141
Type: schema.TypeString,
142142
Optional: true,
143-
Description: "parse protocol.",
143+
Description: "parse protocol. This parameter is only valid when LogType is service_syslog. It does not need to be filled in for other types.",
144144
},
145145
"metadata_type": {
146146
Type: schema.TypeInt,
147147
Optional: true,
148-
Description: "metadata type.",
148+
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.",
149149
},
150150
"path_regex": {
151151
Type: schema.TypeString,
@@ -155,7 +155,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
155155
"meta_tags": {
156156
Type: schema.TypeList,
157157
Optional: true,
158-
Description: "metadata tags.",
158+
Description: "metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.",
159159
Elem: &schema.Resource{
160160
Schema: map[string]*schema.Schema{
161161
"key": {
@@ -196,7 +196,7 @@ func ResourceTencentCloudClsConfig() *schema.Resource {
196196
"user_define_rule": {
197197
Type: schema.TypeString,
198198
Optional: true,
199-
Description: "Custom collection rule, which is a serialized JSON string.",
199+
Description: "Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.",
200200
},
201201
},
202202
}

website/docs/r/cls_config.html.markdown

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ The following arguments are supported:
5353
* `exclude_paths` - (Optional, List) Collection path blocklist.
5454
* `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.
5555
* `output` - (Optional, String) Log topic ID (TopicId) of collection configuration.
56-
* `path` - (Optional, String) Log collection path containing the filename.
57-
* `user_define_rule` - (Optional, String) Custom collection rule, which is a serialized JSON string.
56+
* `path` - (Optional, String) Log collection path containing the filename. Required for document collection.
57+
* `user_define_rule` - (Optional, String) Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
5858

5959
The `exclude_paths` object supports the following:
6060

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

6464
The `extract_rule` object supports the following:
6565

66-
* `address` - (Optional, String) syslog system log collection specifies the address and port that the collector listens to.
66+
* `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.
6767
* `backtracking` - (Optional, Int) Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
6868
* `begin_regex` - (Optional, String) First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
6969
* `delimiter` - (Optional, String) Delimiter for delimited log, which is valid only if log_type is delimiter_log.
7070
* `filter_key_regex` - (Optional, List) Log keys to be filtered and the corresponding regex.
71-
* `is_gbk` - (Optional, Int) GBK encoding. Default 0.
71+
* `is_gbk` - (Optional, Int) GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
7272
* `json_standard` - (Optional, Int) standard json. Default 0.
7373
* `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.
7474
* `log_regex` - (Optional, String) Full log matching rule, which is valid only if log_type is fullregex_log.
75-
* `meta_tags` - (Optional, List) metadata tags.
76-
* `metadata_type` - (Optional, Int) metadata type.
77-
* `parse_protocol` - (Optional, String) parse protocol.
75+
* `meta_tags` - (Optional, List) metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
76+
* `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.
77+
* `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.
7878
* `path_regex` - (Optional, String) metadata path regex.
79-
* `protocol` - (Optional, String) syslog protocol, tcp or udp.
79+
* `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.
8080
* `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.
8181
* `time_key` - (Optional, String) Time field key name. time_key and time_format must appear in pair.
82-
* `un_match_log_key` - (Optional, String) Unmatched log key.
82+
* `un_match_log_key` - (Optional, String) Unmatched log key. Required when UnMatchUpLoadSwitch is true.
8383
* `un_match_up_load_switch` - (Optional, Bool) Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
8484

8585
The `filter_key_regex` object of `extract_rule` supports the following:

0 commit comments

Comments
 (0)