Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Logs/ Querying LTS Log Configurations

Querying LTS Log Configurations

Updated on 2024-12-31 GMT+08:00

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

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. To obtain this value, see Obtaining a Project ID.

Table 2 Query parameters

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

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

X-Language

No

String

Language.

Response Parameters

Status code: 200

Table 4 Response body parameters

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.

Table 5 InstanceLogConfig

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.

Table 6 LogInstanceInfo

Parameter

Type

Description

id

String

Instance ID.

name

String

Instance name.

status

String

Instance status. The value can be:

  • normal, indicating that the instance is running normally.
  • abnormal, indicating that the instance is abnormal.
  • creating, indicating that the instance is being created.
  • frozen, indicating that the instance is frozen.
  • data_disk_full, indicating that the instance disk is full.
  • createfail, indicating that the instance failed to be created.
  • enlargefail, indicating that nodes failed to be added to the instance.

mode

String

Instance type. The value can be:

  • RedisCluster: GeminiDB Redis instance in proxy and Redis clusters
  • RedisReplication: primary/standby GeminiDB Redis instance
  • ReplicaSet: GeminiDB MongoDB instance in a replica set

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.

Table 7 InstancesDatastoreResult

Parameter

Type

Description

type

String

DB API.

version

String

DB version number.

Table 8 InstanceLogConfigDetail

Parameter

Type

Description

log_type

String

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.

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.

  • 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback