Applies a Logtail configuration to a machine group.
Operation description
The Host consists of the project name and the Simple Log Service endpoint. You must specify the project in the Host.
Create an AccessKey pair. For more information, see AccessKey pair.
An AccessKey pair for an Alibaba Cloud account provides full access to all API operations. This poses a security risk. For security reasons, we recommend that you create and use a RAM user for API access or routine O&M. The RAM user must have the permissions to manage Simple Log Service resources. For more information, see Create and authorize a RAM user.Identify the name and region of the project. For more information, see Manage projects.
Create a Logtail configuration and obtain its name. For more information, see CreateConfig.
Create a machine group and obtain its name. 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.