30 KiB
- original_name
ListConfigTemplates_0.html
Viewing Parameter Templates
Function
This API is used to query parameter templates of a tenant, and allows you to specify query criteria.
URI
GET /v2/{project_id}/config-templates
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | No | String | Parameter template name. Fuzzy search is supported. |
template_id | No | String | Template ID. |
type | Yes | String | Template type. Enumeration values:
|
engine | No | String | Cache engine: Redis. |
engine_version | No | String | Cache version. If the cache engine is Redis, the value can be 4.0, 5.0, or 6.0. |
cache_mode | No | String | DCS instance type. The value can be:
|
description | No | String | Description of the template. |
offset | No | Integer | Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
limit | No | Integer | Number of records displayed on each page. The minimum value is 1. The maximum value is 1000*. If this parameter is not specified, 10 records are displayed on each page by default. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
template_num | Number | Number of templates. |
config_templates | Array of ConfigTemplatesListInfo <listconfigtemplates_0__response_configtemplateslistinfo> objects |
Template details array. |
Parameter | Type | Description |
---|---|---|
template_id | String | Template ID. |
cache_mode | String | DCS instance type. The value can be:
|
description | String | Description of the template. |
engine | String | Cache engine: Redis. |
engine_version | String | Cache version. If the cache engine is Redis, the value can be 4.0, 5.0, or 6.0. |
name | String | Template name. |
product_type | String | Product edition. The value can be:
Enumeration values:
|
storage_type | String | Storage type. The value can be:
Enumeration values:
|
type | String | Template type. |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_msg | String | Error information. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 401
Parameter | Type | Description |
---|---|---|
error_msg | String | Error information. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 403
Parameter | Type | Description |
---|---|---|
error_msg | String | Error information. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 404
Parameter | Type | Description |
---|---|---|
error_msg | String | Error information. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 500
Parameter | Type | Description |
---|---|---|
error_msg | String | Error information. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Example Requests
GET https://{dcs_endpoint}/v2/{project_id}/config-templates?type=sys&engine=Redis&engine_version=5.0&cache_mode=ha&offset=0&limit=10
Example Responses
Status code: 200
Parameter templates listed.
{
"template_num" : 1,
"config_templates" : [ {
"template_id" : "6",
"cache_mode" : "single",
"description" : null,
"engine" : "Redis",
"engine_version" : "4.0",
"name" : "Default-Redis-4.0-single-generic-DRAM",
"product_type" : "generic",
"storage_type" : "DRAM",
"type" : "sys"
} ]
}
Status code: 400
Invalid request.
{
"error_code" : "111400063",
"error_msg" : "Invalid {0} parameter in the request."
}
Status Codes
Status Code | Description |
---|---|
200 | Parameter templates listed. |
400 | Invalid request. |
401 | Invalid authentication information. |
403 | Request rejected. |
404 | The requested resource could not be found. |
500 | Internal service error. |
Error Codes
See Error Codes <errorcode>
.