Update a machine group
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.
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.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| --project | String | Yes | aliyun-test-project | The name of the project. |
| --group-name | String | Yes | container | The name of the machine group. |
| --machine-identify-type | String | Yes | ip | The type of machine identifier. |
| --machine-list | String | Yes | 192.168.5.2 | The IP address or custom identifier of a machine. |