List machine groups

Updated at:

Run a CLI command to list all machine groups in a specified project.

Prerequisites

Before you run this command, make sure that the following prerequisites are met:

  • Simple Log Service (SLS) is activated. For more information, see Getting started with SLS.

  • The SLS CLI is installed and configured. For more information, see Install the CLI and Configure the CLI.

  • An SLS project is created. For more information, see Create a project.

Syntax

aliyun sls list-machine-group --project=<value> [--group-name=<value>] [--offset=<value>] [--size=<value>]

Parameters

The following table describes the required and command-specific parameters.

ParameterTypeRequiredExampleDescription
--projectStringYesaliyun-test-projectThe name of the project.
--group-nameStringNocontainerThe name of a machine group. This parameter is used for fuzzy matching.
--offsetIntegerNo0The pagination offset.
--sizeIntegerNo100The number of entries per page. Maximum value: 500.

For information about global parameters, see Global parameters.

References

  • If the server response contains an error message when you call an API operation, the call has failed. You can refer to the API error code table to find a solution. For more information, see PutLogs.

  • Alibaba Cloud OpenAPI Explorer provides debugging tools, SDKs, examples, and related documentation. You can use OpenAPI Explorer to quickly debug Simple Log Service API operations without manually constructing requests or signing them. For more information, see OpenAPI Explorer.

API reference

ListMachineGroup