tencentcloud.ClsConfig
Explore with Pulumi AI
Provides a resource to create a cls config
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new tencentcloud.ClsConfig("config", {
excludePaths: [
{
type: "Path",
value: "/data",
},
{
type: "File",
value: "/file",
},
],
extractRule: {
backtracking: -1,
filterKeyRegexes: [
{
key: "key1",
regex: "value1",
},
{
key: "key2",
regex: "value2",
},
],
unMatchLogKey: "config",
unMatchUpLoadSwitch: true,
},
logType: "json_log",
output: "4d07fba0-b93e-4e0b-9a7f-d58542560bbb",
path: "/var/log/kubernetes",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = tencentcloud.ClsConfig("config",
exclude_paths=[
{
"type": "Path",
"value": "/data",
},
{
"type": "File",
"value": "/file",
},
],
extract_rule={
"backtracking": -1,
"filter_key_regexes": [
{
"key": "key1",
"regex": "value1",
},
{
"key": "key2",
"regex": "value2",
},
],
"un_match_log_key": "config",
"un_match_up_load_switch": True,
},
log_type="json_log",
output="4d07fba0-b93e-4e0b-9a7f-d58542560bbb",
path="/var/log/kubernetes")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewClsConfig(ctx, "config", &tencentcloud.ClsConfigArgs{
ExcludePaths: tencentcloud.ClsConfigExcludePathArray{
&tencentcloud.ClsConfigExcludePathArgs{
Type: pulumi.String("Path"),
Value: pulumi.String("/data"),
},
&tencentcloud.ClsConfigExcludePathArgs{
Type: pulumi.String("File"),
Value: pulumi.String("/file"),
},
},
ExtractRule: &tencentcloud.ClsConfigExtractRuleArgs{
Backtracking: pulumi.Float64(-1),
FilterKeyRegexes: tencentcloud.ClsConfigExtractRuleFilterKeyRegexArray{
&tencentcloud.ClsConfigExtractRuleFilterKeyRegexArgs{
Key: pulumi.String("key1"),
Regex: pulumi.String("value1"),
},
&tencentcloud.ClsConfigExtractRuleFilterKeyRegexArgs{
Key: pulumi.String("key2"),
Regex: pulumi.String("value2"),
},
},
UnMatchLogKey: pulumi.String("config"),
UnMatchUpLoadSwitch: pulumi.Bool(true),
},
LogType: pulumi.String("json_log"),
Output: pulumi.String("4d07fba0-b93e-4e0b-9a7f-d58542560bbb"),
Path: pulumi.String("/var/log/kubernetes"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Tencentcloud.ClsConfig("config", new()
{
ExcludePaths = new[]
{
new Tencentcloud.Inputs.ClsConfigExcludePathArgs
{
Type = "Path",
Value = "/data",
},
new Tencentcloud.Inputs.ClsConfigExcludePathArgs
{
Type = "File",
Value = "/file",
},
},
ExtractRule = new Tencentcloud.Inputs.ClsConfigExtractRuleArgs
{
Backtracking = -1,
FilterKeyRegexes = new[]
{
new Tencentcloud.Inputs.ClsConfigExtractRuleFilterKeyRegexArgs
{
Key = "key1",
Regex = "value1",
},
new Tencentcloud.Inputs.ClsConfigExtractRuleFilterKeyRegexArgs
{
Key = "key2",
Regex = "value2",
},
},
UnMatchLogKey = "config",
UnMatchUpLoadSwitch = true,
},
LogType = "json_log",
Output = "4d07fba0-b93e-4e0b-9a7f-d58542560bbb",
Path = "/var/log/kubernetes",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsConfig;
import com.pulumi.tencentcloud.ClsConfigArgs;
import com.pulumi.tencentcloud.inputs.ClsConfigExcludePathArgs;
import com.pulumi.tencentcloud.inputs.ClsConfigExtractRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var config = new ClsConfig("config", ClsConfigArgs.builder()
.excludePaths(
ClsConfigExcludePathArgs.builder()
.type("Path")
.value("/data")
.build(),
ClsConfigExcludePathArgs.builder()
.type("File")
.value("/file")
.build())
.extractRule(ClsConfigExtractRuleArgs.builder()
.backtracking(-1)
.filterKeyRegexes(
ClsConfigExtractRuleFilterKeyRegexArgs.builder()
.key("key1")
.regex("value1")
.build(),
ClsConfigExtractRuleFilterKeyRegexArgs.builder()
.key("key2")
.regex("value2")
.build())
.unMatchLogKey("config")
.unMatchUpLoadSwitch(true)
.build())
.logType("json_log")
.output("4d07fba0-b93e-4e0b-9a7f-d58542560bbb")
.path("/var/log/kubernetes")
.build());
}
}
resources:
config:
type: tencentcloud:ClsConfig
properties:
excludePaths:
- type: Path
value: /data
- type: File
value: /file
extractRule:
backtracking: -1
filterKeyRegexes:
- key: key1
regex: value1
- key: key2
regex: value2
unMatchLogKey: config
unMatchUpLoadSwitch: true
logType: json_log
output: 4d07fba0-b93e-4e0b-9a7f-d58542560bbb
path: /var/log/kubernetes
Create ClsConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClsConfig(name: string, args: ClsConfigArgs, opts?: CustomResourceOptions);
@overload
def ClsConfig(resource_name: str,
args: ClsConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClsConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
extract_rule: Optional[ClsConfigExtractRuleArgs] = None,
cls_config_id: Optional[str] = None,
exclude_paths: Optional[Sequence[ClsConfigExcludePathArgs]] = None,
log_type: Optional[str] = None,
name: Optional[str] = None,
output: Optional[str] = None,
path: Optional[str] = None,
user_define_rule: Optional[str] = None)
func NewClsConfig(ctx *Context, name string, args ClsConfigArgs, opts ...ResourceOption) (*ClsConfig, error)
public ClsConfig(string name, ClsConfigArgs args, CustomResourceOptions? opts = null)
public ClsConfig(String name, ClsConfigArgs args)
public ClsConfig(String name, ClsConfigArgs args, CustomResourceOptions options)
type: tencentcloud:ClsConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ClsConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ClsConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClsConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClsConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClsConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClsConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ClsConfig resource accepts the following input properties:
- Extract
Rule ClsConfig Extract Rule - Extraction rule. If ExtractRule is set, LogType must be set.
- Cls
Config stringId - ID of the resource.
- Exclude
Paths List<ClsConfig Exclude Path> - Collection path blocklist.
- Log
Type 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.
- Name string
- Collection configuration name.
- Output string
- Log topic ID (TopicId) of collection configuration.
- Path string
- Log collection path containing the filename. Required for document collection.
- User
Define stringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- Extract
Rule ClsConfig Extract Rule Args - Extraction rule. If ExtractRule is set, LogType must be set.
- Cls
Config stringId - ID of the resource.
- Exclude
Paths []ClsConfig Exclude Path Args - Collection path blocklist.
- Log
Type 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.
- Name string
- Collection configuration name.
- Output string
- Log topic ID (TopicId) of collection configuration.
- Path string
- Log collection path containing the filename. Required for document collection.
- User
Define stringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- extract
Rule ClsConfig Extract Rule - Extraction rule. If ExtractRule is set, LogType must be set.
- cls
Config StringId - ID of the resource.
- exclude
Paths List<ClsConfig Exclude Path> - Collection path blocklist.
- log
Type 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.
- name String
- Collection configuration name.
- output String
- Log topic ID (TopicId) of collection configuration.
- path String
- Log collection path containing the filename. Required for document collection.
- user
Define StringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- extract
Rule ClsConfig Extract Rule - Extraction rule. If ExtractRule is set, LogType must be set.
- cls
Config stringId - ID of the resource.
- exclude
Paths ClsConfig Exclude Path[] - Collection path blocklist.
- log
Type 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.
- name string
- Collection configuration name.
- output string
- Log topic ID (TopicId) of collection configuration.
- path string
- Log collection path containing the filename. Required for document collection.
- user
Define stringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- extract_
rule ClsConfig Extract Rule Args - Extraction rule. If ExtractRule is set, LogType must be set.
- cls_
config_ strid - ID of the resource.
- exclude_
paths Sequence[ClsConfig Exclude Path Args] - Collection path blocklist.
- log_
type str - 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.
- name str
- Collection configuration name.
- output str
- Log topic ID (TopicId) of collection configuration.
- path str
- Log collection path containing the filename. Required for document collection.
- user_
define_ strrule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- extract
Rule Property Map - Extraction rule. If ExtractRule is set, LogType must be set.
- cls
Config StringId - ID of the resource.
- exclude
Paths List<Property Map> - Collection path blocklist.
- log
Type 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.
- name String
- Collection configuration name.
- output String
- Log topic ID (TopicId) of collection configuration.
- path String
- Log collection path containing the filename. Required for document collection.
- user
Define StringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClsConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ClsConfig Resource
Get an existing ClsConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ClsConfigState, opts?: CustomResourceOptions): ClsConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cls_config_id: Optional[str] = None,
exclude_paths: Optional[Sequence[ClsConfigExcludePathArgs]] = None,
extract_rule: Optional[ClsConfigExtractRuleArgs] = None,
log_type: Optional[str] = None,
name: Optional[str] = None,
output: Optional[str] = None,
path: Optional[str] = None,
user_define_rule: Optional[str] = None) -> ClsConfig
func GetClsConfig(ctx *Context, name string, id IDInput, state *ClsConfigState, opts ...ResourceOption) (*ClsConfig, error)
public static ClsConfig Get(string name, Input<string> id, ClsConfigState? state, CustomResourceOptions? opts = null)
public static ClsConfig get(String name, Output<String> id, ClsConfigState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClsConfig get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cls
Config stringId - ID of the resource.
- Exclude
Paths List<ClsConfig Exclude Path> - Collection path blocklist.
- Extract
Rule ClsConfig Extract Rule - Extraction rule. If ExtractRule is set, LogType must be set.
- Log
Type 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.
- Name string
- Collection configuration name.
- Output string
- Log topic ID (TopicId) of collection configuration.
- Path string
- Log collection path containing the filename. Required for document collection.
- User
Define stringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- Cls
Config stringId - ID of the resource.
- Exclude
Paths []ClsConfig Exclude Path Args - Collection path blocklist.
- Extract
Rule ClsConfig Extract Rule Args - Extraction rule. If ExtractRule is set, LogType must be set.
- Log
Type 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.
- Name string
- Collection configuration name.
- Output string
- Log topic ID (TopicId) of collection configuration.
- Path string
- Log collection path containing the filename. Required for document collection.
- User
Define stringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- cls
Config StringId - ID of the resource.
- exclude
Paths List<ClsConfig Exclude Path> - Collection path blocklist.
- extract
Rule ClsConfig Extract Rule - Extraction rule. If ExtractRule is set, LogType must be set.
- log
Type 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.
- name String
- Collection configuration name.
- output String
- Log topic ID (TopicId) of collection configuration.
- path String
- Log collection path containing the filename. Required for document collection.
- user
Define StringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- cls
Config stringId - ID of the resource.
- exclude
Paths ClsConfig Exclude Path[] - Collection path blocklist.
- extract
Rule ClsConfig Extract Rule - Extraction rule. If ExtractRule is set, LogType must be set.
- log
Type 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.
- name string
- Collection configuration name.
- output string
- Log topic ID (TopicId) of collection configuration.
- path string
- Log collection path containing the filename. Required for document collection.
- user
Define stringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- cls_
config_ strid - ID of the resource.
- exclude_
paths Sequence[ClsConfig Exclude Path Args] - Collection path blocklist.
- extract_
rule ClsConfig Extract Rule Args - Extraction rule. If ExtractRule is set, LogType must be set.
- log_
type str - 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.
- name str
- Collection configuration name.
- output str
- Log topic ID (TopicId) of collection configuration.
- path str
- Log collection path containing the filename. Required for document collection.
- user_
define_ strrule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
- cls
Config StringId - ID of the resource.
- exclude
Paths List<Property Map> - Collection path blocklist.
- extract
Rule Property Map - Extraction rule. If ExtractRule is set, LogType must be set.
- log
Type 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.
- name String
- Collection configuration name.
- output String
- Log topic ID (TopicId) of collection configuration.
- path String
- Log collection path containing the filename. Required for document collection.
- user
Define StringRule - Custom collection rule, which is a serialized JSON string. Required when LogType is user_define_log.
Supporting Types
ClsConfigExcludePath, ClsConfigExcludePathArgs
ClsConfigExtractRule, ClsConfigExtractRuleArgs
- Address 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 double
- Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
- Begin
Regex string - First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
- Delimiter string
- Delimiter for delimited log, which is valid only if log_type is delimiter_log.
- Filter
Key List<ClsRegexes Config Extract Rule Filter Key Regex> - Log keys to be filtered and the corresponding regex.
- Is
Gbk double - GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
- Json
Standard double - standard json. Default 0.
- Keys List<string>
- 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 string - Full log matching rule, which is valid only if log_type is fullregex_log.
- List<Cls
Config Extract Rule Meta Tag> - metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
- Metadata
Type double - 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 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 string - metadata path regex.
- Protocol 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 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 string - Time field key name. time_key and time_format must appear in pair.
- Un
Match stringLog Key - Unmatched log key. Required when UnMatchUpLoadSwitch is true.
- Un
Match boolUp Load Switch - Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
- Address 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 float64
- Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
- Begin
Regex string - First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
- Delimiter string
- Delimiter for delimited log, which is valid only if log_type is delimiter_log.
- Filter
Key []ClsRegexes Config Extract Rule Filter Key Regex - Log keys to be filtered and the corresponding regex.
- Is
Gbk float64 - GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
- Json
Standard float64 - standard json. Default 0.
- Keys []string
- 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 string - Full log matching rule, which is valid only if log_type is fullregex_log.
- []Cls
Config Extract Rule Meta Tag - metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
- Metadata
Type float64 - 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 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 string - metadata path regex.
- Protocol 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 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 string - Time field key name. time_key and time_format must appear in pair.
- Un
Match stringLog Key - Unmatched log key. Required when UnMatchUpLoadSwitch is true.
- Un
Match boolUp Load Switch - Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
- address 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 Double
- Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
- begin
Regex String - First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
- delimiter String
- Delimiter for delimited log, which is valid only if log_type is delimiter_log.
- filter
Key List<ClsRegexes Config Extract Rule Filter Key Regex> - Log keys to be filtered and the corresponding regex.
- is
Gbk Double - GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
- json
Standard Double - standard json. Default 0.
- keys List<String>
- 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 String - Full log matching rule, which is valid only if log_type is fullregex_log.
- List<Cls
Config Extract Rule Meta Tag> - metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
- metadata
Type Double - 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 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 String - metadata path regex.
- protocol 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 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 String - Time field key name. time_key and time_format must appear in pair.
- un
Match StringLog Key - Unmatched log key. Required when UnMatchUpLoadSwitch is true.
- un
Match BooleanUp Load Switch - Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
- address 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 number
- Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
- begin
Regex string - First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
- delimiter string
- Delimiter for delimited log, which is valid only if log_type is delimiter_log.
- filter
Key ClsRegexes Config Extract Rule Filter Key Regex[] - Log keys to be filtered and the corresponding regex.
- is
Gbk number - GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
- json
Standard number - standard json. Default 0.
- keys string[]
- 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 string - Full log matching rule, which is valid only if log_type is fullregex_log.
- Cls
Config Extract Rule Meta Tag[] - metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
- metadata
Type number - 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 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 string - metadata path regex.
- protocol 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 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 string - Time field key name. time_key and time_format must appear in pair.
- un
Match stringLog Key - Unmatched log key. Required when UnMatchUpLoadSwitch is true.
- un
Match booleanUp Load Switch - Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
- address str
- 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 float
- Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
- begin_
regex str - First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
- delimiter str
- Delimiter for delimited log, which is valid only if log_type is delimiter_log.
- filter_
key_ Sequence[Clsregexes Config Extract Rule Filter Key Regex] - Log keys to be filtered and the corresponding regex.
- is_
gbk float - GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
- json_
standard float - standard json. Default 0.
- keys Sequence[str]
- 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 str - Full log matching rule, which is valid only if log_type is fullregex_log.
- Sequence[Cls
Config Extract Rule Meta Tag] - metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
- metadata_
type float - 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 str - 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 str - metadata path regex.
- protocol str
- 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 str - 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 str - Time field key name. time_key and time_format must appear in pair.
- un_
match_ strlog_ key - Unmatched log key. Required when UnMatchUpLoadSwitch is true.
- un_
match_ boolup_ load_ switch - Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
- address 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 Number
- Size of the data to be rewound in incremental collection mode. Default value: -1 (full collection).
- begin
Regex String - First-Line matching rule, which is valid only if log_type is multiline_log or fullregex_log.
- delimiter String
- Delimiter for delimited log, which is valid only if log_type is delimiter_log.
- filter
Key List<Property Map>Regexes - Log keys to be filtered and the corresponding regex.
- is
Gbk Number - GBK encoding. Default 0. Note: - Currently, when the value is 0, it means UTF-8 encoding.
- json
Standard Number - standard json. Default 0.
- keys List<String>
- 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 String - Full log matching rule, which is valid only if log_type is fullregex_log.
- List<Property Map>
- metadata tags. Note: - Required when MetadataType is 2. - COS import does not support this field.
- metadata
Type Number - 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 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 String - metadata path regex.
- protocol 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 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 String - Time field key name. time_key and time_format must appear in pair.
- un
Match StringLog Key - Unmatched log key. Required when UnMatchUpLoadSwitch is true.
- un
Match BooleanUp Load Switch - Whether to upload the logs that failed to be parsed. Valid values: true: yes; false: no.
ClsConfigExtractRuleFilterKeyRegex, ClsConfigExtractRuleFilterKeyRegexArgs
ClsConfigExtractRuleMetaTag, ClsConfigExtractRuleMetaTagArgs
Import
cls config can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clsConfig:ClsConfig config config_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.