调用CLI命令查询指定Project下所有Logstore信息。
请求语法
aliyunlog log list_logstore --project_name= [--logstore_name_pattern=] [--offset=] [--size=] [--access-id=] [--access-key=] [--sts-token=] [--region-endpoint=] [--client-name=] [--jmes-filter=] [--format-output=] [--decode-output=]
请求参数
该命令的必选和特有参数描述如下。
参数名称 | 数值类型 | 是否必选 | 示例值 | 描述 |
–project_name | String | 是 | aliyun-test-project | Project名称。 |
–logstore_name_pattern | String | 否 | ali-test-logstore | Logstore名称。支持模糊匹配,例如输入logstore,则返回名称包含logstore的所有Logsotre列表。 |
–offset | Integer | 否 | 0 | 指定从某一行开始读取查询结果。默认值为0。 |
–size | Integer | 否 | 10 | 分页查询时,设置的每页行数。最大值为500。 |
关于该命令的全局参数,请参见全局参数。
示例
- 请求示例查询默认账号下指定Project的Logstore信息。
aliyunlog log list_logstore --project_name="aliyun-test-project"
- 返回示例
{ "count": 8, "logstores": [ "internal-alert-history", "internal-etl-log", "logstore-a", "metricstore-dsw", "metricstore-dsw2", "metricstore-dsw3", "moni-nginx", "python-api-logstore2" ], "total": 8}
错误码
如果返回报错信息,请参见具体接口的错误码处理。更多信息,请参见ListLogstore错误码处理。
API参考
ListLogStores
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家
阿里云企业补贴进行中: 马上申请
腾讯云限时活动1折起,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠
转转请注明出处:https://www.yunxiaoer.com/160454.html