Files
doc-exports/docs/bms/api-ref/en-us_topic_0000002340063048.html
wanghuijuan738 69783f9e3e bms api 20241225 version
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com>
Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
2025-07-16 09:58:55 +00:00

73 lines
7.5 KiB
HTML

<a name="EN-US_TOPIC_0000002340063048"></a><a name="EN-US_TOPIC_0000002340063048"></a>
<h1 class="topictitle1">Deleting an SSH Key Pair (Native OpenStack API)</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section63429208111321"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p37492253111321">This API is used to delete a specified SSH key pair based on the key pair name.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section1885963111321"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p25778225111321">DELETE /v2.1/{project_id}/os-keypairs/{keypair_name}</p>
<p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p1323213414577"><a href="#EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_table155384213575">Table 1</a> lists the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_table155384213575"></a><a name="en-us_topic_0060384661_table155384213575"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_table155384213575" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_row1561427572"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.1"><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p7634079111321">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.2"><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p14380623111321">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.3"><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p23979787111321">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_row17561542205718"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p28210634111321">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p3360028111321">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p3726875111321">Specifies the project ID.</p>
<p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p9141450142010">For how to obtain the project ID, see <a href="https://docs.otc.t-systems.com/en-us/api/apiug/apig-en-api-180328009.html" target="_blank" rel="noopener noreferrer">Obtaining Required Information</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_row45619423574"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p32537635111321">keypair_name</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p18302768111321">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p6129221111321">Specifies the key pair name.</p>
<p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p1345123817411">You can obtain the key pair name by calling the <a href="en-us_topic_0000002374101041.html#EN-US_TOPIC_0000002374101041">Querying SSH Key Pairs (Native OpenStack API)</a> API.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section26704907111321"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p586810417919">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section5236724192514"><h4 class="sectiontitle">Example Request</h4><div class="p" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p365524153214">Deleting an SSH key pair (name: KeyPair-123)<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_screen9683066518"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DELETE</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/os-keypairs/keypair-test</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section6307065111321"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_p41110288111321">N/A</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section27037160"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_p1271142611013">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.6.2.1.1.3.1.1"><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_p19735204616177">Returned Values</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.6.2.1.1.3.1.2"><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.6.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_p13735144611178">204</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.6.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_p81516575011">The server has processed the request but did not return any content.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0053158659_p47633965">For details about other returned values, see <a href="en-us_topic_0053158690.html">Status Codes</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0000002340063048__en-us_topic_0060384661_en-us_topic_0106040941_p10243161417491">See <a href="en-us_topic_0107541808.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000002340063044.html">BMS SSH Key Management (Native OpenStack APIs)</a></div>
</div>
</div>