1. Packages
  2. Volcengine
  3. API Docs
  4. tls
  5. Rule
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.tls.Rule

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Provides a resource to manage tls rule

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Tls.Rule("foo", new()
        {
            TopicId = "7bfa2cdc-4f8b-4cf9-b4c9-0ed05c33349f",
            RuleName = "test",
            LogType = "minimalist_log",
            LogSample = "2018-05-22 15:35:53.850 INFO XXXX",
            InputType = 1,
            UserDefineRule = new Volcengine.Tls.Inputs.RuleUserDefineRuleArgs
            {
                EnableRawLog = false,
                TailFiles = true,
                ShardHashKey = new Volcengine.Tls.Inputs.RuleUserDefineRuleShardHashKeyArgs
                {
                    HashKey = "3C",
                },
                Plugin = new Volcengine.Tls.Inputs.RuleUserDefineRulePluginArgs
                {
                    Processors = new[]
                    {
                        JsonSerializer.Serialize(new Dictionary<string, object?>
                        {
                            ["json"] = new Dictionary<string, object?>
                            {
                                ["field"] = "__content__",
                                ["trim_keys"] = new Dictionary<string, object?>
                                {
                                    ["mode"] = "all",
                                    ["chars"] = "#",
                                },
                                ["trim_values"] = new Dictionary<string, object?>
                                {
                                    ["mode"] = "all",
                                    ["chars"] = "#t",
                                },
                                ["allow_overwrite_keys"] = true,
                                ["allow_empty_values"] = true,
                            },
                        }),
                        JsonSerializer.Serialize(new Dictionary<string, object?>
                        {
                            ["json"] = new Dictionary<string, object?>
                            {
                                ["field"] = "__content__",
                                ["trim_keys"] = new Dictionary<string, object?>
                                {
                                    ["mode"] = "all",
                                    ["chars"] = "#xx",
                                },
                                ["trim_values"] = new Dictionary<string, object?>
                                {
                                    ["mode"] = "all",
                                    ["chars"] = "#txxxt",
                                },
                                ["allow_overwrite_keys"] = true,
                                ["allow_empty_values"] = true,
                            },
                        }),
                    },
                },
                Advanced = new Volcengine.Tls.Inputs.RuleUserDefineRuleAdvancedArgs
                {
                    CloseInactive = 10,
                    CloseRemoved = false,
                    CloseRenamed = false,
                    CloseEof = false,
                    CloseTimeout = 1,
                },
            },
            ContainerRule = new Volcengine.Tls.Inputs.RuleContainerRuleArgs
            {
                Stream = "all",
                ContainerNameRegex = ".*test.*",
                IncludeContainerLabelRegex = 
                {
                    { "Key1", "Value12" },
                    { "Key2", "Value23" },
                },
                ExcludeContainerLabelRegex = 
                {
                    { "Key1", "Value12" },
                    { "Key2", "Value22" },
                },
                IncludeContainerEnvRegex = 
                {
                    { "Key1", "Value1" },
                    { "Key2", "Value2" },
                },
                ExcludeContainerEnvRegex = 
                {
                    { "Key1", "Value1" },
                    { "Key2", "Value2" },
                },
                EnvTag = 
                {
                    { "Key1", "Value1" },
                    { "Key2", "Value2" },
                },
                KubernetesRule = new Volcengine.Tls.Inputs.RuleContainerRuleKubernetesRuleArgs
                {
                    NamespaceNameRegex = ".*test.*",
                    WorkloadType = "Deployment",
                    WorkloadNameRegex = ".*test.*",
                    IncludePodLabelRegex = 
                    {
                        { "Key1", "Value1" },
                        { "Key2", "Value2" },
                    },
                    ExcludePodLabelRegex = 
                    {
                        { "Key1", "Value1" },
                        { "Key2", "Value2" },
                    },
                    PodNameRegex = ".*test.*",
                    LabelTag = 
                    {
                        { "Key1", "Value1" },
                        { "Key2", "Value2" },
                    },
                    AnnotationTag = 
                    {
                        { "Key1", "Value1" },
                        { "Key2", "Value2" },
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tls"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"json": map[string]interface{}{
    				"field": "__content__",
    				"trim_keys": map[string]interface{}{
    					"mode":  "all",
    					"chars": "#",
    				},
    				"trim_values": map[string]interface{}{
    					"mode":  "all",
    					"chars": "#t",
    				},
    				"allow_overwrite_keys": true,
    				"allow_empty_values":   true,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		tmpJSON1, err := json.Marshal(map[string]interface{}{
    			"json": map[string]interface{}{
    				"field": "__content__",
    				"trim_keys": map[string]interface{}{
    					"mode":  "all",
    					"chars": "#xx",
    				},
    				"trim_values": map[string]interface{}{
    					"mode":  "all",
    					"chars": "#txxxt",
    				},
    				"allow_overwrite_keys": true,
    				"allow_empty_values":   true,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		_, err = tls.NewRule(ctx, "foo", &tls.RuleArgs{
    			TopicId:   pulumi.String("7bfa2cdc-4f8b-4cf9-b4c9-0ed05c33349f"),
    			RuleName:  pulumi.String("test"),
    			LogType:   pulumi.String("minimalist_log"),
    			LogSample: pulumi.String("2018-05-22 15:35:53.850 INFO XXXX"),
    			InputType: pulumi.Int(1),
    			UserDefineRule: &tls.RuleUserDefineRuleArgs{
    				EnableRawLog: pulumi.Bool(false),
    				TailFiles:    pulumi.Bool(true),
    				ShardHashKey: &tls.RuleUserDefineRuleShardHashKeyArgs{
    					HashKey: pulumi.String("3C"),
    				},
    				Plugin: &tls.RuleUserDefineRulePluginArgs{
    					Processors: pulumi.StringArray{
    						pulumi.String(json0),
    						pulumi.String(json1),
    					},
    				},
    				Advanced: &tls.RuleUserDefineRuleAdvancedArgs{
    					CloseInactive: pulumi.Int(10),
    					CloseRemoved:  pulumi.Bool(false),
    					CloseRenamed:  pulumi.Bool(false),
    					CloseEof:      pulumi.Bool(false),
    					CloseTimeout:  pulumi.Int(1),
    				},
    			},
    			ContainerRule: &tls.RuleContainerRuleArgs{
    				Stream:             pulumi.String("all"),
    				ContainerNameRegex: pulumi.String(".*test.*"),
    				IncludeContainerLabelRegex: pulumi.StringMap{
    					"Key1": pulumi.String("Value12"),
    					"Key2": pulumi.String("Value23"),
    				},
    				ExcludeContainerLabelRegex: pulumi.StringMap{
    					"Key1": pulumi.String("Value12"),
    					"Key2": pulumi.String("Value22"),
    				},
    				IncludeContainerEnvRegex: pulumi.StringMap{
    					"Key1": pulumi.String("Value1"),
    					"Key2": pulumi.String("Value2"),
    				},
    				ExcludeContainerEnvRegex: pulumi.StringMap{
    					"Key1": pulumi.String("Value1"),
    					"Key2": pulumi.String("Value2"),
    				},
    				EnvTag: pulumi.StringMap{
    					"Key1": pulumi.String("Value1"),
    					"Key2": pulumi.String("Value2"),
    				},
    				KubernetesRule: &tls.RuleContainerRuleKubernetesRuleArgs{
    					NamespaceNameRegex: pulumi.String(".*test.*"),
    					WorkloadType:       pulumi.String("Deployment"),
    					WorkloadNameRegex:  pulumi.String(".*test.*"),
    					IncludePodLabelRegex: pulumi.StringMap{
    						"Key1": pulumi.String("Value1"),
    						"Key2": pulumi.String("Value2"),
    					},
    					ExcludePodLabelRegex: pulumi.StringMap{
    						"Key1": pulumi.String("Value1"),
    						"Key2": pulumi.String("Value2"),
    					},
    					PodNameRegex: pulumi.String(".*test.*"),
    					LabelTag: pulumi.StringMap{
    						"Key1": pulumi.String("Value1"),
    						"Key2": pulumi.String("Value2"),
    					},
    					AnnotationTag: pulumi.StringMap{
    						"Key1": pulumi.String("Value1"),
    						"Key2": pulumi.String("Value2"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.tls.Rule;
    import com.pulumi.volcengine.tls.RuleArgs;
    import com.pulumi.volcengine.tls.inputs.RuleUserDefineRuleArgs;
    import com.pulumi.volcengine.tls.inputs.RuleUserDefineRuleShardHashKeyArgs;
    import com.pulumi.volcengine.tls.inputs.RuleUserDefineRulePluginArgs;
    import com.pulumi.volcengine.tls.inputs.RuleUserDefineRuleAdvancedArgs;
    import com.pulumi.volcengine.tls.inputs.RuleContainerRuleArgs;
    import com.pulumi.volcengine.tls.inputs.RuleContainerRuleKubernetesRuleArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 foo = new Rule("foo", RuleArgs.builder()        
                .topicId("7bfa2cdc-4f8b-4cf9-b4c9-0ed05c33349f")
                .ruleName("test")
                .logType("minimalist_log")
                .logSample("2018-05-22 15:35:53.850 INFO XXXX")
                .inputType(1)
                .userDefineRule(RuleUserDefineRuleArgs.builder()
                    .enableRawLog(false)
                    .tailFiles(true)
                    .shardHashKey(RuleUserDefineRuleShardHashKeyArgs.builder()
                        .hashKey("3C")
                        .build())
                    .plugin(RuleUserDefineRulePluginArgs.builder()
                        .processors(                    
                            serializeJson(
                                jsonObject(
                                    jsonProperty("json", jsonObject(
                                        jsonProperty("field", "__content__"),
                                        jsonProperty("trim_keys", jsonObject(
                                            jsonProperty("mode", "all"),
                                            jsonProperty("chars", "#")
                                        )),
                                        jsonProperty("trim_values", jsonObject(
                                            jsonProperty("mode", "all"),
                                            jsonProperty("chars", "#t")
                                        )),
                                        jsonProperty("allow_overwrite_keys", true),
                                        jsonProperty("allow_empty_values", true)
                                    ))
                                )),
                            serializeJson(
                                jsonObject(
                                    jsonProperty("json", jsonObject(
                                        jsonProperty("field", "__content__"),
                                        jsonProperty("trim_keys", jsonObject(
                                            jsonProperty("mode", "all"),
                                            jsonProperty("chars", "#xx")
                                        )),
                                        jsonProperty("trim_values", jsonObject(
                                            jsonProperty("mode", "all"),
                                            jsonProperty("chars", "#txxxt")
                                        )),
                                        jsonProperty("allow_overwrite_keys", true),
                                        jsonProperty("allow_empty_values", true)
                                    ))
                                )))
                        .build())
                    .advanced(RuleUserDefineRuleAdvancedArgs.builder()
                        .closeInactive(10)
                        .closeRemoved(false)
                        .closeRenamed(false)
                        .closeEof(false)
                        .closeTimeout(1)
                        .build())
                    .build())
                .containerRule(RuleContainerRuleArgs.builder()
                    .stream("all")
                    .containerNameRegex(".*test.*")
                    .includeContainerLabelRegex(Map.ofEntries(
                        Map.entry("Key1", "Value12"),
                        Map.entry("Key2", "Value23")
                    ))
                    .excludeContainerLabelRegex(Map.ofEntries(
                        Map.entry("Key1", "Value12"),
                        Map.entry("Key2", "Value22")
                    ))
                    .includeContainerEnvRegex(Map.ofEntries(
                        Map.entry("Key1", "Value1"),
                        Map.entry("Key2", "Value2")
                    ))
                    .excludeContainerEnvRegex(Map.ofEntries(
                        Map.entry("Key1", "Value1"),
                        Map.entry("Key2", "Value2")
                    ))
                    .envTag(Map.ofEntries(
                        Map.entry("Key1", "Value1"),
                        Map.entry("Key2", "Value2")
                    ))
                    .kubernetesRule(RuleContainerRuleKubernetesRuleArgs.builder()
                        .namespaceNameRegex(".*test.*")
                        .workloadType("Deployment")
                        .workloadNameRegex(".*test.*")
                        .includePodLabelRegex(Map.ofEntries(
                            Map.entry("Key1", "Value1"),
                            Map.entry("Key2", "Value2")
                        ))
                        .excludePodLabelRegex(Map.ofEntries(
                            Map.entry("Key1", "Value1"),
                            Map.entry("Key2", "Value2")
                        ))
                        .podNameRegex(".*test.*")
                        .labelTag(Map.ofEntries(
                            Map.entry("Key1", "Value1"),
                            Map.entry("Key2", "Value2")
                        ))
                        .annotationTag(Map.ofEntries(
                            Map.entry("Key1", "Value1"),
                            Map.entry("Key2", "Value2")
                        ))
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import json
    import pulumi_volcengine as volcengine
    
    foo = volcengine.tls.Rule("foo",
        topic_id="7bfa2cdc-4f8b-4cf9-b4c9-0ed05c33349f",
        rule_name="test",
        log_type="minimalist_log",
        log_sample="2018-05-22 15:35:53.850 INFO XXXX",
        input_type=1,
        user_define_rule=volcengine.tls.RuleUserDefineRuleArgs(
            enable_raw_log=False,
            tail_files=True,
            shard_hash_key=volcengine.tls.RuleUserDefineRuleShardHashKeyArgs(
                hash_key="3C",
            ),
            plugin=volcengine.tls.RuleUserDefineRulePluginArgs(
                processors=[
                    json.dumps({
                        "json": {
                            "field": "__content__",
                            "trim_keys": {
                                "mode": "all",
                                "chars": "#",
                            },
                            "trim_values": {
                                "mode": "all",
                                "chars": "#t",
                            },
                            "allow_overwrite_keys": True,
                            "allow_empty_values": True,
                        },
                    }),
                    json.dumps({
                        "json": {
                            "field": "__content__",
                            "trim_keys": {
                                "mode": "all",
                                "chars": "#xx",
                            },
                            "trim_values": {
                                "mode": "all",
                                "chars": "#txxxt",
                            },
                            "allow_overwrite_keys": True,
                            "allow_empty_values": True,
                        },
                    }),
                ],
            ),
            advanced=volcengine.tls.RuleUserDefineRuleAdvancedArgs(
                close_inactive=10,
                close_removed=False,
                close_renamed=False,
                close_eof=False,
                close_timeout=1,
            ),
        ),
        container_rule=volcengine.tls.RuleContainerRuleArgs(
            stream="all",
            container_name_regex=".*test.*",
            include_container_label_regex={
                "Key1": "Value12",
                "Key2": "Value23",
            },
            exclude_container_label_regex={
                "Key1": "Value12",
                "Key2": "Value22",
            },
            include_container_env_regex={
                "Key1": "Value1",
                "Key2": "Value2",
            },
            exclude_container_env_regex={
                "Key1": "Value1",
                "Key2": "Value2",
            },
            env_tag={
                "Key1": "Value1",
                "Key2": "Value2",
            },
            kubernetes_rule=volcengine.tls.RuleContainerRuleKubernetesRuleArgs(
                namespace_name_regex=".*test.*",
                workload_type="Deployment",
                workload_name_regex=".*test.*",
                include_pod_label_regex={
                    "Key1": "Value1",
                    "Key2": "Value2",
                },
                exclude_pod_label_regex={
                    "Key1": "Value1",
                    "Key2": "Value2",
                },
                pod_name_regex=".*test.*",
                label_tag={
                    "Key1": "Value1",
                    "Key2": "Value2",
                },
                annotation_tag={
                    "Key1": "Value1",
                    "Key2": "Value2",
                },
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.tls.Rule("foo", {
        topicId: "7bfa2cdc-4f8b-4cf9-b4c9-0ed05c33349f",
        ruleName: "test",
        logType: "minimalist_log",
        logSample: "2018-05-22 15:35:53.850 INFO XXXX",
        inputType: 1,
        userDefineRule: {
            enableRawLog: false,
            tailFiles: true,
            shardHashKey: {
                hashKey: "3C",
            },
            plugin: {
                processors: [
                    JSON.stringify({
                        json: {
                            field: "__content__",
                            trim_keys: {
                                mode: "all",
                                chars: "#",
                            },
                            trim_values: {
                                mode: "all",
                                chars: "#t",
                            },
                            allow_overwrite_keys: true,
                            allow_empty_values: true,
                        },
                    }),
                    JSON.stringify({
                        json: {
                            field: "__content__",
                            trim_keys: {
                                mode: "all",
                                chars: "#xx",
                            },
                            trim_values: {
                                mode: "all",
                                chars: "#txxxt",
                            },
                            allow_overwrite_keys: true,
                            allow_empty_values: true,
                        },
                    }),
                ],
            },
            advanced: {
                closeInactive: 10,
                closeRemoved: false,
                closeRenamed: false,
                closeEof: false,
                closeTimeout: 1,
            },
        },
        containerRule: {
            stream: "all",
            containerNameRegex: ".*test.*",
            includeContainerLabelRegex: {
                Key1: "Value12",
                Key2: "Value23",
            },
            excludeContainerLabelRegex: {
                Key1: "Value12",
                Key2: "Value22",
            },
            includeContainerEnvRegex: {
                Key1: "Value1",
                Key2: "Value2",
            },
            excludeContainerEnvRegex: {
                Key1: "Value1",
                Key2: "Value2",
            },
            envTag: {
                Key1: "Value1",
                Key2: "Value2",
            },
            kubernetesRule: {
                namespaceNameRegex: ".*test.*",
                workloadType: "Deployment",
                workloadNameRegex: ".*test.*",
                includePodLabelRegex: {
                    Key1: "Value1",
                    Key2: "Value2",
                },
                excludePodLabelRegex: {
                    Key1: "Value1",
                    Key2: "Value2",
                },
                podNameRegex: ".*test.*",
                labelTag: {
                    Key1: "Value1",
                    Key2: "Value2",
                },
                annotationTag: {
                    Key1: "Value1",
                    Key2: "Value2",
                },
            },
        },
    });
    
    resources:
      foo:
        type: volcengine:tls:Rule
        properties:
          topicId: 7bfa2cdc-4f8b-4cf9-b4c9-0ed05c33349f
          ruleName: test
          # paths = ["/data/nginx/log/xx.log"]
          logType: minimalist_log
          logSample: 2018-05-22 15:35:53.850 INFO XXXX
          inputType: 1
          userDefineRule:
            enableRawLog: false
            tailFiles: true
            shardHashKey:
              hashKey: 3C
            plugin:
              processors:
                - fn::toJSON:
                    json:
                      field: __content__
                      trim_keys:
                        mode: all
                        chars: '#'
                      trim_values:
                        mode: all
                        chars: '#t'
                      allow_overwrite_keys: true
                      allow_empty_values: true
                - fn::toJSON:
                    json:
                      field: __content__
                      trim_keys:
                        mode: all
                        chars: '#xx'
                      trim_values:
                        mode: all
                        chars: '#txxxt'
                      allow_overwrite_keys: true
                      allow_empty_values: true
            advanced:
              closeInactive: 10
              closeRemoved: false
              closeRenamed: false
              closeEof: false
              closeTimeout: 1
          containerRule:
            stream: all
            containerNameRegex: .*test.*
            includeContainerLabelRegex:
              Key1: Value12
              Key2: Value23
            excludeContainerLabelRegex:
              Key1: Value12
              Key2: Value22
            includeContainerEnvRegex:
              Key1: Value1
              Key2: Value2
            excludeContainerEnvRegex:
              Key1: Value1
              Key2: Value2
            envTag:
              Key1: Value1
              Key2: Value2
            kubernetesRule:
              namespaceNameRegex: .*test.*
              workloadType: Deployment
              workloadNameRegex: .*test.*
              includePodLabelRegex:
                Key1: Value1
                Key2: Value2
              excludePodLabelRegex:
                Key1: Value1
                Key2: Value2
              podNameRegex: .*test.*
              labelTag:
                Key1: Value1
                Key2: Value2
              annotationTag:
                Key1: Value1
                Key2: Value2
    

    Create Rule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
    @overload
    def Rule(resource_name: str,
             args: RuleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Rule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             rule_name: Optional[str] = None,
             topic_id: Optional[str] = None,
             container_rule: Optional[RuleContainerRuleArgs] = None,
             exclude_paths: Optional[Sequence[RuleExcludePathArgs]] = None,
             extract_rule: Optional[RuleExtractRuleArgs] = None,
             input_type: Optional[int] = None,
             log_sample: Optional[str] = None,
             log_type: Optional[str] = None,
             paths: Optional[Sequence[str]] = None,
             user_define_rule: Optional[RuleUserDefineRuleArgs] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: volcengine:tls:Rule
    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 RuleArgs
    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 RuleArgs
    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 RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleruleResourceResourceFromTlsrule = new Volcengine.Tls.Rule("exampleruleResourceResourceFromTlsrule", new()
    {
        RuleName = "string",
        TopicId = "string",
        ContainerRule = new Volcengine.Tls.Inputs.RuleContainerRuleArgs
        {
            Stream = "string",
            ContainerNameRegex = "string",
            EnvTag = 
            {
                { "string", "string" },
            },
            ExcludeContainerEnvRegex = 
            {
                { "string", "string" },
            },
            ExcludeContainerLabelRegex = 
            {
                { "string", "string" },
            },
            IncludeContainerEnvRegex = 
            {
                { "string", "string" },
            },
            IncludeContainerLabelRegex = 
            {
                { "string", "string" },
            },
            KubernetesRule = new Volcengine.Tls.Inputs.RuleContainerRuleKubernetesRuleArgs
            {
                AnnotationTag = 
                {
                    { "string", "string" },
                },
                ExcludePodLabelRegex = 
                {
                    { "string", "string" },
                },
                IncludePodLabelRegex = 
                {
                    { "string", "string" },
                },
                LabelTag = 
                {
                    { "string", "string" },
                },
                NamespaceNameRegex = "string",
                PodNameRegex = "string",
                WorkloadNameRegex = "string",
                WorkloadType = "string",
            },
        },
        ExcludePaths = new[]
        {
            new Volcengine.Tls.Inputs.RuleExcludePathArgs
            {
                Type = "string",
                Value = "string",
            },
        },
        ExtractRule = new Volcengine.Tls.Inputs.RuleExtractRuleArgs
        {
            BeginRegex = "string",
            Delimiter = "string",
            FilterKeyRegexes = new[]
            {
                new Volcengine.Tls.Inputs.RuleExtractRuleFilterKeyRegexArgs
                {
                    Key = "string",
                    Regex = "string",
                },
            },
            Keys = new[]
            {
                "string",
            },
            LogRegex = "string",
            LogTemplate = new Volcengine.Tls.Inputs.RuleExtractRuleLogTemplateArgs
            {
                Format = "string",
                Type = "string",
            },
            TimeFormat = "string",
            TimeKey = "string",
            UnMatchLogKey = "string",
            UnMatchUpLoadSwitch = false,
        },
        InputType = 0,
        LogSample = "string",
        LogType = "string",
        Paths = new[]
        {
            "string",
        },
        UserDefineRule = new Volcengine.Tls.Inputs.RuleUserDefineRuleArgs
        {
            Advanced = new Volcengine.Tls.Inputs.RuleUserDefineRuleAdvancedArgs
            {
                CloseEof = false,
                CloseInactive = 0,
                CloseRemoved = false,
                CloseRenamed = false,
                CloseTimeout = 0,
            },
            EnableRawLog = false,
            Fields = 
            {
                { "string", "string" },
            },
            ParsePathRule = new Volcengine.Tls.Inputs.RuleUserDefineRuleParsePathRuleArgs
            {
                Keys = new[]
                {
                    "string",
                },
                PathSample = "string",
                Regex = "string",
            },
            Plugin = new Volcengine.Tls.Inputs.RuleUserDefineRulePluginArgs
            {
                Processors = new[]
                {
                    "string",
                },
            },
            ShardHashKey = new Volcengine.Tls.Inputs.RuleUserDefineRuleShardHashKeyArgs
            {
                HashKey = "string",
            },
            TailFiles = false,
        },
    });
    
    example, err := tls.NewRule(ctx, "exampleruleResourceResourceFromTlsrule", &tls.RuleArgs{
    	RuleName: pulumi.String("string"),
    	TopicId:  pulumi.String("string"),
    	ContainerRule: &tls.RuleContainerRuleArgs{
    		Stream:             pulumi.String("string"),
    		ContainerNameRegex: pulumi.String("string"),
    		EnvTag: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		ExcludeContainerEnvRegex: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		ExcludeContainerLabelRegex: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		IncludeContainerEnvRegex: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		IncludeContainerLabelRegex: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		KubernetesRule: &tls.RuleContainerRuleKubernetesRuleArgs{
    			AnnotationTag: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			ExcludePodLabelRegex: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			IncludePodLabelRegex: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			LabelTag: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			NamespaceNameRegex: pulumi.String("string"),
    			PodNameRegex:       pulumi.String("string"),
    			WorkloadNameRegex:  pulumi.String("string"),
    			WorkloadType:       pulumi.String("string"),
    		},
    	},
    	ExcludePaths: tls.RuleExcludePathArray{
    		&tls.RuleExcludePathArgs{
    			Type:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	ExtractRule: &tls.RuleExtractRuleArgs{
    		BeginRegex: pulumi.String("string"),
    		Delimiter:  pulumi.String("string"),
    		FilterKeyRegexes: tls.RuleExtractRuleFilterKeyRegexArray{
    			&tls.RuleExtractRuleFilterKeyRegexArgs{
    				Key:   pulumi.String("string"),
    				Regex: pulumi.String("string"),
    			},
    		},
    		Keys: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		LogRegex: pulumi.String("string"),
    		LogTemplate: &tls.RuleExtractRuleLogTemplateArgs{
    			Format: pulumi.String("string"),
    			Type:   pulumi.String("string"),
    		},
    		TimeFormat:          pulumi.String("string"),
    		TimeKey:             pulumi.String("string"),
    		UnMatchLogKey:       pulumi.String("string"),
    		UnMatchUpLoadSwitch: pulumi.Bool(false),
    	},
    	InputType: pulumi.Int(0),
    	LogSample: pulumi.String("string"),
    	LogType:   pulumi.String("string"),
    	Paths: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	UserDefineRule: &tls.RuleUserDefineRuleArgs{
    		Advanced: &tls.RuleUserDefineRuleAdvancedArgs{
    			CloseEof:      pulumi.Bool(false),
    			CloseInactive: pulumi.Int(0),
    			CloseRemoved:  pulumi.Bool(false),
    			CloseRenamed:  pulumi.Bool(false),
    			CloseTimeout:  pulumi.Int(0),
    		},
    		EnableRawLog: pulumi.Bool(false),
    		Fields: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		ParsePathRule: &tls.RuleUserDefineRuleParsePathRuleArgs{
    			Keys: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			PathSample: pulumi.String("string"),
    			Regex:      pulumi.String("string"),
    		},
    		Plugin: &tls.RuleUserDefineRulePluginArgs{
    			Processors: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		ShardHashKey: &tls.RuleUserDefineRuleShardHashKeyArgs{
    			HashKey: pulumi.String("string"),
    		},
    		TailFiles: pulumi.Bool(false),
    	},
    })
    
    var exampleruleResourceResourceFromTlsrule = new Rule("exampleruleResourceResourceFromTlsrule", RuleArgs.builder()
        .ruleName("string")
        .topicId("string")
        .containerRule(RuleContainerRuleArgs.builder()
            .stream("string")
            .containerNameRegex("string")
            .envTag(Map.of("string", "string"))
            .excludeContainerEnvRegex(Map.of("string", "string"))
            .excludeContainerLabelRegex(Map.of("string", "string"))
            .includeContainerEnvRegex(Map.of("string", "string"))
            .includeContainerLabelRegex(Map.of("string", "string"))
            .kubernetesRule(RuleContainerRuleKubernetesRuleArgs.builder()
                .annotationTag(Map.of("string", "string"))
                .excludePodLabelRegex(Map.of("string", "string"))
                .includePodLabelRegex(Map.of("string", "string"))
                .labelTag(Map.of("string", "string"))
                .namespaceNameRegex("string")
                .podNameRegex("string")
                .workloadNameRegex("string")
                .workloadType("string")
                .build())
            .build())
        .excludePaths(RuleExcludePathArgs.builder()
            .type("string")
            .value("string")
            .build())
        .extractRule(RuleExtractRuleArgs.builder()
            .beginRegex("string")
            .delimiter("string")
            .filterKeyRegexes(RuleExtractRuleFilterKeyRegexArgs.builder()
                .key("string")
                .regex("string")
                .build())
            .keys("string")
            .logRegex("string")
            .logTemplate(RuleExtractRuleLogTemplateArgs.builder()
                .format("string")
                .type("string")
                .build())
            .timeFormat("string")
            .timeKey("string")
            .unMatchLogKey("string")
            .unMatchUpLoadSwitch(false)
            .build())
        .inputType(0)
        .logSample("string")
        .logType("string")
        .paths("string")
        .userDefineRule(RuleUserDefineRuleArgs.builder()
            .advanced(RuleUserDefineRuleAdvancedArgs.builder()
                .closeEof(false)
                .closeInactive(0)
                .closeRemoved(false)
                .closeRenamed(false)
                .closeTimeout(0)
                .build())
            .enableRawLog(false)
            .fields(Map.of("string", "string"))
            .parsePathRule(RuleUserDefineRuleParsePathRuleArgs.builder()
                .keys("string")
                .pathSample("string")
                .regex("string")
                .build())
            .plugin(RuleUserDefineRulePluginArgs.builder()
                .processors("string")
                .build())
            .shardHashKey(RuleUserDefineRuleShardHashKeyArgs.builder()
                .hashKey("string")
                .build())
            .tailFiles(false)
            .build())
        .build());
    
    examplerule_resource_resource_from_tlsrule = volcengine.tls.Rule("exampleruleResourceResourceFromTlsrule",
        rule_name="string",
        topic_id="string",
        container_rule={
            "stream": "string",
            "container_name_regex": "string",
            "env_tag": {
                "string": "string",
            },
            "exclude_container_env_regex": {
                "string": "string",
            },
            "exclude_container_label_regex": {
                "string": "string",
            },
            "include_container_env_regex": {
                "string": "string",
            },
            "include_container_label_regex": {
                "string": "string",
            },
            "kubernetes_rule": {
                "annotation_tag": {
                    "string": "string",
                },
                "exclude_pod_label_regex": {
                    "string": "string",
                },
                "include_pod_label_regex": {
                    "string": "string",
                },
                "label_tag": {
                    "string": "string",
                },
                "namespace_name_regex": "string",
                "pod_name_regex": "string",
                "workload_name_regex": "string",
                "workload_type": "string",
            },
        },
        exclude_paths=[{
            "type": "string",
            "value": "string",
        }],
        extract_rule={
            "begin_regex": "string",
            "delimiter": "string",
            "filter_key_regexes": [{
                "key": "string",
                "regex": "string",
            }],
            "keys": ["string"],
            "log_regex": "string",
            "log_template": {
                "format": "string",
                "type": "string",
            },
            "time_format": "string",
            "time_key": "string",
            "un_match_log_key": "string",
            "un_match_up_load_switch": False,
        },
        input_type=0,
        log_sample="string",
        log_type="string",
        paths=["string"],
        user_define_rule={
            "advanced": {
                "close_eof": False,
                "close_inactive": 0,
                "close_removed": False,
                "close_renamed": False,
                "close_timeout": 0,
            },
            "enable_raw_log": False,
            "fields": {
                "string": "string",
            },
            "parse_path_rule": {
                "keys": ["string"],
                "path_sample": "string",
                "regex": "string",
            },
            "plugin": {
                "processors": ["string"],
            },
            "shard_hash_key": {
                "hash_key": "string",
            },
            "tail_files": False,
        })
    
    const exampleruleResourceResourceFromTlsrule = new volcengine.tls.Rule("exampleruleResourceResourceFromTlsrule", {
        ruleName: "string",
        topicId: "string",
        containerRule: {
            stream: "string",
            containerNameRegex: "string",
            envTag: {
                string: "string",
            },
            excludeContainerEnvRegex: {
                string: "string",
            },
            excludeContainerLabelRegex: {
                string: "string",
            },
            includeContainerEnvRegex: {
                string: "string",
            },
            includeContainerLabelRegex: {
                string: "string",
            },
            kubernetesRule: {
                annotationTag: {
                    string: "string",
                },
                excludePodLabelRegex: {
                    string: "string",
                },
                includePodLabelRegex: {
                    string: "string",
                },
                labelTag: {
                    string: "string",
                },
                namespaceNameRegex: "string",
                podNameRegex: "string",
                workloadNameRegex: "string",
                workloadType: "string",
            },
        },
        excludePaths: [{
            type: "string",
            value: "string",
        }],
        extractRule: {
            beginRegex: "string",
            delimiter: "string",
            filterKeyRegexes: [{
                key: "string",
                regex: "string",
            }],
            keys: ["string"],
            logRegex: "string",
            logTemplate: {
                format: "string",
                type: "string",
            },
            timeFormat: "string",
            timeKey: "string",
            unMatchLogKey: "string",
            unMatchUpLoadSwitch: false,
        },
        inputType: 0,
        logSample: "string",
        logType: "string",
        paths: ["string"],
        userDefineRule: {
            advanced: {
                closeEof: false,
                closeInactive: 0,
                closeRemoved: false,
                closeRenamed: false,
                closeTimeout: 0,
            },
            enableRawLog: false,
            fields: {
                string: "string",
            },
            parsePathRule: {
                keys: ["string"],
                pathSample: "string",
                regex: "string",
            },
            plugin: {
                processors: ["string"],
            },
            shardHashKey: {
                hashKey: "string",
            },
            tailFiles: false,
        },
    });
    
    type: volcengine:tls:Rule
    properties:
        containerRule:
            containerNameRegex: string
            envTag:
                string: string
            excludeContainerEnvRegex:
                string: string
            excludeContainerLabelRegex:
                string: string
            includeContainerEnvRegex:
                string: string
            includeContainerLabelRegex:
                string: string
            kubernetesRule:
                annotationTag:
                    string: string
                excludePodLabelRegex:
                    string: string
                includePodLabelRegex:
                    string: string
                labelTag:
                    string: string
                namespaceNameRegex: string
                podNameRegex: string
                workloadNameRegex: string
                workloadType: string
            stream: string
        excludePaths:
            - type: string
              value: string
        extractRule:
            beginRegex: string
            delimiter: string
            filterKeyRegexes:
                - key: string
                  regex: string
            keys:
                - string
            logRegex: string
            logTemplate:
                format: string
                type: string
            timeFormat: string
            timeKey: string
            unMatchLogKey: string
            unMatchUpLoadSwitch: false
        inputType: 0
        logSample: string
        logType: string
        paths:
            - string
        ruleName: string
        topicId: string
        userDefineRule:
            advanced:
                closeEof: false
                closeInactive: 0
                closeRemoved: false
                closeRenamed: false
                closeTimeout: 0
            enableRawLog: false
            fields:
                string: string
            parsePathRule:
                keys:
                    - string
                pathSample: string
                regex: string
            plugin:
                processors:
                    - string
            shardHashKey:
                hashKey: string
            tailFiles: false
    

    Rule 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 Rule resource accepts the following input properties:

    RuleName string
    The name of the collection configuration.
    TopicId string
    The ID of the log topic to which the collection configuration belongs.
    ContainerRule RuleContainerRule
    Container collection rules.
    ExcludePaths List<RuleExcludePath>
    Collect the blacklist list.
    ExtractRule RuleExtractRule
    The extract rule.
    InputType int
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    LogSample string
    The sample of the log.
    LogType string
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    Paths List<string>
    Collection path list.
    UserDefineRule RuleUserDefineRule
    User-defined collection rules.
    RuleName string
    The name of the collection configuration.
    TopicId string
    The ID of the log topic to which the collection configuration belongs.
    ContainerRule RuleContainerRuleArgs
    Container collection rules.
    ExcludePaths []RuleExcludePathArgs
    Collect the blacklist list.
    ExtractRule RuleExtractRuleArgs
    The extract rule.
    InputType int
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    LogSample string
    The sample of the log.
    LogType string
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    Paths []string
    Collection path list.
    UserDefineRule RuleUserDefineRuleArgs
    User-defined collection rules.
    ruleName String
    The name of the collection configuration.
    topicId String
    The ID of the log topic to which the collection configuration belongs.
    containerRule RuleContainerRule
    Container collection rules.
    excludePaths List<RuleExcludePath>
    Collect the blacklist list.
    extractRule RuleExtractRule
    The extract rule.
    inputType Integer
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    logSample String
    The sample of the log.
    logType String
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths List<String>
    Collection path list.
    userDefineRule RuleUserDefineRule
    User-defined collection rules.
    ruleName string
    The name of the collection configuration.
    topicId string
    The ID of the log topic to which the collection configuration belongs.
    containerRule RuleContainerRule
    Container collection rules.
    excludePaths RuleExcludePath[]
    Collect the blacklist list.
    extractRule RuleExtractRule
    The extract rule.
    inputType number
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    logSample string
    The sample of the log.
    logType string
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths string[]
    Collection path list.
    userDefineRule RuleUserDefineRule
    User-defined collection rules.
    rule_name str
    The name of the collection configuration.
    topic_id str
    The ID of the log topic to which the collection configuration belongs.
    container_rule RuleContainerRuleArgs
    Container collection rules.
    exclude_paths Sequence[RuleExcludePathArgs]
    Collect the blacklist list.
    extract_rule RuleExtractRuleArgs
    The extract rule.
    input_type int
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    log_sample str
    The sample of the log.
    log_type str
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths Sequence[str]
    Collection path list.
    user_define_rule RuleUserDefineRuleArgs
    User-defined collection rules.
    ruleName String
    The name of the collection configuration.
    topicId String
    The ID of the log topic to which the collection configuration belongs.
    containerRule Property Map
    Container collection rules.
    excludePaths List<Property Map>
    Collect the blacklist list.
    extractRule Property Map
    The extract rule.
    inputType Number
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    logSample String
    The sample of the log.
    logType String
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths List<String>
    Collection path list.
    userDefineRule Property Map
    User-defined collection rules.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The id of the rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The id of the rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The id of the rule.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleId string
    The id of the rule.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_id str
    The id of the rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The id of the rule.

    Look up Existing Rule Resource

    Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            container_rule: Optional[RuleContainerRuleArgs] = None,
            exclude_paths: Optional[Sequence[RuleExcludePathArgs]] = None,
            extract_rule: Optional[RuleExtractRuleArgs] = None,
            input_type: Optional[int] = None,
            log_sample: Optional[str] = None,
            log_type: Optional[str] = None,
            paths: Optional[Sequence[str]] = None,
            rule_id: Optional[str] = None,
            rule_name: Optional[str] = None,
            topic_id: Optional[str] = None,
            user_define_rule: Optional[RuleUserDefineRuleArgs] = None) -> Rule
    func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
    public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
    public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    ContainerRule RuleContainerRule
    Container collection rules.
    ExcludePaths List<RuleExcludePath>
    Collect the blacklist list.
    ExtractRule RuleExtractRule
    The extract rule.
    InputType int
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    LogSample string
    The sample of the log.
    LogType string
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    Paths List<string>
    Collection path list.
    RuleId string
    The id of the rule.
    RuleName string
    The name of the collection configuration.
    TopicId string
    The ID of the log topic to which the collection configuration belongs.
    UserDefineRule RuleUserDefineRule
    User-defined collection rules.
    ContainerRule RuleContainerRuleArgs
    Container collection rules.
    ExcludePaths []RuleExcludePathArgs
    Collect the blacklist list.
    ExtractRule RuleExtractRuleArgs
    The extract rule.
    InputType int
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    LogSample string
    The sample of the log.
    LogType string
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    Paths []string
    Collection path list.
    RuleId string
    The id of the rule.
    RuleName string
    The name of the collection configuration.
    TopicId string
    The ID of the log topic to which the collection configuration belongs.
    UserDefineRule RuleUserDefineRuleArgs
    User-defined collection rules.
    containerRule RuleContainerRule
    Container collection rules.
    excludePaths List<RuleExcludePath>
    Collect the blacklist list.
    extractRule RuleExtractRule
    The extract rule.
    inputType Integer
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    logSample String
    The sample of the log.
    logType String
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths List<String>
    Collection path list.
    ruleId String
    The id of the rule.
    ruleName String
    The name of the collection configuration.
    topicId String
    The ID of the log topic to which the collection configuration belongs.
    userDefineRule RuleUserDefineRule
    User-defined collection rules.
    containerRule RuleContainerRule
    Container collection rules.
    excludePaths RuleExcludePath[]
    Collect the blacklist list.
    extractRule RuleExtractRule
    The extract rule.
    inputType number
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    logSample string
    The sample of the log.
    logType string
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths string[]
    Collection path list.
    ruleId string
    The id of the rule.
    ruleName string
    The name of the collection configuration.
    topicId string
    The ID of the log topic to which the collection configuration belongs.
    userDefineRule RuleUserDefineRule
    User-defined collection rules.
    container_rule RuleContainerRuleArgs
    Container collection rules.
    exclude_paths Sequence[RuleExcludePathArgs]
    Collect the blacklist list.
    extract_rule RuleExtractRuleArgs
    The extract rule.
    input_type int
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    log_sample str
    The sample of the log.
    log_type str
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths Sequence[str]
    Collection path list.
    rule_id str
    The id of the rule.
    rule_name str
    The name of the collection configuration.
    topic_id str
    The ID of the log topic to which the collection configuration belongs.
    user_define_rule RuleUserDefineRuleArgs
    User-defined collection rules.
    containerRule Property Map
    Container collection rules.
    excludePaths List<Property Map>
    Collect the blacklist list.
    extractRule Property Map
    The extract rule.
    inputType Number
    The type of the collection configuration. Validate value can be 0(host log file), 1(K8s container standard output) and 2(Log files in the K8s container).
    logSample String
    The sample of the log.
    logType String
    The log type. The value can be one of the following: minimalist_log, json_log, delimiter_log, multiline_log, fullregex_log.
    paths List<String>
    Collection path list.
    ruleId String
    The id of the rule.
    ruleName String
    The name of the collection configuration.
    topicId String
    The ID of the log topic to which the collection configuration belongs.
    userDefineRule Property Map
    User-defined collection rules.

    Supporting Types

    RuleContainerRule, RuleContainerRuleArgs

    Stream string
    The collection mode.
    ContainerNameRegex string
    The name of the container to be collected.
    EnvTag Dictionary<string, string>
    Whether to add environment variables as log tags to raw log data.
    ExcludeContainerEnvRegex Dictionary<string, string>
    The container environment variable blacklist is used to specify the range of containers not to be collected.
    ExcludeContainerLabelRegex Dictionary<string, string>
    The container Label blacklist is used to specify the range of containers not to be collected.
    IncludeContainerEnvRegex Dictionary<string, string>
    The container environment variable whitelist specifies the container to be collected through the container environment variable. If the whitelist is not enabled, it means that all containers are specified to be collected.
    IncludeContainerLabelRegex Dictionary<string, string>
    The container label whitelist specifies the containers to be collected through the container label. If the whitelist is not enabled, all containers are specified to be collected.
    KubernetesRule RuleContainerRuleKubernetesRule
    Collection rules for Kubernetes containers.
    Stream string
    The collection mode.
    ContainerNameRegex string
    The name of the container to be collected.
    EnvTag map[string]string
    Whether to add environment variables as log tags to raw log data.
    ExcludeContainerEnvRegex map[string]string
    The container environment variable blacklist is used to specify the range of containers not to be collected.
    ExcludeContainerLabelRegex map[string]string
    The container Label blacklist is used to specify the range of containers not to be collected.
    IncludeContainerEnvRegex map[string]string
    The container environment variable whitelist specifies the container to be collected through the container environment variable. If the whitelist is not enabled, it means that all containers are specified to be collected.
    IncludeContainerLabelRegex map[string]string
    The container label whitelist specifies the containers to be collected through the container label. If the whitelist is not enabled, all containers are specified to be collected.
    KubernetesRule RuleContainerRuleKubernetesRule
    Collection rules for Kubernetes containers.
    stream String
    The collection mode.
    containerNameRegex String
    The name of the container to be collected.
    envTag Map<String,String>
    Whether to add environment variables as log tags to raw log data.
    excludeContainerEnvRegex Map<String,String>
    The container environment variable blacklist is used to specify the range of containers not to be collected.
    excludeContainerLabelRegex Map<String,String>
    The container Label blacklist is used to specify the range of containers not to be collected.
    includeContainerEnvRegex Map<String,String>
    The container environment variable whitelist specifies the container to be collected through the container environment variable. If the whitelist is not enabled, it means that all containers are specified to be collected.
    includeContainerLabelRegex Map<String,String>
    The container label whitelist specifies the containers to be collected through the container label. If the whitelist is not enabled, all containers are specified to be collected.
    kubernetesRule RuleContainerRuleKubernetesRule
    Collection rules for Kubernetes containers.
    stream string
    The collection mode.
    containerNameRegex string
    The name of the container to be collected.
    envTag {[key: string]: string}
    Whether to add environment variables as log tags to raw log data.
    excludeContainerEnvRegex {[key: string]: string}
    The container environment variable blacklist is used to specify the range of containers not to be collected.
    excludeContainerLabelRegex {[key: string]: string}
    The container Label blacklist is used to specify the range of containers not to be collected.
    includeContainerEnvRegex {[key: string]: string}
    The container environment variable whitelist specifies the container to be collected through the container environment variable. If the whitelist is not enabled, it means that all containers are specified to be collected.
    includeContainerLabelRegex {[key: string]: string}
    The container label whitelist specifies the containers to be collected through the container label. If the whitelist is not enabled, all containers are specified to be collected.
    kubernetesRule RuleContainerRuleKubernetesRule
    Collection rules for Kubernetes containers.
    stream str
    The collection mode.
    container_name_regex str
    The name of the container to be collected.
    env_tag Mapping[str, str]
    Whether to add environment variables as log tags to raw log data.
    exclude_container_env_regex Mapping[str, str]
    The container environment variable blacklist is used to specify the range of containers not to be collected.
    exclude_container_label_regex Mapping[str, str]
    The container Label blacklist is used to specify the range of containers not to be collected.
    include_container_env_regex Mapping[str, str]
    The container environment variable whitelist specifies the container to be collected through the container environment variable. If the whitelist is not enabled, it means that all containers are specified to be collected.
    include_container_label_regex Mapping[str, str]
    The container label whitelist specifies the containers to be collected through the container label. If the whitelist is not enabled, all containers are specified to be collected.
    kubernetes_rule RuleContainerRuleKubernetesRule
    Collection rules for Kubernetes containers.
    stream String
    The collection mode.
    containerNameRegex String
    The name of the container to be collected.
    envTag Map<String>
    Whether to add environment variables as log tags to raw log data.
    excludeContainerEnvRegex Map<String>
    The container environment variable blacklist is used to specify the range of containers not to be collected.
    excludeContainerLabelRegex Map<String>
    The container Label blacklist is used to specify the range of containers not to be collected.
    includeContainerEnvRegex Map<String>
    The container environment variable whitelist specifies the container to be collected through the container environment variable. If the whitelist is not enabled, it means that all containers are specified to be collected.
    includeContainerLabelRegex Map<String>
    The container label whitelist specifies the containers to be collected through the container label. If the whitelist is not enabled, all containers are specified to be collected.
    kubernetesRule Property Map
    Collection rules for Kubernetes containers.

    RuleContainerRuleKubernetesRule, RuleContainerRuleKubernetesRuleArgs

    AnnotationTag Dictionary<string, string>
    Whether to add Kubernetes Annotation as a log tag to the raw log data.
    ExcludePodLabelRegex Dictionary<string, string>
    Specify the containers not to be collected through the Pod Label blacklist, and not enable means to collect all containers.
    IncludePodLabelRegex Dictionary<string, string>
    The Pod Label whitelist is used to specify containers to be collected. When the Pod Label whitelist is not enabled, it means that all containers are collected.
    LabelTag Dictionary<string, string>
    Whether to add Kubernetes Label as a log label to the original log data.
    NamespaceNameRegex string
    The name of the Kubernetes Namespace to be collected. If no Namespace name is specified, all containers will be collected. Namespace names support regular matching.
    PodNameRegex string
    The Pod name is used to specify the container to be collected. When no Pod name is specified, it means to collect all containers.
    WorkloadNameRegex string
    Specify the container to be collected by the name of the workload. When no workload name is specified, all containers are collected. The workload name supports regular matching.
    WorkloadType string
    Specify the containers to be collected by the type of workload, only one type can be selected. When no type is specified, it means all types of containers are collected. The supported types of workloads are: Deployment: stateless workload. StatefulSet: stateful workload. DaemonSet: daemon process. Job: task. CronJob: scheduled task.
    AnnotationTag map[string]string
    Whether to add Kubernetes Annotation as a log tag to the raw log data.
    ExcludePodLabelRegex map[string]string
    Specify the containers not to be collected through the Pod Label blacklist, and not enable means to collect all containers.
    IncludePodLabelRegex map[string]string
    The Pod Label whitelist is used to specify containers to be collected. When the Pod Label whitelist is not enabled, it means that all containers are collected.
    LabelTag map[string]string
    Whether to add Kubernetes Label as a log label to the original log data.
    NamespaceNameRegex string
    The name of the Kubernetes Namespace to be collected. If no Namespace name is specified, all containers will be collected. Namespace names support regular matching.
    PodNameRegex string
    The Pod name is used to specify the container to be collected. When no Pod name is specified, it means to collect all containers.
    WorkloadNameRegex string
    Specify the container to be collected by the name of the workload. When no workload name is specified, all containers are collected. The workload name supports regular matching.
    WorkloadType string
    Specify the containers to be collected by the type of workload, only one type can be selected. When no type is specified, it means all types of containers are collected. The supported types of workloads are: Deployment: stateless workload. StatefulSet: stateful workload. DaemonSet: daemon process. Job: task. CronJob: scheduled task.
    annotationTag Map<String,String>
    Whether to add Kubernetes Annotation as a log tag to the raw log data.
    excludePodLabelRegex Map<String,String>
    Specify the containers not to be collected through the Pod Label blacklist, and not enable means to collect all containers.
    includePodLabelRegex Map<String,String>
    The Pod Label whitelist is used to specify containers to be collected. When the Pod Label whitelist is not enabled, it means that all containers are collected.
    labelTag Map<String,String>
    Whether to add Kubernetes Label as a log label to the original log data.
    namespaceNameRegex String
    The name of the Kubernetes Namespace to be collected. If no Namespace name is specified, all containers will be collected. Namespace names support regular matching.
    podNameRegex String
    The Pod name is used to specify the container to be collected. When no Pod name is specified, it means to collect all containers.
    workloadNameRegex String
    Specify the container to be collected by the name of the workload. When no workload name is specified, all containers are collected. The workload name supports regular matching.
    workloadType String
    Specify the containers to be collected by the type of workload, only one type can be selected. When no type is specified, it means all types of containers are collected. The supported types of workloads are: Deployment: stateless workload. StatefulSet: stateful workload. DaemonSet: daemon process. Job: task. CronJob: scheduled task.
    annotationTag {[key: string]: string}
    Whether to add Kubernetes Annotation as a log tag to the raw log data.
    excludePodLabelRegex {[key: string]: string}
    Specify the containers not to be collected through the Pod Label blacklist, and not enable means to collect all containers.
    includePodLabelRegex {[key: string]: string}
    The Pod Label whitelist is used to specify containers to be collected. When the Pod Label whitelist is not enabled, it means that all containers are collected.
    labelTag {[key: string]: string}
    Whether to add Kubernetes Label as a log label to the original log data.
    namespaceNameRegex string
    The name of the Kubernetes Namespace to be collected. If no Namespace name is specified, all containers will be collected. Namespace names support regular matching.
    podNameRegex string
    The Pod name is used to specify the container to be collected. When no Pod name is specified, it means to collect all containers.
    workloadNameRegex string
    Specify the container to be collected by the name of the workload. When no workload name is specified, all containers are collected. The workload name supports regular matching.
    workloadType string
    Specify the containers to be collected by the type of workload, only one type can be selected. When no type is specified, it means all types of containers are collected. The supported types of workloads are: Deployment: stateless workload. StatefulSet: stateful workload. DaemonSet: daemon process. Job: task. CronJob: scheduled task.
    annotation_tag Mapping[str, str]
    Whether to add Kubernetes Annotation as a log tag to the raw log data.
    exclude_pod_label_regex Mapping[str, str]
    Specify the containers not to be collected through the Pod Label blacklist, and not enable means to collect all containers.
    include_pod_label_regex Mapping[str, str]
    The Pod Label whitelist is used to specify containers to be collected. When the Pod Label whitelist is not enabled, it means that all containers are collected.
    label_tag Mapping[str, str]
    Whether to add Kubernetes Label as a log label to the original log data.
    namespace_name_regex str
    The name of the Kubernetes Namespace to be collected. If no Namespace name is specified, all containers will be collected. Namespace names support regular matching.
    pod_name_regex str
    The Pod name is used to specify the container to be collected. When no Pod name is specified, it means to collect all containers.
    workload_name_regex str
    Specify the container to be collected by the name of the workload. When no workload name is specified, all containers are collected. The workload name supports regular matching.
    workload_type str
    Specify the containers to be collected by the type of workload, only one type can be selected. When no type is specified, it means all types of containers are collected. The supported types of workloads are: Deployment: stateless workload. StatefulSet: stateful workload. DaemonSet: daemon process. Job: task. CronJob: scheduled task.
    annotationTag Map<String>
    Whether to add Kubernetes Annotation as a log tag to the raw log data.
    excludePodLabelRegex Map<String>
    Specify the containers not to be collected through the Pod Label blacklist, and not enable means to collect all containers.
    includePodLabelRegex Map<String>
    The Pod Label whitelist is used to specify containers to be collected. When the Pod Label whitelist is not enabled, it means that all containers are collected.
    labelTag Map<String>
    Whether to add Kubernetes Label as a log label to the original log data.
    namespaceNameRegex String
    The name of the Kubernetes Namespace to be collected. If no Namespace name is specified, all containers will be collected. Namespace names support regular matching.
    podNameRegex String
    The Pod name is used to specify the container to be collected. When no Pod name is specified, it means to collect all containers.
    workloadNameRegex String
    Specify the container to be collected by the name of the workload. When no workload name is specified, all containers are collected. The workload name supports regular matching.
    workloadType String
    Specify the containers to be collected by the type of workload, only one type can be selected. When no type is specified, it means all types of containers are collected. The supported types of workloads are: Deployment: stateless workload. StatefulSet: stateful workload. DaemonSet: daemon process. Job: task. CronJob: scheduled task.

    RuleExcludePath, RuleExcludePathArgs

    Type string
    Collection path type. The path type can be File or Path.
    Value string
    Collection path.
    Type string
    Collection path type. The path type can be File or Path.
    Value string
    Collection path.
    type String
    Collection path type. The path type can be File or Path.
    value String
    Collection path.
    type string
    Collection path type. The path type can be File or Path.
    value string
    Collection path.
    type str
    Collection path type. The path type can be File or Path.
    value str
    Collection path.
    type String
    Collection path type. The path type can be File or Path.
    value String
    Collection path.

    RuleExtractRule, RuleExtractRuleArgs

    BeginRegex string
    The first log line needs to match the regular expression.
    Delimiter string
    The delimiter of the log.
    FilterKeyRegexes List<RuleExtractRuleFilterKeyRegex>
    The filter key list.
    Keys List<string>
    A list of log field names (Key).
    LogRegex string
    The entire log needs to match the regular expression.
    LogTemplate RuleExtractRuleLogTemplate
    Automatically extract log fields according to the specified log template.
    TimeFormat string
    Parsing format of the time field.
    TimeKey string
    The field name of the log time field.
    UnMatchLogKey string
    When uploading the failed log, the key name of the failed log.
    UnMatchUpLoadSwitch bool
    Whether to upload the log of parsing failure.
    BeginRegex string
    The first log line needs to match the regular expression.
    Delimiter string
    The delimiter of the log.
    FilterKeyRegexes []RuleExtractRuleFilterKeyRegex
    The filter key list.
    Keys []string
    A list of log field names (Key).
    LogRegex string
    The entire log needs to match the regular expression.
    LogTemplate RuleExtractRuleLogTemplate
    Automatically extract log fields according to the specified log template.
    TimeFormat string
    Parsing format of the time field.
    TimeKey string
    The field name of the log time field.
    UnMatchLogKey string
    When uploading the failed log, the key name of the failed log.
    UnMatchUpLoadSwitch bool
    Whether to upload the log of parsing failure.
    beginRegex String
    The first log line needs to match the regular expression.
    delimiter String
    The delimiter of the log.
    filterKeyRegexes List<RuleExtractRuleFilterKeyRegex>
    The filter key list.
    keys List<String>
    A list of log field names (Key).
    logRegex String
    The entire log needs to match the regular expression.
    logTemplate RuleExtractRuleLogTemplate
    Automatically extract log fields according to the specified log template.
    timeFormat String
    Parsing format of the time field.
    timeKey String
    The field name of the log time field.
    unMatchLogKey String
    When uploading the failed log, the key name of the failed log.
    unMatchUpLoadSwitch Boolean
    Whether to upload the log of parsing failure.
    beginRegex string
    The first log line needs to match the regular expression.
    delimiter string
    The delimiter of the log.
    filterKeyRegexes RuleExtractRuleFilterKeyRegex[]
    The filter key list.
    keys string[]
    A list of log field names (Key).
    logRegex string
    The entire log needs to match the regular expression.
    logTemplate RuleExtractRuleLogTemplate
    Automatically extract log fields according to the specified log template.
    timeFormat string
    Parsing format of the time field.
    timeKey string
    The field name of the log time field.
    unMatchLogKey string
    When uploading the failed log, the key name of the failed log.
    unMatchUpLoadSwitch boolean
    Whether to upload the log of parsing failure.
    begin_regex str
    The first log line needs to match the regular expression.
    delimiter str
    The delimiter of the log.
    filter_key_regexes Sequence[RuleExtractRuleFilterKeyRegex]
    The filter key list.
    keys Sequence[str]
    A list of log field names (Key).
    log_regex str
    The entire log needs to match the regular expression.
    log_template RuleExtractRuleLogTemplate
    Automatically extract log fields according to the specified log template.
    time_format str
    Parsing format of the time field.
    time_key str
    The field name of the log time field.
    un_match_log_key str
    When uploading the failed log, the key name of the failed log.
    un_match_up_load_switch bool
    Whether to upload the log of parsing failure.
    beginRegex String
    The first log line needs to match the regular expression.
    delimiter String
    The delimiter of the log.
    filterKeyRegexes List<Property Map>
    The filter key list.
    keys List<String>
    A list of log field names (Key).
    logRegex String
    The entire log needs to match the regular expression.
    logTemplate Property Map
    Automatically extract log fields according to the specified log template.
    timeFormat String
    Parsing format of the time field.
    timeKey String
    The field name of the log time field.
    unMatchLogKey String
    When uploading the failed log, the key name of the failed log.
    unMatchUpLoadSwitch Boolean
    Whether to upload the log of parsing failure.

    RuleExtractRuleFilterKeyRegex, RuleExtractRuleFilterKeyRegexArgs

    Key string
    The name of the filter key.
    Regex string
    The log content of the filter field needs to match the regular expression.
    Key string
    The name of the filter key.
    Regex string
    The log content of the filter field needs to match the regular expression.
    key String
    The name of the filter key.
    regex String
    The log content of the filter field needs to match the regular expression.
    key string
    The name of the filter key.
    regex string
    The log content of the filter field needs to match the regular expression.
    key str
    The name of the filter key.
    regex str
    The log content of the filter field needs to match the regular expression.
    key String
    The name of the filter key.
    regex String
    The log content of the filter field needs to match the regular expression.

    RuleExtractRuleLogTemplate, RuleExtractRuleLogTemplateArgs

    Format string
    Log template content.
    Type string
    The type of the log template.
    Format string
    Log template content.
    Type string
    The type of the log template.
    format String
    Log template content.
    type String
    The type of the log template.
    format string
    Log template content.
    type string
    The type of the log template.
    format str
    Log template content.
    type str
    The type of the log template.
    format String
    Log template content.
    type String
    The type of the log template.

    RuleUserDefineRule, RuleUserDefineRuleArgs

    Advanced RuleUserDefineRuleAdvanced
    LogCollector extension configuration.
    EnableRawLog bool
    Whether to upload raw logs.
    Fields Dictionary<string, string>
    Add constant fields to logs.
    ParsePathRule RuleUserDefineRuleParsePathRule
    Rules for parsing collection paths. After the rules are set, the fields in the collection path will be extracted through the regular expressions specified in the rules, and added to the log data as metadata.
    Plugin RuleUserDefineRulePlugin
    Plugin configuration. After the plugin configuration is enabled, one or more LogCollector processor plugins can be added to parse logs with complex or variable structures.
    ShardHashKey RuleUserDefineRuleShardHashKey
    Rules for routing log partitions. Setting this parameter indicates that the HashKey routing shard mode is used when collecting logs, and Log Service will write the data to the shard containing the specified Key value.
    TailFiles bool
    LogCollector collection strategy, which specifies whether LogCollector collects incremental logs or full logs. The default is false, which means to collect all logs.
    Advanced RuleUserDefineRuleAdvanced
    LogCollector extension configuration.
    EnableRawLog bool
    Whether to upload raw logs.
    Fields map[string]string
    Add constant fields to logs.
    ParsePathRule RuleUserDefineRuleParsePathRule
    Rules for parsing collection paths. After the rules are set, the fields in the collection path will be extracted through the regular expressions specified in the rules, and added to the log data as metadata.
    Plugin RuleUserDefineRulePlugin
    Plugin configuration. After the plugin configuration is enabled, one or more LogCollector processor plugins can be added to parse logs with complex or variable structures.
    ShardHashKey RuleUserDefineRuleShardHashKey
    Rules for routing log partitions. Setting this parameter indicates that the HashKey routing shard mode is used when collecting logs, and Log Service will write the data to the shard containing the specified Key value.
    TailFiles bool
    LogCollector collection strategy, which specifies whether LogCollector collects incremental logs or full logs. The default is false, which means to collect all logs.
    advanced RuleUserDefineRuleAdvanced
    LogCollector extension configuration.
    enableRawLog Boolean
    Whether to upload raw logs.
    fields Map<String,String>
    Add constant fields to logs.
    parsePathRule RuleUserDefineRuleParsePathRule
    Rules for parsing collection paths. After the rules are set, the fields in the collection path will be extracted through the regular expressions specified in the rules, and added to the log data as metadata.
    plugin RuleUserDefineRulePlugin
    Plugin configuration. After the plugin configuration is enabled, one or more LogCollector processor plugins can be added to parse logs with complex or variable structures.
    shardHashKey RuleUserDefineRuleShardHashKey
    Rules for routing log partitions. Setting this parameter indicates that the HashKey routing shard mode is used when collecting logs, and Log Service will write the data to the shard containing the specified Key value.
    tailFiles Boolean
    LogCollector collection strategy, which specifies whether LogCollector collects incremental logs or full logs. The default is false, which means to collect all logs.
    advanced RuleUserDefineRuleAdvanced
    LogCollector extension configuration.
    enableRawLog boolean
    Whether to upload raw logs.
    fields {[key: string]: string}
    Add constant fields to logs.
    parsePathRule RuleUserDefineRuleParsePathRule
    Rules for parsing collection paths. After the rules are set, the fields in the collection path will be extracted through the regular expressions specified in the rules, and added to the log data as metadata.
    plugin RuleUserDefineRulePlugin
    Plugin configuration. After the plugin configuration is enabled, one or more LogCollector processor plugins can be added to parse logs with complex or variable structures.
    shardHashKey RuleUserDefineRuleShardHashKey
    Rules for routing log partitions. Setting this parameter indicates that the HashKey routing shard mode is used when collecting logs, and Log Service will write the data to the shard containing the specified Key value.
    tailFiles boolean
    LogCollector collection strategy, which specifies whether LogCollector collects incremental logs or full logs. The default is false, which means to collect all logs.
    advanced RuleUserDefineRuleAdvanced
    LogCollector extension configuration.
    enable_raw_log bool
    Whether to upload raw logs.
    fields Mapping[str, str]
    Add constant fields to logs.
    parse_path_rule RuleUserDefineRuleParsePathRule
    Rules for parsing collection paths. After the rules are set, the fields in the collection path will be extracted through the regular expressions specified in the rules, and added to the log data as metadata.
    plugin RuleUserDefineRulePlugin
    Plugin configuration. After the plugin configuration is enabled, one or more LogCollector processor plugins can be added to parse logs with complex or variable structures.
    shard_hash_key RuleUserDefineRuleShardHashKey
    Rules for routing log partitions. Setting this parameter indicates that the HashKey routing shard mode is used when collecting logs, and Log Service will write the data to the shard containing the specified Key value.
    tail_files bool
    LogCollector collection strategy, which specifies whether LogCollector collects incremental logs or full logs. The default is false, which means to collect all logs.
    advanced Property Map
    LogCollector extension configuration.
    enableRawLog Boolean
    Whether to upload raw logs.
    fields Map<String>
    Add constant fields to logs.
    parsePathRule Property Map
    Rules for parsing collection paths. After the rules are set, the fields in the collection path will be extracted through the regular expressions specified in the rules, and added to the log data as metadata.
    plugin Property Map
    Plugin configuration. After the plugin configuration is enabled, one or more LogCollector processor plugins can be added to parse logs with complex or variable structures.
    shardHashKey Property Map
    Rules for routing log partitions. Setting this parameter indicates that the HashKey routing shard mode is used when collecting logs, and Log Service will write the data to the shard containing the specified Key value.
    tailFiles Boolean
    LogCollector collection strategy, which specifies whether LogCollector collects incremental logs or full logs. The default is false, which means to collect all logs.

    RuleUserDefineRuleAdvanced, RuleUserDefineRuleAdvancedArgs

    CloseEof bool
    Whether to release the log file handle after reading to the end of the log file. The default is false.
    CloseInactive int
    The wait time to release the log file handle. When the log file has not written a new log for more than the specified time, release the handle of the log file.
    CloseRemoved bool
    After the log file is removed, whether to release the handle of the log file. The default is false.
    CloseRenamed bool
    After the log file is renamed, whether to release the handle of the log file. The default is false.
    CloseTimeout int
    The maximum length of time that LogCollector monitors log files. The unit is seconds, and the default is 0 seconds, which means that there is no limit to the length of time LogCollector monitors log files.
    CloseEof bool
    Whether to release the log file handle after reading to the end of the log file. The default is false.
    CloseInactive int
    The wait time to release the log file handle. When the log file has not written a new log for more than the specified time, release the handle of the log file.
    CloseRemoved bool
    After the log file is removed, whether to release the handle of the log file. The default is false.
    CloseRenamed bool
    After the log file is renamed, whether to release the handle of the log file. The default is false.
    CloseTimeout int
    The maximum length of time that LogCollector monitors log files. The unit is seconds, and the default is 0 seconds, which means that there is no limit to the length of time LogCollector monitors log files.
    closeEof Boolean
    Whether to release the log file handle after reading to the end of the log file. The default is false.
    closeInactive Integer
    The wait time to release the log file handle. When the log file has not written a new log for more than the specified time, release the handle of the log file.
    closeRemoved Boolean
    After the log file is removed, whether to release the handle of the log file. The default is false.
    closeRenamed Boolean
    After the log file is renamed, whether to release the handle of the log file. The default is false.
    closeTimeout Integer
    The maximum length of time that LogCollector monitors log files. The unit is seconds, and the default is 0 seconds, which means that there is no limit to the length of time LogCollector monitors log files.
    closeEof boolean
    Whether to release the log file handle after reading to the end of the log file. The default is false.
    closeInactive number
    The wait time to release the log file handle. When the log file has not written a new log for more than the specified time, release the handle of the log file.
    closeRemoved boolean
    After the log file is removed, whether to release the handle of the log file. The default is false.
    closeRenamed boolean
    After the log file is renamed, whether to release the handle of the log file. The default is false.
    closeTimeout number
    The maximum length of time that LogCollector monitors log files. The unit is seconds, and the default is 0 seconds, which means that there is no limit to the length of time LogCollector monitors log files.
    close_eof bool
    Whether to release the log file handle after reading to the end of the log file. The default is false.
    close_inactive int
    The wait time to release the log file handle. When the log file has not written a new log for more than the specified time, release the handle of the log file.
    close_removed bool
    After the log file is removed, whether to release the handle of the log file. The default is false.
    close_renamed bool
    After the log file is renamed, whether to release the handle of the log file. The default is false.
    close_timeout int
    The maximum length of time that LogCollector monitors log files. The unit is seconds, and the default is 0 seconds, which means that there is no limit to the length of time LogCollector monitors log files.
    closeEof Boolean
    Whether to release the log file handle after reading to the end of the log file. The default is false.
    closeInactive Number
    The wait time to release the log file handle. When the log file has not written a new log for more than the specified time, release the handle of the log file.
    closeRemoved Boolean
    After the log file is removed, whether to release the handle of the log file. The default is false.
    closeRenamed Boolean
    After the log file is renamed, whether to release the handle of the log file. The default is false.
    closeTimeout Number
    The maximum length of time that LogCollector monitors log files. The unit is seconds, and the default is 0 seconds, which means that there is no limit to the length of time LogCollector monitors log files.

    RuleUserDefineRuleParsePathRule, RuleUserDefineRuleParsePathRuleArgs

    Keys List<string>
    A list of field names. Log Service will parse the path sample (PathSample) into multiple fields according to the regular expression (Regex), and Keys is used to specify the field name of each field.
    PathSample string
    Sample capture path for a real scene.
    Regex string
    Regular expression for extracting path fields. It must match the collection path sample, otherwise it cannot be extracted successfully.
    Keys []string
    A list of field names. Log Service will parse the path sample (PathSample) into multiple fields according to the regular expression (Regex), and Keys is used to specify the field name of each field.
    PathSample string
    Sample capture path for a real scene.
    Regex string
    Regular expression for extracting path fields. It must match the collection path sample, otherwise it cannot be extracted successfully.
    keys List<String>
    A list of field names. Log Service will parse the path sample (PathSample) into multiple fields according to the regular expression (Regex), and Keys is used to specify the field name of each field.
    pathSample String
    Sample capture path for a real scene.
    regex String
    Regular expression for extracting path fields. It must match the collection path sample, otherwise it cannot be extracted successfully.
    keys string[]
    A list of field names. Log Service will parse the path sample (PathSample) into multiple fields according to the regular expression (Regex), and Keys is used to specify the field name of each field.
    pathSample string
    Sample capture path for a real scene.
    regex string
    Regular expression for extracting path fields. It must match the collection path sample, otherwise it cannot be extracted successfully.
    keys Sequence[str]
    A list of field names. Log Service will parse the path sample (PathSample) into multiple fields according to the regular expression (Regex), and Keys is used to specify the field name of each field.
    path_sample str
    Sample capture path for a real scene.
    regex str
    Regular expression for extracting path fields. It must match the collection path sample, otherwise it cannot be extracted successfully.
    keys List<String>
    A list of field names. Log Service will parse the path sample (PathSample) into multiple fields according to the regular expression (Regex), and Keys is used to specify the field name of each field.
    pathSample String
    Sample capture path for a real scene.
    regex String
    Regular expression for extracting path fields. It must match the collection path sample, otherwise it cannot be extracted successfully.

    RuleUserDefineRulePlugin, RuleUserDefineRulePluginArgs

    Processors List<string>
    LogCollector plugin.
    Processors []string
    LogCollector plugin.
    processors List<String>
    LogCollector plugin.
    processors string[]
    LogCollector plugin.
    processors Sequence[str]
    LogCollector plugin.
    processors List<String>
    LogCollector plugin.

    RuleUserDefineRuleShardHashKey, RuleUserDefineRuleShardHashKeyArgs

    HashKey string
    The HashKey of the log group is used to specify the partition (shard) to be written to by the current log group.
    HashKey string
    The HashKey of the log group is used to specify the partition (shard) to be written to by the current log group.
    hashKey String
    The HashKey of the log group is used to specify the partition (shard) to be written to by the current log group.
    hashKey string
    The HashKey of the log group is used to specify the partition (shard) to be written to by the current log group.
    hash_key str
    The HashKey of the log group is used to specify the partition (shard) to be written to by the current log group.
    hashKey String
    The HashKey of the log group is used to specify the partition (shard) to be written to by the current log group.

    Import

    tls rule can be imported using the id, e.g.

     $ pulumi import volcengine:tls/rule:Rule default fa************
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine