Enabling Log Ingestion to LTS for Instances in Batches (RDS for MySQL)
Function
This API is used to enable log ingestion to LTS for instances in batches.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
- You can configure log streams for a maximum of 20 instances at a time. If you configure log streams for audit logs, you can specify a maximum of 10 instances at a time.
- You cannot repeatedly configure LTS log streams for the same type of logs of an instance in a single request.
- Each log stream supports only one log type. For example, if audit logs have been configured for a log stream, slow query logs or error logs cannot be configured for this log stream. You cannot configure multiple log types for a given log stream in a single request.
- When configuring LTS log streams for audit logs, RDS for MySQL DB instances must meet the following kernel version requirements:
- 5.6: 5.6.43 or later for instances using cloud disks
- 5.7: 5.7.23 or later for instances using cloud disks
- 8.0: all kernel versions
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
engine
Yes
Definition
Instance engine to be queried.
Constraints
Only the MySQL engine is supported.
Range
mysql
Default Value
N/A
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
log_configs |
Yes |
Array of objects |
Definition Instance log configurations. For details, see Table 3. Constraints N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Definition Instance ID. Constraints N/A Range N/A Default Value N/A |
log_type |
Yes |
String |
Definition Log type. Constraints N/A Range
Default Value N/A |
lts_group_id |
Yes |
String |
Definition LTS log group ID. Constraints N/A Range N/A Default Value N/A |
lts_stream_id |
Yes |
String |
Definition LTS log stream ID. Constraints N/A Range N/A Default Value N/A |
Example Request
Enable log ingestion to LTS for RDS for MySQL instances in batches.
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/mysql/instances/logs/lts-configs { "log_configs": [ { "instance_id": "2b1d07d2c9c04d62a95d627c607dbbfein01", "log_type": "audit_log", "lts_group_id": "8aa6cc4e-847b-48a0-ab26-d0c07c95c7ee", "lts_stream_id": "c0be9298-95c5-48d7-af99-b5b2aeebb433" } ] }
Response
- Example normal response
{}
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot