全部產品
Search
文件中心

Simple Log Service:UpdateIndex

更新時間:Sep 15, 2026

更新Logstore的索引資訊。

介面說明

介面說明

Host 由 Project 名稱和日誌服務 Endpoint 構成,您需要在 Host 中指定 Project。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

log:UpdateIndex

update

*LogStore

acs:log:{#regionId}:{#accountId}:project/{#project}/logstore/{#logstore}

  • log:TLSVersion
無

請求文法

PUT /logstores/{logstore}/index HTTP/1.1

路徑參數

名稱

類型

必填

描述

樣本值

logstore

string

是

Logstore 名稱。

test-logstore

請求參數

名稱

類型

必填

描述

樣本值

project

string

是

Project 名稱。

ali-test-project

body

object

否

請求體。

keys

object

否

The configuration of field indexes. A field index is a key-value pair in which the key specifies the name of the field and the value specifies the index configuration of the field.

object

是

The index configuration of the field.

caseSensitive

boolean

否

Specifies whether to enable case sensitivity. Valid values:

  • true

  • false

chn

boolean

否

Specifies whether to include Chinese characters. This parameter is required only when type is set to text. Valid values:

  • true

  • false

type

string

否

The data type of the field value. Valid values: text, json, double, and long.

枚舉值:

  • double :

    double

  • json :

    json

  • text :

    text

  • long :

    long

alias

string

否

The alias of the field.

token

array

是

The delimiters that are used to split text. This parameter is required only when type is set to text.

string

否

The delimiter that is used to split text.

doc_value

boolean

否

Specifies whether to turn on Enable Analytics for the field.

line

object

否

The configuration of full-text indexes.

chn

boolean

否

Specifies whether to include Chinese characters. Valid values:

  • true

  • false

caseSensitive

boolean

否

Specifies whether to enable case sensitivity. Valid values:

  • true

  • false

token

array

是

The delimiters that are used to split text.

string

否

The delimiter that is used to split text.

include_keys

array

否

The included fields. You cannot specify both include_keys and exclude_keys.

string

否

The included field.

exclude_keys

array

否

The excluded fields. You cannot specify both include_keys and exclude_keys.

string

否

The excluded field.

ttl

integer

否

The retention period of data. Unit: days. Valid values: 7, 30, and 90.

max_text_len

integer

否

The maximum length of a field value that can be retained.

log_reduce

boolean

否

Specifies whether to turn on LogReduce. If you turn on LogReduce, only one of log_reduce_white_list and log_reduce_black_list takes effect.

log_reduce_white_list

array

否

The fields in the whitelist that you want to use to cluster logs.

string

否

The field in the whitelist.

log_reduce_black_list

array

否

The fields in the blacklist that you want to use to cluster logs.

string

否

The field in the blacklist.

返回參數

名稱

類型

描述

樣本值

當前API暫無返回參數

樣本

正常返回樣本

JSON格式

{}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情。