doc-exports/docs/css/api-ref/css_03_0031.html
Zheng, Xiu 99a2d77599 css api 23.5.1 20240520
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2024-06-07 17:47:08 +00:00

163 lines
13 KiB
HTML

<a name="css_03_0031"></a><a name="css_03_0031"></a>
<h1 class="topictitle1">Setting the Automatic Snapshot Creation Policy</h1>
<div id="body1522117927446"><div class="section" id="css_03_0031__section874853215915"><h4 class="sectiontitle">Function</h4><p id="css_03_0031__p21061341164917">This API is used to set parameters related to automatic snapshot creation. By default, a snapshot is created per day.</p>
</div>
<div class="section" id="css_03_0031__section8763193210910"><h4 class="sectiontitle">URI</h4><pre class="screen" id="css_03_0031__screen1695846201113">POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot/policy</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0031__table57631032695" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="css_03_0031__row4445336913"><th align="left" class="cellrowborder" valign="top" width="20.69%" id="mcps1.3.2.3.2.5.1.1"><p id="css_03_0031__p54417338910">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.37%" id="mcps1.3.2.3.2.5.1.2"><p id="css_03_0031__p1644733693">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.03%" id="mcps1.3.2.3.2.5.1.3"><p id="css_03_0031__p11441233696">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.91%" id="mcps1.3.2.3.2.5.1.4"><p id="css_03_0031__p124403319916">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0031__row94414331098"><td class="cellrowborder" valign="top" width="20.69%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0031__p0441331398">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.37%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0031__p9444331997">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="22.03%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0031__p144412334919">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.91%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0031__p18449331896">Project ID. For details, see <a href="css_03_0071.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
<tr id="css_03_0031__row14453320917"><td class="cellrowborder" valign="top" width="20.69%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0031__p2044193314920">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.37%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0031__p24410331398">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="22.03%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0031__p844133316918">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.91%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0031__p13441833493">ID of the cluster where automatic snapshot creation is enabled.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0031__section1477913211910"><h4 class="sectiontitle">Request</h4><p id="css_03_0031__p1442421310402"><a href="#css_03_0031__request_SetRDSBackupCnfReq">Table 2</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="css_03_0031__request_SetRDSBackupCnfReq"></a><a name="request_SetRDSBackupCnfReq"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0031__request_SetRDSBackupCnfReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameter</caption><thead align="left"><tr id="css_03_0031__row1349410133598"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0031__p134951613135917">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="css_03_0031__p2049571335917">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="css_03_0031__p15496913205915">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="css_03_0031__p1549618131596">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0031__row84941013115916"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p549681319598">indices</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p1649711395915">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p194971213105915">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p164971013185915">Name of the index to be backed up. The value <strong id="css_03_0031__b122929116506">*</strong> indicates all indexes.</p>
</td>
</tr>
<tr id="css_03_0031__row74948132591"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p14498713135918">prefix</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p1249818130595">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p134981813195910">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p1349812132590">Prefix of automatically generated snapshots. It is manually configured. Enter up to 32 characters and start with a lowercase letter. Lowercase letters, numbers, hyphens (-), and underscores (_) are allowed.</p>
<div class="note" id="css_03_0031__note1849921310591"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_03_0031__p1499613155914">This parameter is mandatory when <strong id="css_03_0031__b1397865711546">enable</strong> is set to <strong id="css_03_0031__b1930216475544">true</strong>.</p>
</div></div>
</td>
</tr>
<tr id="css_03_0031__row5494191311594"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p20500151345913">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p4500131395918">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p75002131597">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p195015130591">Time when a snapshot is generated every day. Snapshots can only be generated on the hour. The format is <span class="parmname" id="css_03_0031__parmname18381311194810"><b>HH:mm z</b></span>: <span class="parmname" id="css_03_0031__parmname538161115481"><b>HH:mm</b></span> refers to the hour time and <span class="parmname" id="css_03_0031__parmname1239141144817"><b>z</b></span> refers to the time zone. For example, <span class="parmvalue" id="css_03_0031__parmvalue13261413134819"><b>00:00 GMT+08:00</b></span> and <span class="parmvalue" id="css_03_0031__parmvalue2261131481"><b>01:00 GMT+08:00</b></span>.</p>
<div class="note" id="css_03_0031__note25011513185911"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_03_0031__p115011913165919">This parameter is mandatory when <strong id="css_03_0031__b139961557833">enable</strong> is set to <strong id="css_03_0031__b1399655715318">true</strong>.</p>
</div></div>
</td>
</tr>
<tr id="css_03_0031__row34943134599"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p1550261315591">keepday</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p4502313185920">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p13503121316597">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p95041213125919">Number of days that a snapshot can be retained. The value ranges from 1 to 90. The system automatically deletes snapshots that have been retained for the maximum allowed duration on the half hour.</p>
<div class="note" id="css_03_0031__note250421325910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_03_0031__p6505913115912">This parameter is mandatory when <strong id="css_03_0031__b10619105817548">enable</strong> is set to <strong id="css_03_0031__b1861915819543">true</strong>.</p>
</div></div>
</td>
</tr>
<tr id="css_03_0031__row949481314595"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p115052013105918">enable</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p20505141375915">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p15506101395916">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p14506191311595">Indicates whether to enable the automatic snapshot creation policy.</p>
<ul id="css_03_0031__ul1507413185916"><li id="css_03_0031__li2507201319596"><strong id="css_03_0031__b196851886611">true</strong>: enabled.</li><li id="css_03_0031__li135076135599"><strong id="css_03_0031__b8307714468">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="css_03_0031__row174941113105911"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p115081313135913">deleteAuto</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p15508131313597">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p14509181318590">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p7509113105910">Indicates whether to delete all automatically created snapshots when the automatic snapshot creation policy is disabled. The default value is <span class="parmvalue" id="css_03_0031__parmvalue2437531615"><b>false</b></span> and the automatically created snapshots are not deleted when the automatic snapshot creation function is disabled. If this parameter is set to <strong id="css_03_0031__b970664714712">true</strong>, all automatically created snapshots are deleted when the automatic snapshot creation policy is disabled.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0031__section19810103220915"><h4 class="sectiontitle">Response</h4><p id="css_03_0031__p184434413112">None</p>
</div>
<div class="section" id="css_03_0031__section4831175818404"><h4 class="sectiontitle">Examples</h4><p id="css_03_0031__p64419337911">Example request</p>
<pre class="screen" id="css_03_0031__screen7841540829">POST /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/ea244205-d641-45d9-9dcb-ab2236bcd07e/index_snapshot/policy
{
"prefix":"snapshot",
"period":"16:00 GMT+02:00",
"keepday":7,
"enable":"true"
}</pre>
</div>
<div class="section" id="css_03_0031__section87962546391"><h4 class="sectiontitle">Status Code</h4><p id="css_03_0031__p1147144641213"><a href="#css_03_0031__table209491933101317">Table 3</a> describes the status code.</p>
<div class="tablenoborder"><a name="css_03_0031__table209491933101317"></a><a name="table209491933101317"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0031__table209491933101317" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Status code</caption><thead align="left"><tr id="css_03_0031__row194918333132"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.3.2.4.1.1"><p id="css_03_0031__p6531343171310">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.3.2.4.1.2"><p id="css_03_0031__p16534124318132">Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.3.2.4.1.3"><p id="css_03_0031__p1453710437131">Status Code Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0031__row09491533111315"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0031__p1656994351310">200</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0031__p134136431055">OK</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0031__p134136431458">The request is processed successfully.</p>
</td>
</tr>
<tr id="css_03_0031__row1184954102013"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0031__p111841154132019">406</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0031__en-us_topic_0122640420_p19980869">Not Acceptable</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0031__en-us_topic_0122640420_p7837682">The server cannot fulfill the request according to the content characteristics of the request.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0010.html">Snapshot Management APIs</a></div>
</div>
</div>