List Logstores
Run a CLI command to list all Logstores in a specified project.
Prerequisites
Before you run the CLI command, make sure that the following requirements are met:
SLS is activated. For more information, see Getting started with Simple Log Service.
The SLS CLI is installed and configured. For more information, see Install the CLI and Configure the CLI.
A project is created. For more information, see Create a project.
Command syntax
aliyun sls list-log-stores --project=<value> [--logstore-name=<value>] [--mode=<value>] [--telemetry-type=<value>] [--offset=<value>] [--size=<value>]
Parameters
The following table describes the required and command-specific parameters.
Parameter |
Type |
Required |
Example |
Description |
|
String |
Yes |
aliyun-test-project |
The name of the project. |
|
String |
No |
app |
The Logstore name used for fuzzy filtering. |
|
String |
No |
standard |
Filters Logstores by type. Valid values: standard (Standard) and query (Query). |
|
String |
No |
None |
Filters Logstores by data type. Valid values: None (log data) and Metrics (time series data). |
|
Integer |
No |
0 |
The pagination offset. Default value: 0. |
|
Integer |
No |
200 |
The number of entries per page. Default value: 200. Maximum value: 500. |
Query with fuzzy filtering
Command example
Query LogStores whose names contain "access".
aliyun sls list-log-stores --project="aliyun-test-project" --logstore-name="access"
Sample response
{
"logstores": [
{
"name": "app-access-logs",
"ttl": 30,
"shardCount": 2,
"mode": "standard",
"createTime": "2026-01-01 10:00:00",
"lastModifyTime": "2026-01-15 14:30:00"
}
],
"total": 1
}