Queries all machine groups.

Request syntax

aliyunlog log list_machine_group --project_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>]

Request parameters

The following table describes the required and specific parameters of the list_machine_group command.
Parameter Type Required Example Description
--project_name String Yes aliyun-test-project The name of the project.
--offset Integer No 0 The start position of entries to return. Default value: 0.
--size Integer No 3 The maximum number of entries to return on each page. Maximum value: 500.
For information about the global parameters of the Log Service command-line interface (CLI), see Global variables.


  • Sample requests
    Query the first three machine groups of the default account.
    aliyunlog log list_machine_group --project_name="aliyun-test-project" --offset=0 --size=3
  • Sample responses
      "count": 3,
      "machinegroups": [
      "total": 10

Error codes

If an error message is returned, fix the error based on the error codes of the related API operation. For more information, see Error codes of ListMachineGroup.

API reference