Viewing Parameter Templates
Function
This API is used to query parameter templates of a tenant, and allows you to specify query criteria.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/config-templates
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: N/A. Value range: N/A. Default value: N/A. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Parameter description: Parameter template name. Fuzzy search is supported. Constraints: N/A. Value range: N/A. Default value: N/A. |
type |
Yes |
String |
Parameter description: Template type. Constraints: N/A. Value range:
Default value: N/A. |
engine |
No |
String |
Parameter description: Cache engine. Constraints: N/A. Value range: Redis Default value: N/A. |
engine_version |
No |
String |
Parameter description: Cache version. Constraints: N/A Value range: If the cache engine is Redis, the version can be 4.0/5.0/6.0/7.0. Default value: N/A |
cache_mode |
No |
String |
Parameter description: DCS instance type. Constraints: N/A. Value range:
Default value: N/A. |
offset |
No |
Integer |
Parameter description: Offset, which is the position where the query starts. Constraints: N/A. Value range: ≥ 0 Default value: 0 |
limit |
No |
Integer |
Parameter description: Number of records displayed on each page. Constraints: N/A. Value range: 1–1,000 Default value: 10 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
template_num |
Integer |
Parameter description: Number of templates. Value range: N/A. |
templates |
Array of ConfigTemplatesListInfo objects |
Parameter description: Template details array. Value range: N/A. |
Parameter |
Type |
Description |
---|---|---|
template_id |
String |
Parameter description: Template ID. Value range: N/A. |
cache_mode |
String |
Parameter description: DCS instance type. Value range:
|
description |
String |
Parameter description: Template description. Value range: N/A. |
engine |
String |
Parameter description: Cache engine. Value range: Redis |
engine_version |
String |
Parameter description: Cache version. Value range: If the cache engine is Redis, the version can be 4.0/5.0/6.0/7.0. |
name |
String |
Parameter description: Template name. Value range: N/A. |
product_type |
String |
Parameter description: Edition. Value range: Only the basic edition is supported. Value: generic. |
storage_type |
String |
Parameter description: Storage type. Value range:
|
type |
String |
Parameter description: Template type. Value range:
|
created_at |
String |
Parameter description: Time when the template is created. This parameter is valid only in custom parameter templates. The format is 2023-05-10T11:09:35.802Z. Value range: N/A. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.