Files
doc-exports/docs/dcs/api-ref/CreateCustomTemplate.html
chenjunjie 63188fad94 DCS API 20240705 version
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Co-authored-by: chenjunjie <chenjunjie@huawei.com>
Co-committed-by: chenjunjie <chenjunjie@huawei.com>
2025-03-17 15:42:06 +00:00

390 lines
28 KiB
HTML

<a name="CreateCustomTemplate"></a><a name="CreateCustomTemplate"></a>
<h1 class="topictitle1">Creating a Custom Template</h1>
<div id="body1708331107508"><div class="section" id="CreateCustomTemplate__section1405113054819"><h4 class="sectiontitle">Function</h4><p id="CreateCustomTemplate__p1840583094818">This API is used to create a custom template.</p>
</div>
<div class="section" id="CreateCustomTemplate__section6405123034813"><h4 class="sectiontitle">URI</h4><p id="CreateCustomTemplate__p1140510302485">POST /v2/{project_id}/config-templates</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__table17405143017484" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row13405163094812"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreateCustomTemplate__p1640563084818">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreateCustomTemplate__p154064304484">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreateCustomTemplate__p114061130124812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreateCustomTemplate__p440617308488">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row7405183014814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreateCustomTemplate__p34062030134813">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreateCustomTemplate__p4406143024818">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreateCustomTemplate__p16406103064818">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreateCustomTemplate__p2406163017483">Project ID. For details, see <a href="dcs-api-0312045.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCustomTemplate__section104061430114813"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__request_CreateCustomTemplateBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row1240663004817"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreateCustomTemplate__p64071630144820">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreateCustomTemplate__p840703094816">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreateCustomTemplate__p74071330184816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreateCustomTemplate__p8407153044816">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row2406203044820"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p144077301482">template_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p14407103014810">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p16407133016489">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p1040718303489">Default template ID.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row94061830154810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p12407123019487">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p19408230204812">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p640803020488">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p8408123034813">Template name.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row440673064812"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p1740810302488">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p18408133018481">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p64081530154818">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p24083300489">Template type. Options:</p>
<ul id="CreateCustomTemplate__ul10408630104819"><li id="CreateCustomTemplate__li204081930134816"><strong id="CreateCustomTemplate__b5408163015487">sys</strong>: default template</li><li id="CreateCustomTemplate__li134086302487"><strong id="CreateCustomTemplate__b144081930144812">user</strong>: custom template</li></ul>
</td>
</tr>
<tr id="CreateCustomTemplate__row1540613094811"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p0408153015483">engine</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p1540843004814">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p1240823034818">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p11408103034815">Cache engine: Redis.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row140773094810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p17409230174812">cache_mode</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p3409123024819">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p134096301484">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p54091530104820">DCS instance type. The value range is as follows:</p>
<ul id="CreateCustomTemplate__ul2409143024814"><li id="CreateCustomTemplate__li8409163014489"><strong id="CreateCustomTemplate__b740953017480">single</strong>: single-node</li><li id="CreateCustomTemplate__li7409193019484"><strong id="CreateCustomTemplate__b13409230134820">ha</strong>: master/standby</li><li id="CreateCustomTemplate__li19409123019481"><strong id="CreateCustomTemplate__b3409830204819">cluster</strong>: Redis Cluster</li><li id="CreateCustomTemplate__li440973015481"><strong id="CreateCustomTemplate__b0409930194817">proxy</strong>: Proxy Cluster</li><li id="CreateCustomTemplate__li740903018487"><strong id="CreateCustomTemplate__b8409193054817">ha_rw_split</strong>: read/write splitting</li></ul>
</td>
</tr>
<tr id="CreateCustomTemplate__row240763074818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p14091330134820">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p19410230114815">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p7410163015488">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p17410173024812">Template description.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row1140733010485"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p941010309486">engine_version</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p20410163094819">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p10410133044810">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p104101630194819">Cache version.</p>
<p id="CreateCustomTemplate__p1410830174813">If the cache engine is Redis, the version can be 4.0/5.0/6.0/7.0.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row13407193011484"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateCustomTemplate__p174101530144820">params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateCustomTemplate__p15410193019488">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateCustomTemplate__p5410203014482">Map&lt;String,String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateCustomTemplate__p194102030144814">Parameter configuration.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCustomTemplate__section6410163015488"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateCustomTemplate__p3411930184817"><strong id="CreateCustomTemplate__b1541103044813">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__response_CreateCustomTemplateResp" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row104111830194814"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="CreateCustomTemplate__p64118306488">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="CreateCustomTemplate__p14111630204816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="CreateCustomTemplate__p184111230114819">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row17411130174817"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateCustomTemplate__p941163015488">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateCustomTemplate__p3411163094815">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateCustomTemplate__p1411203012488">Template ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCustomTemplate__p11411193044813"><strong id="CreateCustomTemplate__b441133014487">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__response_ErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row1441133084815"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="CreateCustomTemplate__p1441213307484">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="CreateCustomTemplate__p164121309483">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="CreateCustomTemplate__p1741203011486">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row124121430134813"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateCustomTemplate__p1341213014482">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateCustomTemplate__p164127306487">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateCustomTemplate__p184121430174812">Error information.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row104120301489"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateCustomTemplate__p114122300481">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateCustomTemplate__p114121030134810">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateCustomTemplate__p1241233044817">Error code.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row1412630164815"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateCustomTemplate__p1412103024811">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateCustomTemplate__p174121302487">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateCustomTemplate__p1041313094815">Extended error information. This parameter is not used currently and is set to null.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCustomTemplate__p11413173084813"><strong id="CreateCustomTemplate__b19413830174820">Status code: 401</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__table124131830174811" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row14413183014820"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="CreateCustomTemplate__p174148303489">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="CreateCustomTemplate__p18414930104813">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="CreateCustomTemplate__p13414183020485">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row141323019485"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateCustomTemplate__p5414173011483">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateCustomTemplate__p15415153020485">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateCustomTemplate__p194151330144810">Error information.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row541333064819"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateCustomTemplate__p4415123012484">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateCustomTemplate__p74152030114811">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateCustomTemplate__p241583074814">Error code.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row4413143054817"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateCustomTemplate__p5415163014817">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateCustomTemplate__p1941543064810">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateCustomTemplate__p74154303483">Extended error information. This parameter is not used currently and is set to null.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCustomTemplate__p6415530154815"><strong id="CreateCustomTemplate__b14415173024812">Status code: 403</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__table1341543054819" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row24151930114811"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.1"><p id="CreateCustomTemplate__p13416930134818">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.2"><p id="CreateCustomTemplate__p64161330144816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.9.2.4.1.3"><p id="CreateCustomTemplate__p741623017482">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row14151130194819"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateCustomTemplate__p12416183044810">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateCustomTemplate__p6416123013487">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateCustomTemplate__p44161308488">Error information.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row7415123044812"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateCustomTemplate__p441611307489">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateCustomTemplate__p1141616309483">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateCustomTemplate__p17416123084812">Error code.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row1041573019486"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateCustomTemplate__p741633044811">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateCustomTemplate__p124165304488">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateCustomTemplate__p19416730204813">Extended error information. This parameter is not used currently and is set to null.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCustomTemplate__p64161730134814"><strong id="CreateCustomTemplate__b4416153054814">Status code: 404</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__table1641716303485" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row741733024814"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.1"><p id="CreateCustomTemplate__p20417103084818">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.2"><p id="CreateCustomTemplate__p15417173011482">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.11.2.4.1.3"><p id="CreateCustomTemplate__p6417173004814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row16417153015481"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="CreateCustomTemplate__p2417123018482">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="CreateCustomTemplate__p11417330174816">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="CreateCustomTemplate__p5417103054817">Error information.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row1541753013487"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="CreateCustomTemplate__p2417103011482">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="CreateCustomTemplate__p4417143044815">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="CreateCustomTemplate__p741803024816">Error code.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row17417163024819"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="CreateCustomTemplate__p241814305487">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="CreateCustomTemplate__p1841843034811">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="CreateCustomTemplate__p16418630154815">Extended error information. This parameter is not used currently and is set to null.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateCustomTemplate__p4418193054818"><strong id="CreateCustomTemplate__b104182308486">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__table1241823014485" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreateCustomTemplate__row9418173084815"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.13.2.4.1.1"><p id="CreateCustomTemplate__p1441816300487">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.13.2.4.1.2"><p id="CreateCustomTemplate__p1141853014812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.13.2.4.1.3"><p id="CreateCustomTemplate__p24181930154816">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row1841818301484"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.1 "><p id="CreateCustomTemplate__p1418930184813">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.2 "><p id="CreateCustomTemplate__p134181530104816">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.13.2.4.1.3 "><p id="CreateCustomTemplate__p104191930124816">Error information.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row7418103084813"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.1 "><p id="CreateCustomTemplate__p741918304488">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.2 "><p id="CreateCustomTemplate__p7419123019480">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.13.2.4.1.3 "><p id="CreateCustomTemplate__p1641993015482">Error code.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row441811307485"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.1 "><p id="CreateCustomTemplate__p1241933010489">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.2 "><p id="CreateCustomTemplate__p4419203054813">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.13.2.4.1.3 "><p id="CreateCustomTemplate__p141903020488">Extended error information. This parameter is not used currently and is set to null.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCustomTemplate__section2419163024817"><h4 class="sectiontitle">Example Requests</h4><p id="CreateCustomTemplate__p1419133019481">Creating a single-node, Redis 5.0 custom template</p>
<pre class="screen" id="CreateCustomTemplate__screen1541993064811">POST https://{dcs_endpoint}/v2/{project_id}/config-templates
{
"name" : "Test",
"cache_mode" : "single",
"description" : "Test",
"engine" : "Redis",
"engine_version" : "5.0",
"params" : {
"latency-monitor-threshold" : 15
},
"template_id" : "11",
"type" : "sys"
}</pre>
</div>
<div class="section" id="CreateCustomTemplate__section142003024812"><h4 class="sectiontitle">Example Responses</h4><p id="CreateCustomTemplate__p34201530134813"><strong id="CreateCustomTemplate__b5420203084818">Status code: 200</strong></p>
<p id="CreateCustomTemplate__p74206305482">The custom template is created successfully.</p>
<pre class="screen" id="CreateCustomTemplate__screen1242033020488">{
"id" : "efb1ba06-d3cd-4a77-9173-16f70f2d1343"
}</pre>
<p id="CreateCustomTemplate__p11420163017488"><strong id="CreateCustomTemplate__b1942193015480">Status code: 400</strong></p>
<p id="CreateCustomTemplate__p1342183011486">Invalid request.</p>
<pre class="screen" id="CreateCustomTemplate__screen1142112307483">{
"error_code" : "111400063",
"error_msg" : "Invalid {0} parameter in the request."
}</pre>
</div>
<div class="section" id="CreateCustomTemplate__section13421133019487"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateCustomTemplate__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateCustomTemplate__row14211030164815"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreateCustomTemplate__p4421630104819">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreateCustomTemplate__p1942113304487">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateCustomTemplate__row12421173054813"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCustomTemplate__p8421030144813">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCustomTemplate__p342253054814">The custom template is created successfully.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row10421130124812"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCustomTemplate__p242293010483">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCustomTemplate__p742215306485">Invalid request.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row16421230184816"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCustomTemplate__p14225305482">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCustomTemplate__p542243018483">Invalid authentication information.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row19421113020488"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCustomTemplate__p10422830114811">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCustomTemplate__p042263010480">Request rejected.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row11421163013483"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCustomTemplate__p184221730114816">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCustomTemplate__p1442213010486">The requested resource could not be found.</p>
</td>
</tr>
<tr id="CreateCustomTemplate__row14421133064817"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateCustomTemplate__p1442233016483">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateCustomTemplate__p1642253054818">Internal service error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateCustomTemplate__section15422530194818"><h4 class="sectiontitle">Error Codes</h4><p id="CreateCustomTemplate__p1942243074810">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ConfigTemplatesManagement.html">Template Management</a></div>
</div>
</div>