doc-exports/docs/css/api-ref/css_03_0031.html
Wuwan, Qi 8675132585 CSS API 23.2.1 20230926
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
2023-10-23 09:34:01 +00:00

161 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="25.77%" 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="24.740000000000002%" 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="18.56%" 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="30.930000000000003%" 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="25.77%" 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="24.740000000000002%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0031__p9444331997">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.56%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0031__p144412334919">String</p>
</td>
<td class="cellrowborder" valign="top" width="30.930000000000003%" 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="25.77%" 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="24.740000000000002%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0031__p24410331398">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.56%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0031__p844133316918">String</p>
</td>
<td class="cellrowborder" valign="top" width="30.930000000000003%" 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 parameters</caption><thead align="left"><tr id="css_03_0031__row2089453117531"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0031__p9895731185310">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__p1389693195314">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__p1489773113532">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__p2089723175311">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0031__row1989410312537"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p17898831125316">indices</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p208981331165313">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p1289973105310">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p48991831155315">Name of the index to be backed up. * indicates all indexes.</p>
</td>
</tr>
<tr id="css_03_0031__row189473111536"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p0900113145316">prefix</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p16900203145313">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p090143175310">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p572597429">Prefix of a snapshot that is automatically created, which is manually entered. Enter up to 32 characters and start with a lowercase letter. Lowercase letters, digits, hyphens (-), and underscores (_) are allowed.</p>
<div class="note" id="css_03_0031__note6876111011215"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_03_0031__p195442178014">This parameter is mandatory when enable is set to true.</p>
</div></div>
</td>
</tr>
<tr id="css_03_0031__row8894163115534"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p139015316539">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p9902531125313">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p990243112537">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p1678517501415">Time when a snapshot is created every day. Snapshots can only be created on the hour. The time format is the time followed by the time zone, specifically, <span class="parmname" id="css_03_0031__parmname878555012112"><b>HH:mm z</b></span>. In the format, <span class="parmname" id="css_03_0031__parmname87851150713"><b>HH:mm</b></span> refers to the hour time and <span class="parmname" id="css_03_0031__parmname378505010111"><b>z</b></span> refers to the time zone, for example, <span class="parmvalue" id="css_03_0031__parmvalue1978585012111"><b>00:00 GMT+08:00</b></span> and <span class="parmvalue" id="css_03_0031__parmvalue117851350511"><b>01:00 GMT+02:00</b></span>.</p>
<div class="note" id="css_03_0031__note10909100121"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="css_03_0031__p155454171014">This parameter is mandatory when enable is set to true.</p>
</div></div>
</td>
</tr>
<tr id="css_03_0031__row4894203115536"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p139041631105314">keepday</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p890443115310">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p19904183155314">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p3905431105317">Snapshot retention period. The value ranges from 1 to 90. Expired snapshots will be automatically deleted on the half hour. This parameter is mandatory when enable is set to true.</p>
</td>
</tr>
<tr id="css_03_0031__row4895103120536"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p1690512314533">enable</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p390643145315">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p10906143165319">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p4907103165312">Whether to enable the automatic snapshot creation policy.</p>
<ul id="css_03_0031__ul1190793119536"><li id="css_03_0031__li9907133145319"><strong id="css_03_0031__b1790814314535">true</strong>: The automatic snapshot creation policy is enabled.</li><li id="css_03_0031__li12908183111535"><strong id="css_03_0031__b8908731155312">false</strong>:The automatic snapshot creation policy is disabled, and other parameters do not need to be delivered.</li></ul>
</td>
</tr>
<tr id="css_03_0031__row138951631185313"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p3908163165317">deleteAuto</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p39090316537">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p129101031175317">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p129101331125314">Whether to clear all the automatically created snapshots when the automatic snapshot creation policy is disabled. The default value is <strong id="css_03_0031__b1991011315531">false</strong>, indicating that automatically created snapshots will not be deleted. If this parameter is set to <strong id="css_03_0031__b17910143195315">true</strong>, all created snapshots will be 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>