Files
doc-exports/docs/kms/api-ref/kms_02_0039.html
qiaoli 18397ded73 kms_api_2025042703
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com>
Co-authored-by: qiaoli <qiaoli@huawei.com>
Co-committed-by: qiaoli <qiaoli@huawei.com>
2025-12-09 09:29:44 +00:00

156 lines
14 KiB
HTML

<a name="kms_02_0039"></a><a name="kms_02_0039"></a>
<h1 class="topictitle1">Changing the Rotation Interval for a CMK</h1>
<div id="body1511418825778"><div class="section" id="kms_02_0039__en-us_topic_0112992335_s1731a14fb0144c79bf0fa90c694f34f7"><h4 class="sectiontitle">Function</h4><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0020091565_p23115188">This API enables you to change the rotation interval for a CMK.</p>
</div>
<div class="section" id="kms_02_0039__en-us_topic_0112992335_se70c3e5518a04f60b06032524dddfef4"><h4 class="sectiontitle">URI</h4><ul id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0020091565_ul60390938"><li id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0020091565_li6647531">URI format<p id="kms_02_0039__en-us_topic_0112992335_p138073181080"><a name="kms_02_0039__en-us_topic_0112992335_en-us_topic_0020091565_li6647531"></a><a name="en-us_topic_0112992335_en-us_topic_0020091565_li6647531"></a>POST /v1.0/{project_id}/kms/update-key-rotation-interval</p>
</li><li id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0020091565_li14211994">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0039__en-us_topic_0112992335_t982da1e0196d4ec1a28d1fbff2cc8191" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="kms_02_0039__en-us_topic_0112992335_r6e963322c1e740d181726d2f0e91df5a"><th align="left" class="cellrowborder" valign="top" width="19.170000000000005%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="kms_02_0039__en-us_topic_0112992335_p2739096916511">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.180000000000003%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="kms_02_0039__en-us_topic_0112992335_p407603016511">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.610000000000003%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="kms_02_0039__en-us_topic_0112992335_p6172299916511">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.040000000000006%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="kms_02_0039__en-us_topic_0112992335_p3350702116511">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0039__en-us_topic_0112992335_r69bf37b65d3f446eab7b3f4d1b2fcec0"><td class="cellrowborder" valign="top" width="19.170000000000005%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_ae42d73592f58424ea93a11e52d2478dd">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.180000000000003%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_a56440c0f0ae34ba3b8033d1247673984">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.610000000000003%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_p4386100291125">String</p>
</td>
<td class="cellrowborder" valign="top" width="40.040000000000006%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="kms_02_0039__en-us_topic_0112992335_a1314869d2dc147b38461e037d622f7b4">Project ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="kms_02_0039__en-us_topic_0112992335_seb7b7901701247fab30a59b76f1c7f93"><h4 class="sectiontitle">Request Message</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_row209291944115219"><th align="left" class="cellrowborder" valign="top" width="20.080000000000002%" id="mcps1.3.3.2.2.5.1.1"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p17930194414521">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.919999999999998%" id="mcps1.3.3.2.2.5.1.2"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p15930244195213">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p39301444155210">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p109301444105220">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_row1292934416529"><td class="cellrowborder" valign="top" width="20.080000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p109311444155211">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p9931104412528">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p193104485212">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0000001176937539_p1093134420527">User token. It can be obtained by calling an IAM API. The value of <strong id="kms_02_0039__en-us_topic_0112992335_b1888240437105153">X-Subject-Token</strong> in the response header is the user token.</p>
</td>
</tr>
<tr id="kms_02_0039__en-us_topic_0112992335_row17121816165912"><td class="cellrowborder" valign="top" width="20.080000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_p7569112519613">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_p1956932518611">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_p65692025067">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0039__en-us_topic_0112992335_p55696251863">application/json</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0039__en-us_topic_0112992335_table46221022101230" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request parameters</caption><thead align="left"><tr id="kms_02_0039__en-us_topic_0112992335_row9315574101230"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.1"><p id="kms_02_0039__en-us_topic_0112992335_p9399193985520">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.3.2.5.1.2"><p id="kms_02_0039__en-us_topic_0112992335_p23992395555">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.3"><p id="kms_02_0039__en-us_topic_0112992335_p173997391555">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.5.1.4"><p id="kms_02_0039__en-us_topic_0112992335_p19400113925512">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0039__en-us_topic_0112992335_row2638193101722"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_p41908563105428">key_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_p17072096105428">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_p1010117504718">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0039__en-us_topic_0112992335_p21929114422">36-byte key ID that matches the regular expression <span class="parmvalue" id="kms_02_0039__en-us_topic_0112992335_parmvalue17814921424333"><b>^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$</b></span>.</p>
<p id="kms_02_0039__en-us_topic_0112992335_p11134104114149">For example, <strong id="kms_02_0039__en-us_topic_0112992335_b12511949414616">0d0466b0-e727-4d9c-b35d-f84bb474a37f</strong></p>
</td>
</tr>
<tr id="kms_02_0039__en-us_topic_0112992335_row60576285144255"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_p1160708714437">rotation_interval</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_p5264881114437">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_p64998514437">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0039__en-us_topic_0112992335_p6095109894216">Rotation interval. The value is an integer ranging from <strong id="kms_02_0039__en-us_topic_0112992335_b842352706113339">30</strong> to <strong id="kms_02_0039__en-us_topic_0112992335_b842352706113343">365</strong>.</p>
<p id="kms_02_0039__en-us_topic_0112992335_p4155941814437">Set the interval based on how often a CMK is used. If it is frequently used, set a short interval; otherwise, set a long one.</p>
</td>
</tr>
<tr id="kms_02_0039__en-us_topic_0112992335_row35142504101726"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_p269135101746">sequence</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_p20967256101746">No</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_p197751552575">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0039__en-us_topic_0112992335_p3979113742915">A 36-byte serial number of a request message.</p>
<p id="kms_02_0039__en-us_topic_0112992335_p20626198101746">For example, <strong id="kms_02_0039__en-us_topic_0112992335_b21556872042512">919c82d4-8046-4722-9094-35c3c6524cff</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="kms_02_0039__en-us_topic_0112992335_sfadd53a5f4714e8f87811818d62d0296"><h4 class="sectiontitle">Response Message</h4><p id="kms_02_0039__en-us_topic_0112992335_p20275240174234">None</p>
</div>
<div class="section" id="kms_02_0039__en-us_topic_0112992335_section4678745173613"><h4 class="sectiontitle">Example</h4><p id="kms_02_0039__en-us_topic_0112992335_p1938115810366">The following example describes how to change the rotation interval to <span class="parmvalue" id="kms_02_0039__en-us_topic_0112992335_parmvalue945591879202249"><b>30</b></span> for a CMK (ID: <span class="parmvalue" id="kms_02_0039__en-us_topic_0112992335_parmvalue19739413241729"><b>0d0466b0-e727-4d9c-b35d-f84bb474a37f</b></span>).</p>
<ul id="kms_02_0039__en-us_topic_0112992335_ul2069317451362"><li id="kms_02_0039__en-us_topic_0112992335_li1669264511365">Example request<pre class="screen" id="kms_02_0039__en-us_topic_0112992335_screen469264543610">{
"key_id": "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
"rotation_interval":30
}</pre>
</li><li id="kms_02_0039__en-us_topic_0112992335_li1469374583610">Example response<pre class="screen" id="kms_02_0039__en-us_topic_0112992335_screen4692945183612">{
}</pre>
<p id="kms_02_0039__en-us_topic_0112992335_p369216457364">or</p>
<pre class="screen" id="kms_02_0039__en-us_topic_0112992335_screen8693124515361">{
"error": {
"error_code": "KMS.XXXX",
"error_msg": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="kms_02_0039__en-us_topic_0112992335_section655115613254"><h4 class="sectiontitle">Status Codes</h4><div class="p" id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_p17772351"><a href="#kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_table20596071">Table 4</a> lists the normal status code returned by the response.
<div class="tablenoborder"><a name="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><a name="en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_table20596071" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_row9746163"><th align="left" class="cellrowborder" valign="top" width="16.16%" id="mcps1.3.6.2.2.2.4.1.1"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_p57545694203043">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.28%" id="mcps1.3.6.2.2.2.4.1.2"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_p4531342288">Status</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.6.2.2.2.4.1.3"><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_p30689603203043">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_row48621261"><td class="cellrowborder" valign="top" width="16.16%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_en-us_topic_0079615001_p46008046">200</p>
</td>
<td class="cellrowborder" valign="top" width="28.28%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_p7538425819">OK</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_p1885682315512">Request processed successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="kms_02_0039__en-us_topic_0112992335_en-us_topic_0112992294_p5626181018551">Exception status code. For details, see <a href="kms_02_0301.html#kms_02_0301">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="kms_02_0011.html">CMK Management</a></div>
</div>
</div>