Modifies the configurations of a machine group.

Usage notes

The value of the Host parameter consists of a project name and a Log Service endpoint. You must specify a project in the Host parameter.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

The UpdateMachineGroup operation does not have operation-specific request headers and uses only common request headers. For more information, see Common request parameters.

Request syntax

PUT /machinegroups/{groupName} HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
project String Host Yes ali-test-project

The name of the project.

groupName String Path Yes test-group

The name of the machine group.

Object Body Yes

The request struct.

groupName String Body Yes test-machine-group

The name of the machine group.

machineIdentifyType String Body Yes userdefined

The type of the machine group identifier. Valid values:

  • ip: The machine group uses IP addresses as identifiers.
  • userdefined: The machine group uses custom identifiers.
groupType String Body No ""

The type of the machine group. The value is set to an empty string.

groupAttribute Object Body No

The attribute of the machine group. By default, this parameter is empty.

groupTopic String Body No testtopic2

The topic of the machine group. By default, this parameter is empty.

externalName String Body No testgroup2

The identifier of the external management system on which the machine group depends. By default, this parameter is empty.

machineList Array of String Body Yes 192.168.xx.xx

The identifier of the server. Set the value to an IP address or a custom identifier.

Response parameters

Parameter Type Example Description
Server String nginx

The name of the server.

Content-Type String application/json

The type of the response body. Valid values: application/json and application/x-protobuf.

Content-Length String 0

The length of the response body.

Connection String close

Indicates whether the connection is persistent. Valid values:

  • close: The connection is non-persistent. A new TCP connection is established for each HTTP request.
  • keep-alive: The connection is persistent. After a TCP connection is established, the connection remains open, and no more time or bandwidth is consumed to establish new connections.
Date String Sun, 27 May 2018 08:25:04 GMT

The time at which the response was returned.

x-log-requestid String 5B0A6B60BB6EE39764D458B5

The unique ID of the request. The ID is generated by Log Service.

Examples

Sample requests

PUT /machinegroups/{machineGroup} HTTP/1.1
Host:ali-test-project.cn-hangzhou.log.aliyuncs.com
Content-Type:application/json

{
  "groupName" : "test-machine-group",
  "machineIdentifyType" : "ip",
  "groupType" : "",
  "groupAttribute" : {
    "groupTopic" : "testtopic2",
    "externalName" : "testgroup2"
  },
  "machineList" : [ "192.168.1.1" ]
}

Sample success responses

JSON format

HTTP/1.1 200 OK

Error codes

For a list of error codes, see Service error codes.

HttpStatusCode

ErrorCode

ErrorMessage

Description

404

ProjectNotExist

The Project does not exist : projectName.

The error message returned because the specified project does not exist.

404

MachineGroupNotExist

MachineGroup groupName does not exist.

The error message returned because the specified machine group does not exist.

400

InvalidParameter

invalid group resource json

The error message returned because a specified parameter is invalid.

500

InternalServerError

Specified Server Error Message.

The error message returned because an internal server error has occurred.

For more information, see Common error codes.