Queries all Logstores in a specified project.
Request syntax
aliyunlog log list_logstore --project_name=<value> [--logstore_name_pattern=<value>] [--offset=<value>] [--size=<value>] [--access-id=<value>] [--access-key=<value>] [--sts-token=<value>] [--region-endpoint=<value>] [--client-name=<value>] [--jmes-filter=<value>] [--format-output=<value>] [--decode-output=<value>]
Request parameters
Command-specific parameters:
|
Parameter Name |
Data type |
Required |
Example value |
Description |
|
--project_name |
String |
Yes |
aliyun-test-project |
The name of the project. |
|
--logstore_name_pattern |
String |
No |
ali-test-logstore |
The Logstore name. Supports fuzzy match. For example, entering logstore returns all Logstores whose names contain that string. |
|
--offset |
Integer |
No |
0 |
The starting position in the result set. Default: 0. |
|
--size |
Integer |
No |
10 |
The number of entries per page. Maximum: 500. |
All commands also support Global parameters.
Examples
-
Request example
Lists all Logstores in a project using the default account credentials.
aliyunlog log list_logstore --project_name="aliyun-test-project" -
Response example
{ "count": 8, "logstores": [ "internal-alert-history", "internal-etl-log", "logstore-a", "metricstore-dsw", "metricstore-dsw2", "metricstore-dsw3", "moni-nginx", "python-api-logstore2" ], "total": 8 }
Error codes
Errors returned by this command map to the ListLogStores API Error codes.
API reference
该文章对您有帮助吗?