1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. sls
  5. Index
Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi

alicloud.sls.Index

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi

    Provides a Log Service (SLS) Index resource.

    For information about Log Service (SLS) Index and how to use it, see What is Index.

    NOTE: Available since v1.260.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const logstoreName = config.get("logstoreName") || "logstore-example";
    const projectName = config.get("projectName") || "project-for-index-terraform-example";
    const _default = new alicloud.log.Project("default", {
        description: "terraform example",
        projectName: projectName,
    });
    const defaultStore = new alicloud.log.Store("default", {
        hotTtl: 7,
        retentionPeriod: 30,
        shardCount: 2,
        projectName: _default.projectName,
        logstoreName: logstoreName,
    });
    const defaultIndex = new alicloud.sls.Index("default", {
        line: {
            chn: true,
            caseSensitive: true,
            tokens: ["a"],
            excludeKeys: ["t"],
        },
        keys: JSON.stringify({
            example: {
                caseSensitive: false,
                token: [
                    "\n",
                    "\x09",
                    ",",
                    " ",
                    ";",
                    "\"",
                    "'",
                    "(",
                    ")",
                    "{",
                    "}",
                    "[",
                    "]",
                    "<",
                    ">",
                    "?",
                    "/",
                    "#",
                    ":",
                ],
                type: "text",
                doc_value: false,
                alias: "",
                chn: false,
            },
        }),
        logstoreName: defaultStore.logstoreName,
        projectName: projectName,
    });
    
    import pulumi
    import json
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    logstore_name = config.get("logstoreName")
    if logstore_name is None:
        logstore_name = "logstore-example"
    project_name = config.get("projectName")
    if project_name is None:
        project_name = "project-for-index-terraform-example"
    default = alicloud.log.Project("default",
        description="terraform example",
        project_name=project_name)
    default_store = alicloud.log.Store("default",
        hot_ttl=7,
        retention_period=30,
        shard_count=2,
        project_name=default.project_name,
        logstore_name=logstore_name)
    default_index = alicloud.sls.Index("default",
        line={
            "chn": True,
            "case_sensitive": True,
            "tokens": ["a"],
            "exclude_keys": ["t"],
        },
        keys=json.dumps({
            "example": {
                "caseSensitive": False,
                "token": [
                    "\n",
                    "\x09",
                    ",",
                    " ",
                    ";",
                    "\"",
                    "'",
                    "(",
                    ")",
                    "{",
                    "}",
                    "[",
                    "]",
                    "<",
                    ">",
                    "?",
                    "/",
                    "#",
                    ":",
                ],
                "type": "text",
                "doc_value": False,
                "alias": "",
                "chn": False,
            },
        }),
        logstore_name=default_store.logstore_name,
        project_name=project_name)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sls"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		logstoreName := "logstore-example"
    		if param := cfg.Get("logstoreName"); param != "" {
    			logstoreName = param
    		}
    		projectName := "project-for-index-terraform-example"
    		if param := cfg.Get("projectName"); param != "" {
    			projectName = param
    		}
    		_default, err := log.NewProject(ctx, "default", &log.ProjectArgs{
    			Description: pulumi.String("terraform example"),
    			ProjectName: pulumi.String(projectName),
    		})
    		if err != nil {
    			return err
    		}
    		defaultStore, err := log.NewStore(ctx, "default", &log.StoreArgs{
    			HotTtl:          pulumi.Int(7),
    			RetentionPeriod: pulumi.Int(30),
    			ShardCount:      pulumi.Int(2),
    			ProjectName:     _default.ProjectName,
    			LogstoreName:    pulumi.String(logstoreName),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"example": map[string]interface{}{
    				"caseSensitive": false,
    				"token": []string{
    					"\n",
    					"	",
    					",",
    					" ",
    					";",
    					"\"",
    					"'",
    					"(",
    					")",
    					"{",
    					"}",
    					"[",
    					"]",
    					"<",
    					">",
    					"?",
    					"/",
    					"#",
    					":",
    				},
    				"type":      "text",
    				"doc_value": false,
    				"alias":     "",
    				"chn":       false,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = sls.NewIndex(ctx, "default", &sls.IndexArgs{
    			Line: &sls.IndexLineArgs{
    				Chn:           pulumi.Bool(true),
    				CaseSensitive: pulumi.Bool(true),
    				Tokens: pulumi.StringArray{
    					pulumi.String("a"),
    				},
    				ExcludeKeys: pulumi.StringArray{
    					pulumi.String("t"),
    				},
    			},
    			Keys:         pulumi.String(json0),
    			LogstoreName: defaultStore.LogstoreName,
    			ProjectName:  pulumi.String(projectName),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var logstoreName = config.Get("logstoreName") ?? "logstore-example";
        var projectName = config.Get("projectName") ?? "project-for-index-terraform-example";
        var @default = new AliCloud.Log.Project("default", new()
        {
            Description = "terraform example",
            ProjectName = projectName,
        });
    
        var defaultStore = new AliCloud.Log.Store("default", new()
        {
            HotTtl = 7,
            RetentionPeriod = 30,
            ShardCount = 2,
            ProjectName = @default.ProjectName,
            LogstoreName = logstoreName,
        });
    
        var defaultIndex = new AliCloud.Sls.Index("default", new()
        {
            Line = new AliCloud.Sls.Inputs.IndexLineArgs
            {
                Chn = true,
                CaseSensitive = true,
                Tokens = new[]
                {
                    "a",
                },
                ExcludeKeys = new[]
                {
                    "t",
                },
            },
            Keys = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["example"] = new Dictionary<string, object?>
                {
                    ["caseSensitive"] = false,
                    ["token"] = new[]
                    {
                        @"
    ",
                        "	",
                        ",",
                        " ",
                        ";",
                        "\"",
                        "'",
                        "(",
                        ")",
                        "{",
                        "}",
                        "[",
                        "]",
                        "<",
                        ">",
                        "?",
                        "/",
                        "#",
                        ":",
                    },
                    ["type"] = "text",
                    ["doc_value"] = false,
                    ["alias"] = "",
                    ["chn"] = false,
                },
            }),
            LogstoreName = defaultStore.LogstoreName,
            ProjectName = projectName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.log.Project;
    import com.pulumi.alicloud.log.ProjectArgs;
    import com.pulumi.alicloud.log.Store;
    import com.pulumi.alicloud.log.StoreArgs;
    import com.pulumi.alicloud.sls.Index;
    import com.pulumi.alicloud.sls.IndexArgs;
    import com.pulumi.alicloud.sls.inputs.IndexLineArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var logstoreName = config.get("logstoreName").orElse("logstore-example");
            final var projectName = config.get("projectName").orElse("project-for-index-terraform-example");
            var default_ = new Project("default", ProjectArgs.builder()
                .description("terraform example")
                .projectName(projectName)
                .build());
    
            var defaultStore = new Store("defaultStore", StoreArgs.builder()
                .hotTtl(7)
                .retentionPeriod(30)
                .shardCount(2)
                .projectName(default_.projectName())
                .logstoreName(logstoreName)
                .build());
    
            var defaultIndex = new Index("defaultIndex", IndexArgs.builder()
                .line(IndexLineArgs.builder()
                    .chn(true)
                    .caseSensitive(true)
                    .tokens("a")
                    .excludeKeys("t")
                    .build())
                .keys(serializeJson(
                    jsonObject(
                        jsonProperty("example", jsonObject(
                            jsonProperty("caseSensitive", false),
                            jsonProperty("token", jsonArray(
                                """
    
                                """, 
                                "	", 
                                ",", 
                                " ", 
                                ";", 
                                "\"", 
                                "'", 
                                "(", 
                                ")", 
                                "{", 
                                "}", 
                                "[", 
                                "]", 
                                "<", 
                                ">", 
                                "?", 
                                "/", 
                                "#", 
                                ":"
                            )),
                            jsonProperty("type", "text"),
                            jsonProperty("doc_value", false),
                            jsonProperty("alias", ""),
                            jsonProperty("chn", false)
                        ))
                    )))
                .logstoreName(defaultStore.logstoreName())
                .projectName(projectName)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      logstoreName:
        type: string
        default: logstore-example
      projectName:
        type: string
        default: project-for-index-terraform-example
    resources:
      default:
        type: alicloud:log:Project
        properties:
          description: terraform example
          projectName: ${projectName}
      defaultStore:
        type: alicloud:log:Store
        name: default
        properties:
          hotTtl: '7'
          retentionPeriod: '30'
          shardCount: '2'
          projectName: ${default.projectName}
          logstoreName: ${logstoreName}
      defaultIndex:
        type: alicloud:sls:Index
        name: default
        properties:
          line:
            chn: 'true'
            caseSensitive: 'true'
            tokens:
              - a
            excludeKeys:
              - t
          keys:
            fn::toJSON:
              example:
                caseSensitive: false
                token:
                  - |2+
                  - "\t"
                  - ','
                  - ' '
                  - ;
                  - '"'
                  - ''''
                  - (
                  - )
                  - '{'
                  - '}'
                  - '['
                  - ']'
                  - <
                  - '>'
                  - '?'
                  - /
                  - '#'
                  - ':'
                type: text
                doc_value: false
                alias: ""
                chn: false
          logstoreName: ${defaultStore.logstoreName}
          projectName: ${projectName}
    

    Create Index Resource

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

    Constructor syntax

    new Index(name: string, args: IndexArgs, opts?: CustomResourceOptions);
    @overload
    def Index(resource_name: str,
              args: IndexArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Index(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              logstore_name: Optional[str] = None,
              project_name: Optional[str] = None,
              keys: Optional[str] = None,
              line: Optional[IndexLineArgs] = None,
              log_reduce: Optional[bool] = None,
              log_reduce_black_lists: Optional[Sequence[str]] = None,
              log_reduce_white_lists: Optional[Sequence[str]] = None,
              max_text_len: Optional[int] = None)
    func NewIndex(ctx *Context, name string, args IndexArgs, opts ...ResourceOption) (*Index, error)
    public Index(string name, IndexArgs args, CustomResourceOptions? opts = null)
    public Index(String name, IndexArgs args)
    public Index(String name, IndexArgs args, CustomResourceOptions options)
    
    type: alicloud:sls:Index
    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 IndexArgs
    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 IndexArgs
    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 IndexArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IndexArgs
    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 indexResource = new AliCloud.Sls.Index("indexResource", new()
    {
        LogstoreName = "string",
        ProjectName = "string",
        Keys = "string",
        Line = new AliCloud.Sls.Inputs.IndexLineArgs
        {
            CaseSensitive = false,
            Chn = false,
            Tokens = new[]
            {
                "string",
            },
            ExcludeKeys = new[]
            {
                "string",
            },
            IncludeKeys = new[]
            {
                "string",
            },
        },
        LogReduce = false,
        LogReduceBlackLists = new[]
        {
            "string",
        },
        LogReduceWhiteLists = new[]
        {
            "string",
        },
        MaxTextLen = 0,
    });
    
    example, err := sls.NewIndex(ctx, "indexResource", &sls.IndexArgs{
    	LogstoreName: pulumi.String("string"),
    	ProjectName:  pulumi.String("string"),
    	Keys:         pulumi.String("string"),
    	Line: &sls.IndexLineArgs{
    		CaseSensitive: pulumi.Bool(false),
    		Chn:           pulumi.Bool(false),
    		Tokens: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ExcludeKeys: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IncludeKeys: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	LogReduce: pulumi.Bool(false),
    	LogReduceBlackLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LogReduceWhiteLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	MaxTextLen: pulumi.Int(0),
    })
    
    var indexResource = new Index("indexResource", IndexArgs.builder()
        .logstoreName("string")
        .projectName("string")
        .keys("string")
        .line(IndexLineArgs.builder()
            .caseSensitive(false)
            .chn(false)
            .tokens("string")
            .excludeKeys("string")
            .includeKeys("string")
            .build())
        .logReduce(false)
        .logReduceBlackLists("string")
        .logReduceWhiteLists("string")
        .maxTextLen(0)
        .build());
    
    index_resource = alicloud.sls.Index("indexResource",
        logstore_name="string",
        project_name="string",
        keys="string",
        line={
            "case_sensitive": False,
            "chn": False,
            "tokens": ["string"],
            "exclude_keys": ["string"],
            "include_keys": ["string"],
        },
        log_reduce=False,
        log_reduce_black_lists=["string"],
        log_reduce_white_lists=["string"],
        max_text_len=0)
    
    const indexResource = new alicloud.sls.Index("indexResource", {
        logstoreName: "string",
        projectName: "string",
        keys: "string",
        line: {
            caseSensitive: false,
            chn: false,
            tokens: ["string"],
            excludeKeys: ["string"],
            includeKeys: ["string"],
        },
        logReduce: false,
        logReduceBlackLists: ["string"],
        logReduceWhiteLists: ["string"],
        maxTextLen: 0,
    });
    
    type: alicloud:sls:Index
    properties:
        keys: string
        line:
            caseSensitive: false
            chn: false
            excludeKeys:
                - string
            includeKeys:
                - string
            tokens:
                - string
        logReduce: false
        logReduceBlackLists:
            - string
        logReduceWhiteLists:
            - string
        logstoreName: string
        maxTextLen: 0
        projectName: string
    

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

    LogstoreName string
    Logstore name
    ProjectName string
    Project name
    Keys string
    Field index
    Line Pulumi.AliCloud.Sls.Inputs.IndexLine
    Full-text index See line below.
    LogReduce bool
    Whether log clustering is enabled
    LogReduceBlackLists List<string>
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    LogReduceWhiteLists List<string>
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    MaxTextLen int
    Maximum length of statistical field
    LogstoreName string
    Logstore name
    ProjectName string
    Project name
    Keys string
    Field index
    Line IndexLineArgs
    Full-text index See line below.
    LogReduce bool
    Whether log clustering is enabled
    LogReduceBlackLists []string
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    LogReduceWhiteLists []string
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    MaxTextLen int
    Maximum length of statistical field
    logstoreName String
    Logstore name
    projectName String
    Project name
    keys String
    Field index
    line IndexLine
    Full-text index See line below.
    logReduce Boolean
    Whether log clustering is enabled
    logReduceBlackLists List<String>
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    logReduceWhiteLists List<String>
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    maxTextLen Integer
    Maximum length of statistical field
    logstoreName string
    Logstore name
    projectName string
    Project name
    keys string
    Field index
    line IndexLine
    Full-text index See line below.
    logReduce boolean
    Whether log clustering is enabled
    logReduceBlackLists string[]
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    logReduceWhiteLists string[]
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    maxTextLen number
    Maximum length of statistical field
    logstore_name str
    Logstore name
    project_name str
    Project name
    keys str
    Field index
    line IndexLineArgs
    Full-text index See line below.
    log_reduce bool
    Whether log clustering is enabled
    log_reduce_black_lists Sequence[str]
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    log_reduce_white_lists Sequence[str]
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    max_text_len int
    Maximum length of statistical field
    logstoreName String
    Logstore name
    projectName String
    Project name
    keys String
    Field index
    line Property Map
    Full-text index See line below.
    logReduce Boolean
    Whether log clustering is enabled
    logReduceBlackLists List<String>
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    logReduceWhiteLists List<String>
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    maxTextLen Number
    Maximum length of statistical field

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Index Resource

    Get an existing Index 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?: IndexState, opts?: CustomResourceOptions): Index
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            keys: Optional[str] = None,
            line: Optional[IndexLineArgs] = None,
            log_reduce: Optional[bool] = None,
            log_reduce_black_lists: Optional[Sequence[str]] = None,
            log_reduce_white_lists: Optional[Sequence[str]] = None,
            logstore_name: Optional[str] = None,
            max_text_len: Optional[int] = None,
            project_name: Optional[str] = None) -> Index
    func GetIndex(ctx *Context, name string, id IDInput, state *IndexState, opts ...ResourceOption) (*Index, error)
    public static Index Get(string name, Input<string> id, IndexState? state, CustomResourceOptions? opts = null)
    public static Index get(String name, Output<String> id, IndexState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:sls:Index    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Keys string
    Field index
    Line Pulumi.AliCloud.Sls.Inputs.IndexLine
    Full-text index See line below.
    LogReduce bool
    Whether log clustering is enabled
    LogReduceBlackLists List<string>
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    LogReduceWhiteLists List<string>
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    LogstoreName string
    Logstore name
    MaxTextLen int
    Maximum length of statistical field
    ProjectName string
    Project name
    Keys string
    Field index
    Line IndexLineArgs
    Full-text index See line below.
    LogReduce bool
    Whether log clustering is enabled
    LogReduceBlackLists []string
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    LogReduceWhiteLists []string
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    LogstoreName string
    Logstore name
    MaxTextLen int
    Maximum length of statistical field
    ProjectName string
    Project name
    keys String
    Field index
    line IndexLine
    Full-text index See line below.
    logReduce Boolean
    Whether log clustering is enabled
    logReduceBlackLists List<String>
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    logReduceWhiteLists List<String>
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    logstoreName String
    Logstore name
    maxTextLen Integer
    Maximum length of statistical field
    projectName String
    Project name
    keys string
    Field index
    line IndexLine
    Full-text index See line below.
    logReduce boolean
    Whether log clustering is enabled
    logReduceBlackLists string[]
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    logReduceWhiteLists string[]
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    logstoreName string
    Logstore name
    maxTextLen number
    Maximum length of statistical field
    projectName string
    Project name
    keys str
    Field index
    line IndexLineArgs
    Full-text index See line below.
    log_reduce bool
    Whether log clustering is enabled
    log_reduce_black_lists Sequence[str]
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    log_reduce_white_lists Sequence[str]
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    logstore_name str
    Logstore name
    max_text_len int
    Maximum length of statistical field
    project_name str
    Project name
    keys String
    Field index
    line Property Map
    Full-text index See line below.
    logReduce Boolean
    Whether log clustering is enabled
    logReduceBlackLists List<String>
    The blacklist of the cluster fields of log clustering is filtered only when log clustering is enabled.
    logReduceWhiteLists List<String>
    The whitelist of the cluster fields for log clustering. This filter is valid only when log clustering is enabled.
    logstoreName String
    Logstore name
    maxTextLen Number
    Maximum length of statistical field
    projectName String
    Project name

    Supporting Types

    IndexLine, IndexLineArgs

    CaseSensitive bool
    Is case sensitive
    Chn bool
    Does it include Chinese
    Tokens List<string>
    Delimiter
    ExcludeKeys List<string>
    List of excluded fields
    IncludeKeys List<string>
    Include field list
    CaseSensitive bool
    Is case sensitive
    Chn bool
    Does it include Chinese
    Tokens []string
    Delimiter
    ExcludeKeys []string
    List of excluded fields
    IncludeKeys []string
    Include field list
    caseSensitive Boolean
    Is case sensitive
    chn Boolean
    Does it include Chinese
    tokens List<String>
    Delimiter
    excludeKeys List<String>
    List of excluded fields
    includeKeys List<String>
    Include field list
    caseSensitive boolean
    Is case sensitive
    chn boolean
    Does it include Chinese
    tokens string[]
    Delimiter
    excludeKeys string[]
    List of excluded fields
    includeKeys string[]
    Include field list
    case_sensitive bool
    Is case sensitive
    chn bool
    Does it include Chinese
    tokens Sequence[str]
    Delimiter
    exclude_keys Sequence[str]
    List of excluded fields
    include_keys Sequence[str]
    Include field list
    caseSensitive Boolean
    Is case sensitive
    chn Boolean
    Does it include Chinese
    tokens List<String>
    Delimiter
    excludeKeys List<String>
    List of excluded fields
    includeKeys List<String>
    Include field list

    Import

    Log Service (SLS) Index can be imported using the id, e.g.

    $ pulumi import alicloud:sls/index:Index example <project_name>:<logstore_name>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi