Help Center/ GeminiDB/ API Reference/ API v3/ Logs/ Querying LTS Log Configurations
Updated on 2026-09-22 GMT+08:00

Querying LTS Log Configurations

Function

This API is used to query the LTS configuration of instances.

Constraints

  • This API supports slow query log configuration for the following instance:

    • GeminiDB Redis
  • 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

Table 1 URI parameters

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

Table 2 Query parameters

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

  • This parameter is not transferred for users who have not enabled the enterprise multi-project service.
  • If this parameter is not transferred for a user who has enabled the enterprise multi-project service, the value is the default enterprise project. To obtain the enterprise project ID, see the response parameter enterprise_projects in section "Listing Enterprise Projects" in Enterprise Management API Reference.

Range

N/A

Default Value

N/A

Request Parameters

Table 3 Request header 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

  • zh-cn: Chinese
  • en-us: English

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

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.

Table 5 InstanceLogConfig

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.

Table 6 LogInstanceInfo

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

  • normal: An instance is available.
  • abnormal: An instance is abnormal.
  • creating: An instance is being created.
  • frozen: An instance is frozen.
  • data_disk_full: An instance disk is full.
  • createfail: An instance failed to be created.
  • enlargefail: Instance nodes failed to be added.

mode

String

Definition

Instance type

Range

  • Cluster: proxy cluster GeminiDB Redis instance with classic storage or GeminiDB DynamoDB-Compatible cluster instance with classic storage
  • RedisCluster: Redis Cluster GeminiDB Redis instance with classic storage
  • CloudNativeCluster: GeminiDB Redis cluster instance with cloud native storage or GeminiDB DynamoDB-Compatible cluster instance with cloud native storage
  • RedisReplication: primary/standby GeminiDB Redis instance
  • ReplicaSet: GeminiDB Mongo instance in a replica set

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

  • slow_log: slow query log
  • audit_log: audit log
Table 7 InstancesDatastoreResult

Parameter

Type

Description

type

String

Definition

Database API

Range

  • mongodb: GeminiDB Mongo API
  • redis: GeminiDB Redis API
  • dynamodb: GeminiDB DynamoDB-Compatible API

version

String

Definition

Database version

Range

N/A

Table 8 InstanceLogConfigDetail

Parameter

Type

Description

log_type

String

Definition

Log type

Range

  • slow_log: slow query log
  • audit_log: audit log

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

  • true: enabled
  • false: disabled

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.