doc-exports/docs/rds/api-ref/rds_09_0003.html
Wang , Deng Ke 21e968a153 rds api 2.0.38sp24 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2023-01-12 13:50:31 +00:00

127 lines
11 KiB
HTML

<a name="rds_09_0003"></a><a name="rds_09_0003"></a>
<h1 class="topictitle1">Obtaining an Automated Backup Policy</h1>
<div id="body1537345764988"><div class="section" id="rds_09_0003__section117711820496"><h4 class="sectiontitle">Function</h4><p id="rds_09_0003__p1639433018917">This API is used to obtain an automated backup policy.</p>
<ul id="rds_09_0003__ul12259155218373"><li id="rds_09_0003__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_09_0003__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="rds_09_0003__section12081471012"><h4 class="sectiontitle">URI</h4><ul id="rds_09_0003__ul13194498"><li id="rds_09_0003__li19629185215109">URI format<p id="rds_09_0003__p1362913521104"><a name="rds_09_0003__li19629185215109"></a><a name="li19629185215109"></a>GET https://{<em id="rds_09_0003__i0517202491619">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/backups/policy</p>
</li><li id="rds_09_0003__li22221662">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_09_0003__table65777232" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_09_0003__row46529701"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="rds_09_0003__p10809459"><strong id="rds_09_0003__b2030432418340">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="rds_09_0003__p3150961"><strong id="rds_09_0003__b93055249341">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="rds_09_0003__p53901255"><strong id="rds_09_0003__b1830710246349">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_09_0003__row3925534"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="rds_09_0003__p49532829">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="rds_09_0003__p52736237">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="rds_09_0003__p43776822">Specifies the project ID of a tenant in a region.</p>
<p id="rds_09_0003__p75911521266">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="rds_09_0003__row5911165722911"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="rds_09_0003__p41557789155220">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="rds_09_0003__p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="rds_09_0003__p64450739155220">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_09_0003__section420839121019"><h4 class="sectiontitle">Request</h4><ul id="rds_09_0003__ul1183180183717"><li id="rds_09_0003__li1283110163719">Request parameters<p id="rds_09_0003__p848415163614"><a name="rds_09_0003__li1283110163719"></a><a name="li1283110163719"></a>None</p>
</li></ul>
<ul id="rds_09_0003__ul21222815480"><li id="rds_09_0003__li4411135064210">Example<p id="rds_09_0003__p1454414211213"><a name="rds_09_0003__li4411135064210"></a><a name="li4411135064210"></a>GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/backups/policy</p>
</li></ul>
</div>
<div class="section" id="rds_09_0003__section1229512143106"><h4 class="sectiontitle">Response</h4><ul id="rds_09_0003__ul1727710432014"><li id="rds_09_0003__li227714320010">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_09_0003__table6426756154514" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_09_0003__row142645664510"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="rds_09_0003__p17490046"><strong id="rds_09_0003__b3335224143415">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="rds_09_0003__p63149496"><strong id="rds_09_0003__b83371024153415">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="rds_09_0003__p14835533"><strong id="rds_09_0003__b2339624143416">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_09_0003__row34264566458"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_09_0003__p28083633">backup_policy</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_09_0003__p42890904">Object</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_09_0003__p61847473">Indicates the backup policy objects, including the backup retention period (days) and backup start time.</p>
<p id="rds_09_0003__p9587110124113">For details, see <a href="#rds_09_0003__table163715367507">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rds_09_0003__table163715367507"></a><a name="table163715367507"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_09_0003__table163715367507" frame="border" border="1" rules="all"><caption><b>Table 3 </b>backup_policy field data structure description</caption><thead align="left"><tr id="rds_09_0003__row9637103616501"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="rds_09_0003__p6927161055116"><strong id="rds_09_0003__b153511824203415">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="rds_09_0003__p1792911005118"><strong id="rds_09_0003__b1135314241347">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="rds_09_0003__p16930810145119"><strong id="rds_09_0003__b8355724203416">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_09_0003__row1863793617509"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_09_0003__p22303345174853">keep_days</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_09_0003__p34927138174853">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_09_0003__p30482871191015">Indicates the number of days to retain the backup files.</p>
</td>
</tr>
<tr id="rds_09_0003__row1637173618507"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_09_0003__p8056259175641">start_time</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_09_0003__p42443136175641">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_09_0003__p8983181183415">Indicates the backup time window. Automated backups will be triggered during the backup time window.</p>
<p id="rds_09_0003__p144363282818">The value must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.</p>
<ul id="rds_09_0003__ul73551635192814"><li id="rds_09_0003__li13765154012810">The <strong id="rds_09_0003__b1743121315413">HH</strong> value must be 1 greater than the <strong id="rds_09_0003__b774310134416">hh</strong> value.</li><li id="rds_09_0003__li1510111915298">The values of <strong id="rds_09_0003__b75708229414">mm</strong> and <strong id="rds_09_0003__b19570822049">MM</strong> must be the same and must be set to any of the following: <strong id="rds_09_0003__b1657215221947">00</strong>, <strong id="rds_09_0003__b057210229411">15</strong>, <strong id="rds_09_0003__b757310221742">30</strong>, or <strong id="rds_09_0003__b457332211413">45</strong>.</li></ul>
</td>
</tr>
<tr id="rds_09_0003__row166371436195010"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_09_0003__p146385361506">period</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_09_0003__p1363812362509">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_09_0003__p11638173615018">Indicates the backup cycle configuration. Data will be automatically backed up on the selected days every week.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="rds_09_0003__li158029471019">Example normal response<p id="rds_09_0003__p206051559700"><a name="rds_09_0003__li158029471019"></a><a name="li158029471019"></a>When the automated backup policy is disabled:</p>
<pre class="codeblock" id="rds_09_0003__codeblock1177712336332">{
"backup_policy": {
"keep_days": 0
}
}</pre>
<p id="rds_09_0003__p52911330198">When the automated backup policy is enabled:</p>
<pre class="codeblock" id="rds_09_0003__codeblock1791783883317">{
"backup_policy": {
"keep_days": 7,
"start_time": "19:00-20:00",
"period": "1,2"
}
}</pre>
</li><li id="rds_09_0003__li176673462424">Abnormal Response<p id="rds_09_0003__p29415884"><a name="rds_09_0003__li176673462424"></a><a name="li176673462424"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_09_0003__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_09_0003__en-us_topic_0032347778_ul7858132212142"><li id="rds_09_0003__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_09_0003__en-us_topic_0032347778_p1040982941020"><a name="rds_09_0003__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_09_0003__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_09_0003__en-us_topic_0032347778_p0723374409"><a name="rds_09_0003__en-us_topic_0032347778_li11583183218149"></a><a name="en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_09_0003__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_09_0003__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0032347777.html">Backup and Restoration</a></div>
</div>
</div>