Querying LTS Log Configurations
Function
This API is used to query the LTS configuration of instances.
Constraints
- This API supports audit log configuration for the following instances:
- Proxy cluster GeminiDB Redis instance with classic storage
- Primary/Standby GeminiDB Redis instance with classic storage
- GeminiDB Redis instance with cloud native storage
- GeminiDB DynamoDB-Compatible
- GeminiDB Mongo
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
gaussdbfornosql:instance:setLogConfigs
Write
-
-
nosql:instances:saveLtsStreams
-
URI
GET /v3/{project_id}/instances/logs/lts-configs
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Definition Index offset Constraints N/A Range The value cannot be negative. Default Value If offset is set to N, the query starts from the N+1 piece of data. The default value is 0, which indicates that the query starts from the first piece of data. |
| limit | No | Integer | Definition Maximum records to be queried Constraints N/A Range 1–100 Default Value If this parameter is not transferred, the first 100 records are queried by default. |
| instance_id | No | String | Definition Instance ID used for exact search. To obtain the value, call the Querying Instances and Details API. If no instance is available, call the Creating an Instance API to create one. Constraints N/A Range N/A Default Value N/A |
| instance_name | No | String | Definition Instance name used for fuzzy search Constraints N/A Range N/A Default Value N/A |
| enterprise_project_id | No | String | Definition Enterprise project ID Constraints
Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Language. Constraints N/A Range
Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total_count | Integer | Definition Total instance records Range N/A |
| instance_lts_configs | Array of Table 5 objects | Definition LTS log configurations of the instance. |
| Parameter | Type | Description |
|---|---|---|
| instance | Table 6 object | Definition Instance information. For details, see Table 6. |
| lts_configs | Array of Table 8 objects | Definition LTS log configuration details. If the LTS log stream is not configured, this parameter is not returned. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating an Instance to create one. Range N/A |
| name | String | Definition Instance name Range N/A |
| status | String | Definition Instance status Range
|
| mode | String | Definition Instance type Range
|
| datastore | Table 7 object | Definition Database information. |
| actions | Array of strings | Definition Actions that are being executed on an instance |
| enterprise_project_id | String | Definition Enterprise project ID Range N/A |
| supported_log_types | Array of strings | Definition Log type
|
| Parameter | Type | Description |
|---|---|---|
| type | String | Definition Database API Range
|
| version | String | Definition Database version Range N/A |
| Parameter | Type | Description |
|---|---|---|
| log_type | String | Definition Log type Range
|
| lts_group_id | String | Definition ID of the LTS log group. If enabled is set to false, this parameter indicates the ID of the latest associated LTS log group. Range N/A |
| lts_stream_id | String | Definition ID of the LTS log stream. If enabled is set to false, this parameter indicates the ID of the latest associated LTS log stream. Range N/A |
| enabled | Boolean | Definition Whether the associated LTS log stream is enabled Range
|
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.
What is your overall rating for this page?
Thank 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