1
0
forked from docs/doc-exports
doc-exports/docs/rts/api-ref/rts_03_0046.html
Hasko, Vladimir 354bef10dd RTS API 0930 version (recreate of #289)
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>
2022-12-02 15:11:35 +00:00

187 lines
13 KiB
HTML

<a name="rts_03_0046"></a><a name="rts_03_0046"></a>
<h1 class="topictitle1">Querying the Type of a Resource</h1>
<div id="body1511161465561"><div class="section" id="rts_03_0046__en-us_topic_0057973148_section48372134"><h4 class="sectiontitle">Function</h4><p id="rts_03_0046__en-us_topic_0057973148_p20474043">This API is used to query the type of a resource.</p>
</div>
<div class="section" id="rts_03_0046__en-us_topic_0057973148_section32696025"><h4 class="sectiontitle">URI</h4><p id="rts_03_0046__p76479013312">GET /v1/{project_id}/resource_types/{type_name}</p>
<p id="rts_03_0046__p14922331133219">For details about the parameters, see <a href="#rts_03_0046__table1759528275">Table 1</a>.</p>
<div class="tablenoborder"><a name="rts_03_0046__table1759528275"></a><a name="table1759528275"></a><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0046__table1759528275" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rts_03_0046__row26011272716"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.1"><p id="rts_03_0046__p17762534144716"><strong id="rts_03_0046__b19478126111615">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_0046__p376433420478"><strong id="rts_03_0046__b54291476165">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_0046__p15766123474714"><strong id="rts_03_0046__b519617814160">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_0046__p147683349474"><strong id="rts_03_0046__b530169171612">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rts_03_0046__row10601725277"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="rts_03_0046__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_0046__p0655184916104">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="rts_03_0046__p865694971017">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="rts_03_0046__p13658144921010">Specifies the project ID.</p>
</td>
</tr>
<tr id="rts_03_0046__row205605355223"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="rts_03_0046__p5414363327">type_name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.2 "><p id="rts_03_0046__p124171268327">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="rts_03_0046__p1342216693211">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="rts_03_0046__p1642526163220">Specifies the resource type name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rts_03_0046__en-us_topic_0057973148_section25828772"><h4 class="sectiontitle">Request Parameter</h4><p id="rts_03_0046__p073113131111">N/A</p>
</div>
<div class="section" id="rts_03_0046__en-us_topic_0057973148_section31132360"><h4 class="sectiontitle">Response Parameter</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0046__en-us_topic_0057973148_table47295947" frame="border" border="1" rules="all"><thead align="left"><tr id="rts_03_0046__en-us_topic_0057973148_row61351301"><th align="left" class="cellrowborder" valign="top" width="16.28%" id="mcps1.3.4.2.1.5.1.1"><p id="rts_03_0046__p13701251185014"><strong id="rts_03_0046__b1438182071610">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.28%" id="mcps1.3.4.2.1.5.1.2"><p id="rts_03_0046__p13704145119507"><strong id="rts_03_0046__b11953212160">In</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.44%" id="mcps1.3.4.2.1.5.1.3"><p id="rts_03_0046__p3705151185017"><strong id="rts_03_0046__b18251422191615">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.1.5.1.4"><p id="rts_03_0046__p1371214511507"><strong id="rts_03_0046__b1413982361613">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rts_03_0046__en-us_topic_0057973148_row11565568"><td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.1 "><p id="rts_03_0046__en-us_topic_0057973148_p64395783">attributes</p>
</td>
<td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.2 "><p id="rts_03_0046__p1549441552715">body</p>
</td>
<td class="cellrowborder" valign="top" width="17.44%" headers="mcps1.3.4.2.1.5.1.3 "><p id="rts_03_0046__en-us_topic_0057973148_p48675955">Dict</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.1.5.1.4 "><p id="rts_03_0046__en-us_topic_0057973148_p58971801">Specifies the resource feature dictionary.</p>
</td>
</tr>
<tr id="rts_03_0046__en-us_topic_0057973148_row13307271"><td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.1 "><p id="rts_03_0046__en-us_topic_0057973148_p4147127">properties</p>
</td>
<td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.2 "><p id="rts_03_0046__p15494101513273">body</p>
</td>
<td class="cellrowborder" valign="top" width="17.44%" headers="mcps1.3.4.2.1.5.1.3 "><p id="rts_03_0046__en-us_topic_0057973148_p372979">Dict</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.1.5.1.4 "><p id="rts_03_0046__en-us_topic_0057973148_p31201458">Specifies the resource attributes, including the description and type.</p>
</td>
</tr>
<tr id="rts_03_0046__en-us_topic_0057973148_row53924066"><td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.1 "><p id="rts_03_0046__en-us_topic_0057973148_p5773211">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.2 "><p id="rts_03_0046__p34941715182719">body</p>
</td>
<td class="cellrowborder" valign="top" width="17.44%" headers="mcps1.3.4.2.1.5.1.3 "><p id="rts_03_0046__en-us_topic_0057973148_p64976945">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.1.5.1.4 "><p id="rts_03_0046__en-us_topic_0057973148_p38232849">Specifies the resource type.</p>
</td>
</tr>
<tr id="rts_03_0046__en-us_topic_0057973148_row8551329"><td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.1 "><p id="rts_03_0046__en-us_topic_0057973148_p21569045">support_status</p>
</td>
<td class="cellrowborder" valign="top" width="16.28%" headers="mcps1.3.4.2.1.5.1.2 "><p id="rts_03_0046__p1549481517272">body</p>
</td>
<td class="cellrowborder" valign="top" width="17.44%" headers="mcps1.3.4.2.1.5.1.3 "><p id="rts_03_0046__en-us_topic_0057973148_p2262250">Dict</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.1.5.1.4 "><p id="rts_03_0046__en-us_topic_0057973148_p11568342">Specifies the current status.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rts_03_0046__en-us_topic_0057973148_section11755791"><h4 class="sectiontitle">Request Example</h4><pre class="screen" id="rts_03_0046__screen1061820105217">GET /v1/95d02433133a4c0a87ba6967474a2ad3/resource_types/OS%3A%3AHeat%3A%3ARandomString</pre>
</div>
<div class="section" id="rts_03_0046__en-us_topic_0057973148_section38693256"><h4 class="sectiontitle">Response Example</h4><pre class="screen" id="rts_03_0046__en-us_topic_0057973148_screen55757870112858">{
"attributes": {
"an_attribute": {
"description": "A runtime value of the resource."
}
},
"properties": {
"a_property": {
"constraints": [
{
"description": "Must be between 1 and 255 characters",
"length": {
"max": 255,
"min": 1
}
}
],
"description": "A resource description.",
"required": true,
"type": "string",
"update_allowed": false
}
},
"resource_type": "OS::Heat::AResourceName",
"support_status": {
"message": "A status message",
"status": "SUPPORTED",
"version": "2014.1"
}
}</pre>
</div>
<div class="section" id="rts_03_0046__en-us_topic_0057973148_section12694990"><h4 class="sectiontitle">Return Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rts_03_0046__table01411862119" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Normal return code</caption><thead align="left"><tr id="rts_03_0046__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_0046__rts_03_0020_en-us_topic_0057973117_p13413377194057"><strong id="rts_03_0046__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_0046__rts_03_0020_en-us_topic_0057973117_p12741761194057"><strong id="rts_03_0046__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_0046__rts_03_0020_en-us_topic_0057973117_p25449701194057"><strong id="rts_03_0046__rts_03_0020_en-us_topic_0057973140_b842352706193020">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rts_03_0046__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_0046__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_0046__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_0046__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_0046__table8571828153012" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Error return code</caption><thead align="left"><tr id="rts_03_0046__rts_03_0029_row16955110342"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.7.3.2.4.1.1"><p id="rts_03_0046__rts_03_0029_p129561510144"><strong id="rts_03_0046__rts_03_0029_b1235759101013">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_0046__rts_03_0029_p4959810444"><strong id="rts_03_0046__rts_03_0029_en-us_topic_0057973140_b84235270615814_1">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_0046__rts_03_0029_p9959161020418"><strong id="rts_03_0046__rts_03_0029_en-us_topic_0057973140_b842352706193020">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rts_03_0046__rts_03_0029_row179609103411"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.7.3.2.4.1.1 "><p id="rts_03_0046__rts_03_0029_p896118101840">400</p>
</td>
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.7.3.2.4.1.2 "><p id="rts_03_0046__rts_03_0029_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_0046__rts_03_0029_p9963110146">The server failed to process the request.</p>
</td>
</tr>
<tr id="rts_03_0046__rts_03_0029_row181330274199"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.7.3.2.4.1.1 "><p id="rts_03_0046__rts_03_0029_p18134027201912">401</p>
</td>
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.7.3.2.4.1.2 "><p id="rts_03_0046__rts_03_0029_p1713419274191">Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.7.3.2.4.1.3 "><p id="rts_03_0046__rts_03_0029_p11134162718196">Authorization failed.</p>
</td>
</tr>
<tr id="rts_03_0046__rts_03_0029_row16531631121913"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.7.3.2.4.1.1 "><p id="rts_03_0046__rts_03_0029_en-us_topic_0057973122_p5338333194217">404</p>
</td>
<td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.7.3.2.4.1.2 "><p id="rts_03_0046__rts_03_0029_p125520290312">Not found</p>
</td>
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.7.3.2.4.1.3 "><p id="rts_03_0046__rts_03_0029_en-us_topic_0057973122_p29751790194217">The requested resources are not found.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rts_03_0062.html">Resource Type Management</a></div>
</div>
</div>