Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
25 KiB
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. For details, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Parameter template name. Fuzzy search is supported. |
type |
Yes |
String |
Template type. Options:
Enumeration values:
|
engine |
No |
String |
Cache engine: Redis. |
engine_version |
No |
String |
Cache version. If the cache engine is Redis, the value can be 3.0/4.0/5.0/6.0. |
cache_mode |
No |
String |
DCS instance type. Options:
|
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 |
Integer |
Number of templates. |
templates |
Array of ConfigTemplatesListInfo objects |
Template details array. |
Parameter |
Type |
Description |
---|---|---|
template_id |
String |
Template ID. |
cache_mode |
String |
DCS instance type. Options:
|
description |
String |
Template description. |
engine |
String |
Cache engine: Redis. |
engine_version |
String |
Cache version. If the cache engine is Redis, the value can be 3.0, 4.0, 5.0, or 6.0. |
name |
String |
Template name. |
product_type |
String |
Edition. Only the basic edition is supported. Value: generic. Enumeration values:
|
storage_type |
String |
Storage type. Enumeration values:
|
type |
String |
Template type. Options:
Enumeration values:
|
created_at |
String |
Time when the template is created. This parameter is valid only in custom parameter templates. The format is 2023-05-10T11:09:35.802Z. |
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, "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.