ApplyConfigToMachineGroup

Last Updated: Apr 19, 2017

Applies configuration to the machine group.

Example:

PUT /machinegroups/{GroupName}/configs/{ConfigName}

Request parameters

Name Type Required or Not Description
groupName string Yes The machine group name
ConfigName string Yes Name of the log configuration

Request header

No special request header is available. For details about the public request header of the API, refer to Public Request Header.

Response header

No special response header is available. For details about the public response header of the API, refer to Public Response Header.

Response element

The system returns the HTTP status code 200.

Error code

In addition to general error codes of the API, the following special error codes may be returned:

HTTP Status Code Error Code Error Message
404 GroupNotExist group {GroupName} not exist
404 ConfigNotExist config {ConfigName} not exist
500 InternalServerError internal server error

Example

Request example:
  1. PUT /machinegroups/sample-group/configs/logtail-config-sample
  2. Header :
  3. {
  4. "Content-Length": 0,
  5. "x-log-signaturemethod": "hmac-sha1",
  6. "x-log-bodyrawsize": 0,
  7. "User-Agent": "log-python-sdk-v-0.6.0",
  8. "Host": "ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com",
  9. "Date": "Mon, 09 Nov 2015 09:44:43 GMT",
  10. "x-log-apiversion": "0.6.0",
  11. "Authorization": "LOG 94to3z418yupi6ikawqqd370:skTdJCZXn8QPGNB2jL9k6u1xO1E="
  12. }
Response example:
  1. {
  2. "date": "Mon, 09 Nov 2015 09:44:43 GMT",
  3. "connection": "close",
  4. "x-log-requestid": "56406B0B99248CAA230BA094",
  5. "content-length": "0",
  6. "server": "nginx/1.6.1"
  7. }
Thank you! We've received your feedback.