forked from laiweijian4/doc-exports
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
188 lines
14 KiB
HTML
188 lines
14 KiB
HTML
<a name="rts_03_0044"></a><a name="rts_03_0044"></a>
|
|
|
|
<h1 class="topictitle1">Validating a Template</h1>
|
|
<div id="body1511161465561"><div class="section" id="rts_03_0044__en-us_topic_0057973146_section55668057"><h4 class="sectiontitle">Function</h4><p id="rts_03_0044__en-us_topic_0057973146_p36612450">This API is used to check whether the template syntax meets requirements.</p>
|
|
</div>
|
|
<div class="section" id="rts_03_0044__en-us_topic_0057973146_section31250469"><h4 class="sectiontitle">URI</h4><p id="rts_03_0044__p76479013312">POST /v1/{project_id}/validate</p>
|
|
<p id="rts_03_0044__p16876659162519">For details about the parameters, see <a href="#rts_03_0044__table1759528275">Table 1</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="rts_03_0044__table1759528275"></a><a name="table1759528275"></a><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0044__table1759528275" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rts_03_0044__row26011272716"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.1"><p id="rts_03_0044__p17762534144716"><strong id="rts_03_0044__b395116494294">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.2"><p id="rts_03_0044__p376433420478"><strong id="rts_03_0044__b141618517295">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.3"><p id="rts_03_0044__p15766123474714"><strong id="rts_03_0044__b39743512297">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.4"><p id="rts_03_0044__p147683349474"><strong id="rts_03_0044__b20818115202910">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rts_03_0044__row10601725277"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="rts_03_0044__p1765464961019">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.2 "><p id="rts_03_0044__p0655184916104">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="rts_03_0044__p865694971017">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="rts_03_0044__p13658144921010">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="rts_03_0044__en-us_topic_0057973146_section12818767"><h4 class="sectiontitle">Request Parameter</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0044__en-us_topic_0057973146_table48689546112557" frame="border" border="1" rules="all"><thead align="left"><tr id="rts_03_0044__en-us_topic_0057973146_row55759686112557"><th align="left" class="cellrowborder" valign="top" width="13.131313131313133%" id="mcps1.3.3.2.1.6.1.1"><p id="rts_03_0044__p13701251185014"><strong id="rts_03_0044__b183610173016">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.131313131313133%" id="mcps1.3.3.2.1.6.1.2"><p id="rts_03_0044__p13704145119507"><strong id="rts_03_0044__b16101432306">In</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.141414141414144%" id="mcps1.3.3.2.1.6.1.3"><p id="rts_03_0044__p3705151185017"><strong id="rts_03_0044__b995053153013">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.141414141414144%" id="mcps1.3.3.2.1.6.1.4"><p id="rts_03_0044__p18709155145010"><strong id="rts_03_0044__b77202420308">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.45454545454546%" id="mcps1.3.3.2.1.6.1.5"><p id="rts_03_0044__p1371214511507"><strong id="rts_03_0044__b1858155123015">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rts_03_0044__en-us_topic_0057973146_row11737621112557"><td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.6.1.1 "><p id="rts_03_0044__en-us_topic_0057973146_p454014411266">environment</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.6.1.2 "><p id="rts_03_0044__p48311342492">body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.3.2.1.6.1.3 "><p id="rts_03_0044__en-us_topic_0057973146_p3220736611266">Json</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.3.2.1.6.1.4 "><p id="rts_03_0044__en-us_topic_0057973146_p5865989011266">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.45454545454546%" headers="mcps1.3.3.2.1.6.1.5 "><p id="rts_03_0044__en-us_topic_0057973146_p5383061711266">Specifies information about the environment for creating a stack.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rts_03_0044__en-us_topic_0057973146_row12332919112557"><td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.6.1.1 "><p id="rts_03_0044__en-us_topic_0057973146_p5094376511266">files</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.6.1.2 "><p id="rts_03_0044__p883114484910">body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.3.2.1.6.1.3 "><p id="rts_03_0044__en-us_topic_0057973146_p3280427511266">Json</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.3.2.1.6.1.4 "><p id="rts_03_0044__en-us_topic_0057973146_p3990058511266">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.45454545454546%" headers="mcps1.3.3.2.1.6.1.5 "><p id="rts_03_0044__en-us_topic_0057973146_p1072195211266">Specifies the files referenced in the environment.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rts_03_0044__en-us_topic_0057973146_row51273737112557"><td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.6.1.1 "><p id="rts_03_0044__en-us_topic_0057973146_p3167507011266">template</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.6.1.2 "><p id="rts_03_0044__p12831648490">body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.3.2.1.6.1.3 "><p id="rts_03_0044__en-us_topic_0057973146_p1554385311266">Json</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.3.2.1.6.1.4 "><p id="rts_03_0044__en-us_topic_0057973146_p5109256911266">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.45454545454546%" headers="mcps1.3.3.2.1.6.1.5 "><p id="rts_03_0044__en-us_topic_0057973146_p4485738511266">Specifies the stack template on which operations will be performed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="rts_03_0044__en-us_topic_0057973146_section14714731132717"><h4 class="sectiontitle">Response Parameter</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0044__en-us_topic_0057973146_table62617577" frame="border" border="1" rules="all"><thead align="left"><tr id="rts_03_0044__en-us_topic_0057973146_row62584900"><th align="left" class="cellrowborder" valign="top" width="15.291529152915292%" id="mcps1.3.4.2.1.5.1.1"><p id="rts_03_0044__p2085283513568"><strong id="rts_03_0044__b479984903210">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.291529152915292%" id="mcps1.3.4.2.1.5.1.2"><p id="rts_03_0044__p4854835105614"><strong id="rts_03_0044__b59111051133213">In</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.471647164716472%" id="mcps1.3.4.2.1.5.1.3"><p id="rts_03_0044__p1856133585614"><strong id="rts_03_0044__b167835319326">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.945294529452944%" id="mcps1.3.4.2.1.5.1.4"><p id="rts_03_0044__p188601352562"><strong id="rts_03_0044__b5392154133211">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rts_03_0044__en-us_topic_0057973146_row12941756"><td class="cellrowborder" valign="top" width="15.291529152915292%" headers="mcps1.3.4.2.1.5.1.1 "><p id="rts_03_0044__en-us_topic_0057973146_p41649354">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.291529152915292%" headers="mcps1.3.4.2.1.5.1.2 "><p id="rts_03_0044__p1847571334916">body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.471647164716472%" headers="mcps1.3.4.2.1.5.1.3 "><p id="rts_03_0044__en-us_topic_0057973146_p18154524">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.945294529452944%" headers="mcps1.3.4.2.1.5.1.4 "><p id="rts_03_0044__en-us_topic_0057973146_p60712366">Describes the template.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rts_03_0044__en-us_topic_0057973146_row9540387"><td class="cellrowborder" valign="top" width="15.291529152915292%" headers="mcps1.3.4.2.1.5.1.1 "><p id="rts_03_0044__en-us_topic_0057973146_p34573872">parameters</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.291529152915292%" headers="mcps1.3.4.2.1.5.1.2 "><p id="rts_03_0044__p34756139491">body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.471647164716472%" headers="mcps1.3.4.2.1.5.1.3 "><p id="rts_03_0044__en-us_topic_0057973146_p49020229">Dict</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.945294529452944%" headers="mcps1.3.4.2.1.5.1.4 "><p id="rts_03_0044__en-us_topic_0057973146_p36050601">Specifies the template parameters.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="rts_03_0044__en-us_topic_0057973146_section48260040"><h4 class="sectiontitle">Request Example</h4><pre class="screen" id="rts_03_0044__en-us_topic_0057973146_screen34417608">POST /v1/95d02433133a4c0a87ba6967474a2ad3/validate
|
|
{
|
|
"template": "heat_template_version: 2014-10-16\ndescription: Create a serious of random string\nparameters:\n length:\n type: number\n default: 4\nresources:\n random:\n type: OS::Heat::RandomString\n properties:\n length: { get_param: length }",
|
|
"environment": {},
|
|
"files": {}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="rts_03_0044__en-us_topic_0057973146_section31687177"><h4 class="sectiontitle">Response Example</h4><pre class="screen" id="rts_03_0044__en-us_topic_0057973146_screen8203057112636">{
|
|
"Description": "Create a serious of random string",
|
|
"Parameters": {
|
|
"length": {
|
|
"Default": 4,
|
|
"NoEcho": "false",
|
|
"Type": "Number",
|
|
"Description": "",
|
|
"Label": "length"
|
|
}
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="rts_03_0044__en-us_topic_0057973146_section16749139"><h4 class="sectiontitle">Return Code</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0044__table01411862119" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Normal return code</caption><thead align="left"><tr id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_row42419326194057"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.7.2.2.4.1.1"><p id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_p13413377194057"><strong id="rts_03_0044__rts_03_0020_b14910172512114">Return Code</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26%" id="mcps1.3.7.2.2.4.1.2"><p id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_p12741761194057"><strong id="rts_03_0044__rts_03_0020_en-us_topic_0057973140_b84235270615814_1">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51%" id="mcps1.3.7.2.2.4.1.3"><p id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_p25449701194057"><strong id="rts_03_0044__rts_03_0020_en-us_topic_0057973140_b842352706193020">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_row48159894194057"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.7.2.2.4.1.1 "><p id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_p8637307194057">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.7.2.2.4.1.2 "><p id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_p28533244194057">OK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.7.2.2.4.1.3 "><p id="rts_03_0044__rts_03_0020_en-us_topic_0057973117_p29491459194057">Request was successful.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0044__table19512103414" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Error return code</caption><thead align="left"><tr id="rts_03_0044__row16955110342"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.7.3.2.4.1.1"><p id="rts_03_0044__p129561510144"><strong id="rts_03_0044__b1664793453319">Return Code</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26%" id="mcps1.3.7.3.2.4.1.2"><p id="rts_03_0044__p4959810444"><strong id="rts_03_0044__b27301335193317">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51%" id="mcps1.3.7.3.2.4.1.3"><p id="rts_03_0044__p9959161020418"><strong id="rts_03_0044__b1235113373334">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rts_03_0044__row179609103411"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.7.3.2.4.1.1 "><p id="rts_03_0044__p896118101840">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.7.3.2.4.1.2 "><p id="rts_03_0044__p1296211015416">Bad Request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.7.3.2.4.1.3 "><p id="rts_03_0044__p9963110146">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rts_03_0044__row292341875215"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.7.3.2.4.1.1 "><p id="rts_03_0044__p19789174972712">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.7.3.2.4.1.2 "><p id="rts_03_0044__p779364918272">Internal Server Error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.7.3.2.4.1.3 "><p id="rts_03_0044__p196546319198">Failed to complete the request because of an internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rts_03_0042.html">Template Management</a></div>
|
|
</div>
|
|
</div>
|
|
|