Querying Memory Mapping Rules and Details
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 /v3/{project_id}/dbcache/rules
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dbcache_mapping_id |
Yes |
String |
Explanation: Memory acceleration mapping ID Constraints: N/A Values: N/A Default value: N/A |
rule_id |
No |
String |
Explanation: ID of a memory acceleration rule Constraints: N/A Values: N/A Default value: N/A |
rule_name |
No |
String |
Explanation: Name of a memory acceleration rule. If the name starts with "", fuzzy search results are returned. If you enter a valid name, an exact result is returned. Constraints: N/A Values: N/A Default value: N/A |
source_db_schema |
No |
String |
Explanation: Source database name. If the name starts with "", fuzzy search results are returned. If you enter a valid name, an exact result is returned. Constraints: N/A Values: N/A Default value: N/A |
source_db_table |
No |
String |
Explanation: Source database table name. If the name starts with "", fuzzy search results are returned. If you enter a valid name, an exact result is returned. Constraints: N/A Values: N/A Default value: N/A |
offset |
No |
String |
Explanation: Index offset. The query starts from the next piece of data indexed by this parameter. Constraints: The value must be a non-negative number. Values: N/A Default value: 0: The query starts from the first data record. |
limit |
No |
String |
Explanation: Maximum records to be queried Constraints: N/A Values: 1–100 Default value: 100 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token To obtain this value, call the IAM API for obtaining a user token. Constraints: N/A Values: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Explanation: Total number of records Values: N/A |
dbcache_mapping_id |
String |
Explanation: Memory acceleration mapping ID Values: N/A |
rules |
Array of objects in Table 5 |
Explanation: Memory acceleration rule details Values: N/A |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation: ID of a memory acceleration rule Values: N/A |
name |
String |
Explanation: Name of a memory acceleration rule Values: N/A |
status |
String |
Explanation: Status of a memory acceleration rule Values:
|
source_db_schema |
String |
Explanation: Source database Values: N/A |
source_db_table |
String |
Explanation: Source database table Values: N/A |
storage_type |
String |
Explanation: Storage type of the destination database Values:
|
target_database |
String |
Explanation: Destination database Values: N/A |
key_columns |
Array of strings |
Explanation: Columns used by mapped keys Values: N/A |
value_columns |
Array of strings |
Explanation: Columns used by mapped values Values: N/A |
ttl |
String |
Explanation: Lifetime of a key (unit: ms) If this parameter is not transferred, default value -1 is used, indicating permanent storage. Values: N/A |
key_separator |
String |
Explanation: Key separator of a mapping Values: N/A |
value_separator |
String |
Explanation: Value separator of a mapping Values: N/A |
key_prefix |
String |
Explanation: Key prefix Values: N/A |
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
Successful request
{ "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.
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