Applies a Logtail configuration to a machine group.
Operation description
Prerequisites
The Host consists of the project name and the Simple Log Service endpoint. You must specify the project in the Host.
An AccessKey is created and obtained. For more information, see AccessKey pair.
The AccessKey of an Alibaba Cloud account has full access to all APIs, which poses a high security threat. For security reasons, we recommend that you create and use a RAM user to make API calls or perform Operations and Maintenance (O&M). The RAM user must have the required permissions to manage Simple Log Service resources. For more information, see Create and authorize a RAM user.The name and region of the project are determined. For more information, see Manage projects.
A Logtail configuration is created and its name is obtained. For more information, see CreateConfig.
A machine group is created and its name is obtained. For more information, see CreateMachineGroup.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:ApplyConfigToGroup |
update |
*Project
*Project
|
|
None |
Request syntax
PUT /machinegroups/{machineGroup}/configs/{configName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| machineGroup |
string |
Yes |
The name of the machine group. |
sample-group |
| configName |
string |
Yes |
The name of the Logtail configuration. |
logtail-config-sample |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
Yes |
The name of the project. |
ali-test-project |
Response elements
|
Element |
Type |
Description |
Example |
None defined.
Examples
Success response
JSON format
{}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.