Update a machine group

Updated at:

Run a CLI command to update the configuration of a specified machine group.

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.

Important

The update-machine-group command completely overwrites the existing machine list. Before you run this command, run the following command to retrieve the current configuration, and then pass all parameters:

aliyun sls get-machine-group --project=<project-name> --machine-group=<group-name>

The get-machine-group command uses --machine-group to specify the machine group name. Do not use --group-name, which is a parameter of update-machine-group.

Syntax

aliyun sls update-machine-group --project=<value> --group-name=<value> --machine-identify-type=<value> --machine-list=<value> [--machine-list=<value> ...]

Parameters

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

ParameterTypeRequiredExampleDescription
--projectStringYesaliyun-test-projectThe name of the project.
--group-nameStringYescontainerThe name of the machine group.
--machine-identify-typeStringYesipThe type of machine identifier.
--machine-listStringYes192.168.5.2The IP address or custom identifier of a machine.