Querying Memory Acceleration 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.
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:listDBCacheRules
List
-
-
nosql:instance:listDBCacheRules
-
URI
GET /v3/{project_id}/dbcache/rules
|
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 N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
dbcache_mapping_id |
Yes |
String |
Definition Memory acceleration mapping ID Constraints N/A Range N/A Default Value N/A |
|
rule_id |
No |
String |
Definition ID of a memory acceleration rule Constraints N/A Range N/A Default Value N/A |
|
rule_name |
No |
String |
Definition 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 Range N/A Default Value N/A |
|
source_db_schema |
No |
String |
Definition 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 Range N/A Default Value N/A |
|
source_db_table |
No |
String |
Definition 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 Range N/A Default Value N/A |
|
offset |
No |
String |
Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value must be a non-negative number. Range N/A Default Value 0: The query starts from the first data record. |
|
limit |
No |
String |
Definition Maximum records to be queried Constraints N/A Range 1–100 Default Value 100 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token To obtain this value, call the IAM API for obtaining a user token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Definition Total number of records Range N/A |
|
dbcache_mapping_id |
String |
Definition Memory acceleration mapping ID Range N/A |
|
rules |
Array of objects in Table 5 |
Definition Memory acceleration rule details Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition ID of a memory acceleration rule Range N/A |
|
name |
String |
Definition Name of a memory acceleration rule Range N/A |
|
status |
String |
Definition Status of a memory acceleration rule Range
|
|
source_db_schema |
String |
Definition Source database Range N/A |
|
source_db_table |
String |
Definition Source database table Range N/A |
|
storage_type |
String |
Definition Storage type of the destination database Range
|
|
target_database |
String |
Definition Destination database Range N/A |
|
key_columns |
Array of strings |
Definition Columns used by mapped keys Range N/A |
|
value_columns |
Array of strings |
Definition Columns used by mapped values Range N/A |
|
ttl |
String |
Definition Lifetime of a key (unit: ms) If this parameter is not transferred, default value -1 is used, indicating permanent storage. Range N/A |
|
key_separator |
String |
Definition Key separator of a mapping Range N/A |
|
value_separator |
String |
Definition Value separator of a mapping Range N/A |
|
key_prefix |
String |
Definition Key prefix Range N/A |
Example Requests
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 Responses
Status code: 200
Successful response
{
"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