Changes the attributes of a Logstore.


You can call the UpdateLogstore operation to change only the ttl attribute, which specifies the maximum retention period of data.

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request syntax

PUT /logstores/{logstore} HTTP/1.1

Request parameters

Parameter Type Location Required Example Description
project String Host Yes ali-test-project

The name of the project.

appendMeta Boolean FormData No false

Specifies whether to record public IP addresses. Valid values:

  • true: records public IP addresses
  • false: does not record public IP addresses
autoSplit Boolean FormData No true

Specifies whether to enable automatic sharding. Valid values:

  • true: enables automatic sharding
  • false: disables automatic sharding
enable_tracking Boolean FormData No false

Specifies whether to enable the WebTracking feature. Valid values:

  • true: enables the WebTracking feature
  • false: disables the WebTracking feature
logstoreName String FormData No logstore-test

The name of the Logstore.

maxSplitShard Integer FormData No 64

The maximum number of shards into which a shard can be automatically split. Valid values: 1 to 64.

Note If you set the autoSplit parameter to true, you must specify the maxSplitShard parameter.
shardCount Integer FormData No 2

The number of shards.

Note You cannot call the UpdateLogstore operation to change the number of shards. You can call the SplitShard or MergeShards operation to change the number of shards.
ttl Integer FormData No 30

The maximum retention period of data. Unit: days. Valid values: 1 to 3650. If you set the value to 3650, data is permanently stored.

logstore String Path No test-logstore

The name of the Logstore.

encrypt_conf EncryptConf FormData No

The data encryption configurations.

Response parameters

Parameter Type Example Description
Server String nginx

The name of the server.

Content-Length String 0

The length of the content.

Connection String close

Indicates whether the connection is persistent.

Access-Control-Allow-Origin String *

Indicates whether code from any origin is allowed to access the resource.

Date String Sun, 27 May 2018 08:25:04 GMT

The time.

x-log-requestid String 5B0A6B60BB6EE39764D458B5

The ID of the request.


Sample requests

PUT /logstores/test-logstore HTTP/1.1


Sample success responses

JSON format

HTTP/1.1 200 OK

Error codes

For a list of error codes, visit the API Error Center.