All Products
Search
Document Center

Simple Log Service:list_machine_group

Last Updated:Oct 26, 2023

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.
ParameterTypeRequiredExampleDescription
--project_nameStringYesaliyun-test-projectThe name of the project.
--offsetIntegerNo0The start position of entries to return. Default value: 0.
--sizeIntegerNo3The 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 parameters.

Examples

  • 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": [
        "2021042-doctestecs",
        "apache-log",
        "doctest"
      ],
      "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

ListMachineGroup