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)/ Instances/ Querying Memory Mapping Rules and Details

Querying Memory Mapping Rules and Details

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

Function

This API is used to query memory acceleration rules and details.

Constraints

This API can be used only on primary/standby GeminiDB Redis instances.

URI

GET https://{Endpoint}/v3/{project_id}/dbcache/rules

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

dbcache_mapping_id

Yes

String

Memory mapping ID

rule_id

No

String

ID of a memory acceleration rule

rule_name

No

String

Name of a memory acceleration rule If you enter a name starting with an asterisk (*), fuzzy search results are returned. If you enter a valid name, an exact result is returned.

source_db_schema

No

String

Source database name. If you enter a name starting with an asterisk (*), fuzzy search results are returned. If you enter a valid name, an exact result is returned.

source_db_table

No

String

Source database table name. If you enter a name starting with an asterisk (*), fuzzy search results are returned. If you enter a valid name, an exact result is returned.

offset

No

String

Index offset.

If offset is set to N, the resource query starts from the N+1 piece of data. If action is set to filter, offset is 0 by default, the query starts from the first record. The offset value must be a positive integer.

limit

No

String

Maximum records to be queried. The value ranges from 1 to 100. If this parameter is not transferred, the first 100 records are queried by default.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Total number of records

dbcache_mapping_id

String

Memory mapping ID

rules

Array of objects in Table 5

Memory acceleration rule details

Table 5 QueryDBCacheRuleResponse

Parameter

Type

Description

id

String

ID of a memory acceleration rule

name

String

Name of a memory acceleration rule

status

String

Status of a memory acceleration rule

  • normal: A memory acceleration rule is normal.
  • createfail: A memory acceleration rule failed to be created.

source_db_schema

String

Source database

source_db_table

String

Source database table

storage_type

String

Storage type of the destination database. The value is hash.

target_database

String

Destination database

key_columns

Array of strings

Columns used by mapped keys

value_columns

Array of strings

Columns used by mapped values

ttl

String

Lifetime of a key (unit: ms). If this parameter is not transferred, default value -1 is used, indicating permanent storage.

key_separator

String

Key separator of a mapping.

value_separator

String

Value separator of a mapping.

key_prefix

String

Key prefix.

Example Request

Querying the first 10 memory acceleration rules whose mapping ID is 1094e5d3-c140-4095-9b13-242de267c175

GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/dbcache/rule?offset=0&limit=10 
 
{ 
  "dbcache_mapping_id" : "1094e5d3-c140-4095-9b13-242de267c175" 
}

Example Response

Status code: 200

Success.

{ 
  "total_count" : 1, 
  "dbcache_mapping_id" : "0231e002-d278-4df8-815c-8284164168e5", 
  "rules" : [ { 
    "id" : "0231e002-d278-4df8-815c-8284164168e5", 
    "name" : "dbcache_rule_01", 
    "source_db_schema" : "test", 
    "source_db_table" : "student_t", 
    "status" : "normal", 
    "storage_type" : "hash", 
    "target_database" : "0", 
    "key_columns" : [ "sno", "sname", "age" ], 
    "value_columns" : [ "sno", "sname", "age" ], 
    "ttl" : "10000", 
    "key_separator" : ":"
  } ] 
}

Status Codes

See Status Codes.

Error Codes

See Status 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