全部產品
Search
文件中心

Simple Log Service:list_machines

更新時間:Jun 30, 2024

調用CLI命令查詢指定機器組中的機器資訊。

請求文法

aliyunlog log list_machines --project_name=<value> --group_name=<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>]

請求參數

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

參數名稱

數實值型別

是否必選

樣本值

描述

--project_name

String

aliyun-test-project

Project名稱。

--group_name

String

test-group

機器組名稱。

--offset

Integer

0

指定從某一行開始讀取查詢結果。預設值為0。

--size

Integer

5

分頁查詢時,設定的每頁行數。最大值為500。

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

樣本

  • 請求樣本

    查詢預設帳號下機器組test-group的機器資訊。

    aliyunlog log list_machines --project_name="aliyun-test-project" --group_name="test-group" --offset=0 --size=5
  • 返回樣本

    {
      "count": 1,
      "machines": [
        {
          "binary": "1.8.7", 
          "ip": "203.0.*.*",
          "lastHeartbeatTime": 1622106889,
          "machine-uniqueid": "26964724-6767-443c-a5fc-5d7b8e4fd06c",
          "userdefined-id": ""
        }
      ],
      "total": 1
    }

錯誤碼

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

API參考

ListMachines