Querying LTS Log Configurations
Function
This API is used to query the LTS configuration of instances.
Constraints
- This function supports only slow query logs and audit logs of GeminiDB Redis instances.
URI
GET https://{Endpoint}/v3/{project_id}/instances/logs/lts-configs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. To obtain this value, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Index offset. The query starts from the next piece of data indexed by this parameter. The offset value must be a positive integer. The default value is 0, indicating that the query starts from the first piece of data. |
limit |
No |
Integer |
Maximum returned records. The value must be an integer ranging from 1 to 100. If this parameter is not transferred, information of 100 instances is queried by default. |
instance_id |
No |
String |
Instance ID used for exact search. |
instance_name |
No |
String |
Instance name used for fuzzy search. |
enterprise_project_id |
No |
String |
Enterprise project ID for exact search. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
X-Language |
No |
String |
Language. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Total instance records. |
instance_lts_configs |
Array of objects |
LTS log configurations of the instance. For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
instance |
object |
Instance information. For details, see Table 6. |
lts_configs |
Array of objects |
LTS log configuration details. If the LTS log stream is not configured, this parameter is not returned. For details, see Table 8. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Instance ID. |
name |
String |
Instance name. |
status |
String |
Instance status. The value can be:
|
mode |
String |
Instance type. The value can be:
|
datastore |
object |
Database information. For details, see Table 7. |
actions |
Array of strings |
Operation that is executed on the instance. |
enterprise_project_id |
String |
Enterprise project ID. |
supported_log_types |
Array of strings |
Supported log type. The value can be: slow_log, indicating that the log is a slow query log. audit_log, indicating that the log is an audit log. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
DB API. |
version |
String |
DB version number. |
Parameter |
Type |
Description |
---|---|---|
log_type |
String |
Log type. The value can be:
|
lts_group_id |
String |
ID of the LTS log group. If enabled is set to false, this parameter indicates the ID of the latest associated LTS log group. |
lts_stream_id |
String |
ID of the LTS log stream. If enabled is set to false, this parameter indicates the ID of the latest associated LTS log stream. |
enabled |
Boolean |
Whether LTS log stream is enabled.
|
Example Requests
GET https://{Endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/logs/lts-configs?limit=10&offset=0&instance_id=362b42f769ff45d884e1866f8ee00bb4in12&instance_name=c316&enterprise_project_id=0
Example Responses
Status code: 200
Success
{ "total_count" : 1, "instance_lts_configs" : [ { "instance" : { "id" : "362b42f769ff45d884e1866f8ee00bb4in12", "name" : "nosql-c316", "mode" : "RedisCluster", "datastore" : { "version" : "5.0", "type" : "redis" }, "status" : "normal", "actions" : [ "GROWING" ], "enterprise_project_id" : "0", "supported_log_types" : [ "slow_log", "audit_log" ] }, "lts_configs" : [ { "log_type" : "slow_log", "lts_group_id" : "65442dd4-b8de-4e9f-8a80-b60aa0698354", "lts_stream_id" : "5992dd29-fd11-4228-a852-5f6e578789c5", "enabled" : true } ] } ] }
Status Codes
For details, see Status Codes.
Error Codes
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