forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com> Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
147 lines
12 KiB
HTML
147 lines
12 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. </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__table82481020121413">Table 2</a> describes the request parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="css_03_0031__table82481020121413"></a><a name="table82481020121413"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0031__table82481020121413" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="css_03_0031__row18248112010149"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0031__p10441033494">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.3.2.5.1.2"><p id="css_03_0031__p74493316910">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.3.2.5.1.3"><p id="css_03_0031__p1044533896">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51%" id="mcps1.3.3.3.2.5.1.4"><p id="css_03_0031__p154413335917">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_03_0031__row18248182013148"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p837215054813">prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p4441233891">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p186181046114912">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p9448924192218">Prefix of the snapshot name that is automatically created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0031__row243315404483"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p1343434015485">period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p443424054812">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p1543414094815">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p194341340174817">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__parmname207181910155010"><b>HH:mm z</b></span>. In the format, <span class="parmname" id="css_03_0031__parmname26580719510"><b>HH:mm</b></span> refers to the hour time and <span class="parmname" id="css_03_0031__parmname12640155145015"><b>z</b></span> refers to the time zone, for example, <span class="parmvalue" id="css_03_0031__parmvalue150123314505"><b>00:00 GMT+08:00</b></span> and <span class="parmvalue" id="css_03_0031__parmvalue1695214431503"><b>01:00 GMT+02:00</b></span>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0031__row1795115595819"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p19952165545814">keepday</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p139521155125816">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p1995220551584">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p5952255145811">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 allowed maximum duration on the half hour.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0031__row10242054591"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p52412510597">enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p1324105125919">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p62611515593">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p1926165185914">Value <span class="parmvalue" id="css_03_0031__parmvalue1223625113406"><b>true</b></span> indicates that the automatic snapshot creation policy is enabled, and value <span class="parmvalue" id="css_03_0031__parmvalue9862145319405"><b>false</b></span> indicates that the automatic snapshot creation policy is disabled.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0031__row14926181913614"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0031__p9926131983613">deleteAuto</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0031__p1992613192362">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0031__p69261192361">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0031__p12926919193610">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__parmvalue866761614499"><b>false</b></span>, indicating that snapshots that have been automatically created are not deleted when the automatic snapshot creation function is disabled. If this parameter is set to <strong id="css_03_0031__b147866595408">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>
|
|
|