doc-exports/docs/waf/api-ref/waf_02_0022.html
Li, Qiao 914011d51b waf_api_1109
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Li, Qiao <qiaoli@huawei.com>
Co-committed-by: Li, Qiao <qiaoli@huawei.com>
2022-11-16 15:31:27 +00:00

150 lines
11 KiB
HTML

<a name="waf_02_0022"></a><a name="waf_02_0022"></a>
<h1 class="topictitle1">Changing the Name of a Certificate</h1>
<div id="body1547177586968"><div class="section" id="waf_02_0022__section5909008"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0022__p25898556">This API is used to change the name of a certificate.</p>
</div>
<div class="section" id="waf_02_0022__section53181073"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0022__ul17408302"><li id="waf_02_0022__li22456997">URI format<p id="waf_02_0022__p786381"><a name="waf_02_0022__li22456997"></a><a name="li22456997"></a>PUT /v1/{project_id}/waf/certificate/{certificate_id}</p>
</li><li id="waf_02_0022__li1631262617234">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0022__table6333726152318" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0022__row16331202682317"><th align="left" class="cellrowborder" valign="top" width="19.538046195380463%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="waf_02_0022__p73311326162320"><strong id="waf_02_0022__b227061152517">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.31766823317668%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="waf_02_0022__p1333162616234"><strong id="waf_02_0022__b1977525605112">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="waf_02_0022__p18331102622313"><strong id="waf_02_0022__b101611134259">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.796020397960206%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="waf_02_0022__p1133116269234"><strong id="waf_02_0022__b7146161414255">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0022__row173335264239"><td class="cellrowborder" valign="top" width="19.538046195380463%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0022__p13311626142316">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.31766823317668%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0022__p1033312692319">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0022__p933392672311">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0022__p73336265234">Specifies the project ID.</p>
</td>
</tr>
<tr id="waf_02_0022__row24271533411"><td class="cellrowborder" valign="top" width="19.538046195380463%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0022__p14381533410">certificate_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.31766823317668%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0022__p94315154342">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0022__p1844191515349">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0022__p3441915153410">Specifies the certificate ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="waf_02_0022__section8867609"><h4 class="sectiontitle">Request</h4><p id="waf_02_0022__p208791751123316">Request parameters</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0022__table848611508595" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0022__row848645016598"><th align="left" class="cellrowborder" valign="top" width="20.580000000000002%" id="mcps1.3.3.3.2.5.1.1"><p id="waf_02_0022__p14736601303"><strong id="waf_02_0022__b105911739192512">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.2%" id="mcps1.3.3.3.2.5.1.2"><p id="waf_02_0022__p1738801502"><strong id="waf_02_0022__b1977525605112_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.06%" id="mcps1.3.3.3.2.5.1.3"><p id="waf_02_0022__p197387015014"><strong id="waf_02_0022__b101611134259_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.16%" id="mcps1.3.3.3.2.5.1.4"><p id="waf_02_0022__p16740904018"><strong id="waf_02_0022__b344374752518">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0022__row048655010593"><td class="cellrowborder" valign="top" width="20.580000000000002%" headers="mcps1.3.3.3.2.5.1.1 "><p id="waf_02_0022__p12742601105">name</p>
</td>
<td class="cellrowborder" valign="top" width="15.2%" headers="mcps1.3.3.3.2.5.1.2 "><p id="waf_02_0022__p5745110902">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.06%" headers="mcps1.3.3.3.2.5.1.3 "><p id="waf_02_0022__p6746140305">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.16%" headers="mcps1.3.3.3.2.5.1.4 "><p id="waf_02_0022__p4746801001">Specifies the certificate name. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="waf_02_0022__section12699617"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0022__p19698416173413">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0022__table58327572" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0022__row12075850"><th align="left" class="cellrowborder" valign="top" width="20.810000000000002%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0022__p38619773"><strong id="waf_02_0022__b188104599258">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.58%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0022__p41193880"><strong id="waf_02_0022__b1967715082616">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.60999999999999%" id="mcps1.3.4.2.1.2.4.1.3"><p id="waf_02_0022__p48369988"><strong id="waf_02_0022__b96698111268">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0022__row32676712"><td class="cellrowborder" valign="top" width="20.810000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0022__p29567983">id</p>
</td>
<td class="cellrowborder" valign="top" width="21.58%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0022__p46196443">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.60999999999999%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0022__p50924436">Specifies the certificate ID.</p>
</td>
</tr>
<tr id="waf_02_0022__row55666745"><td class="cellrowborder" valign="top" width="20.810000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0022__p12712463">name</p>
</td>
<td class="cellrowborder" valign="top" width="21.58%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0022__p23076582">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.60999999999999%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0022__p57263845">Specifies the certificate name.</p>
</td>
</tr>
<tr id="waf_02_0022__row944795925117"><td class="cellrowborder" valign="top" width="20.810000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0022__p466545510448">expireTime</p>
</td>
<td class="cellrowborder" valign="top" width="21.58%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0022__p11665125516444">Long</p>
</td>
<td class="cellrowborder" valign="top" width="57.60999999999999%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0022__p17665655174419">Specifies the time when the certificate expires.</p>
</td>
</tr>
<tr id="waf_02_0022__row3173155443810"><td class="cellrowborder" valign="top" width="20.810000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0022__p017335443813">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="21.58%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0022__p1917365413819">Long</p>
</td>
<td class="cellrowborder" valign="top" width="57.60999999999999%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0022__p1117335413388">Specifies the time when the certificate is uploaded.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="waf_02_0022__section15246722163414"><h4 class="sectiontitle">Examples</h4><p id="waf_02_0022__p1446591883211">A certificate named <strong id="waf_02_0022__b5272624192611">cert_a</strong> is used as an example.</p>
<ul id="waf_02_0022__ul12286522153418"><li id="waf_02_0022__li1328682212345">Request example<pre class="screen" id="waf_02_0022__screen15286522183414">{
"name": "cert_b"
}</pre>
</li></ul>
<ul id="waf_02_0022__ul42867227348"><li id="waf_02_0022__li1286182263420">Response example<pre class="screen" id="waf_02_0022__screen11286112215344">{
"id": "388a7789d55b41d1918b3088a8f1e7f3",
"name": "cert_b",
"expireTime": 1565467166765,
"timestamp": 1545467166765
}</pre>
</li></ul>
</div>
<div class="section" id="waf_02_0022__section47187690"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0022__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0022__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 4</a> describes the normal status code returned by the API.
<div class="tablenoborder"><a name="waf_02_0022__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0022__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="waf_02_0022__waf_02_0012_r3d6e2f205c444705bdbb9daaac74e575"><th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.6.2.2.2.4.1.1"><p id="waf_02_0022__waf_02_0012_af3c4073076f24eca88d94e3fa1effdc6">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.41%" id="mcps1.3.6.2.2.2.4.1.2"><p id="waf_02_0022__waf_02_0012_en-us_topic_0144911667_p4531342288">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.589999999999996%" id="mcps1.3.6.2.2.2.4.1.3"><p id="waf_02_0022__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0022__waf_02_0012_rc7b2adc390904a1ba79e303017797786"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="waf_02_0022__waf_02_0012_a93f3895d44bb4226934cc626ac50e37b">200</p>
</td>
<td class="cellrowborder" valign="top" width="19.41%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="waf_02_0022__waf_02_0012_en-us_topic_0144911667_p7538425819">OK</p>
</td>
<td class="cellrowborder" valign="top" width="58.589999999999996%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="waf_02_0022__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="waf_02_0022__waf_02_0012_en-us_topic_0144911667_p482819399522">For details about error status codes, see <a href="waf_02_0085.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="waf_02_0018.html">Certificate Management</a></div>
</div>
</div>