全部產品
Search
文件中心

Simple Log Service:list_shards

更新時間:Jun 30, 2024

調用CLI命令查詢指定Logstore的Shard資訊。

請求文法

aliyunlog log list_shards --project_name=<value> --logstore_name=<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>]

請求參數

該命令的必選和特有參數描述如下。

參數名稱

數實值型別

是否必選

樣本值

描述

--project_name

String

project-a

Project名稱。

--logstore_name

String

logstore-a

Logstore名稱。

關於該命令的全域參數,請參見全域參數

樣本

  • 請求樣本

    查詢預設帳號下logstore-a的Shard資訊。

    aliyunlog log list_shards --project_name="project-a" --logstore_name="logstore-a"
  • 返回樣本

    [
      {
        "createTime": 1619493098,
        "exclusiveEndKey": "80000000000000000000000000000000",
        "inclusiveBeginKey": "00000000000000000000000000000000",
        "shardID": 0,
        "status": "readwrite"
      },
      {
        "createTime": 1619493098,
        "exclusiveEndKey": "ffffffffffffffffffffffffffffffff",
        "inclusiveBeginKey": "80000000000000000000000000000000",
        "shardID": 1,
        "status": "readwrite"
      }
    ]

錯誤碼

如果返回報錯資訊,請參見具體介面的錯誤碼處理。更多資訊,請參見ListShards錯誤碼處理

API參考

ListShards