forked from docs/doc-exports
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
218 lines
17 KiB
HTML
218 lines
17 KiB
HTML
<a name="gaussdb_11_0024"></a><a name="gaussdb_11_0024"></a>
|
|
|
|
<h1 class="topictitle1">Querying an Automated Backup Policy</h1>
|
|
<div id="body8662426"><div class="section" id="gaussdb_11_0024__en-us_topic_0000001251304370_section44230431101549"><h4 class="sectiontitle">Function</h4><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p1350220403353">This API is used to query an automated backup policy. Before calling this API:</p>
|
|
<ul id="gaussdb_11_0024__en-us_topic_0000001251304370_ul924420236520"><li id="gaussdb_11_0024__en-us_topic_0000001267522832_en-us_topic_0000001250985350_li136356359522">Learn how to <a href="gaussdb_03_0001.html">authorize and authenticate</a> it.</li><li id="gaussdb_11_0024__en-us_topic_0000001267522832_en-us_topic_0000001250985350_li1991981933613">Obtain the required <a href="gaussdb_00_0003.html">region and endpoint</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__en-us_topic_0000001251304370_section31729879101549"><h4 class="sectiontitle">URI</h4><ul id="gaussdb_11_0024__en-us_topic_0000001251304370_ul19983374101549"><li id="gaussdb_11_0024__en-us_topic_0000001251304370_li45632644101549">URI format<p id="gaussdb_11_0024__en-us_topic_0000001251304370_p8040618101549"><a name="gaussdb_11_0024__en-us_topic_0000001251304370_li45632644101549"></a><a name="en-us_topic_0000001251304370_li45632644101549"></a>GET https://{endpoint}/mysql/v3/{project_id}/instances/{instance_id}/backups/policy</p>
|
|
</li><li id="gaussdb_11_0024__en-us_topic_0000001251304370_li54691335131412">URI example<p id="gaussdb_11_0024__p1321413419208"><a name="gaussdb_11_0024__en-us_topic_0000001251304370_li54691335131412"></a><a name="en-us_topic_0000001251304370_li54691335131412"></a>GET https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/c3ec2c6148ad4d71b1a8411a62df0d3cin07/backups/policy</p>
|
|
</li><li id="gaussdb_11_0024__en-us_topic_0000001251304370_li47310355101549">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0024__en-us_topic_0000001251304370_table23140016101549" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="gaussdb_11_0024__en-us_topic_0000001251304370_row27795795101549"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.2.3.1.2.5.1.1"><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p36866898101549"><strong id="gaussdb_11_0024__en-us_topic_0000001251304370_b142249647764726">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.2.2.3.1.2.5.1.2"><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p156174610411">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11%" id="mcps1.3.2.2.3.1.2.5.1.3"><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p33428750101549">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59%" id="mcps1.3.2.2.3.1.2.5.1.4"><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p23374190101549"><strong id="gaussdb_11_0024__en-us_topic_0000001251304370_b9620535464726">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_11_0024__en-us_topic_0000001251304370_row14261210101549"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.2.3.1.2.5.1.1 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p104922035165518">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.2.3.1.2.5.1.2 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p1956194615414">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.2.2.3.1.2.5.1.3 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p18047737101549">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.2.2.3.1.2.5.1.4 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p52580603101549">Project ID of a tenant in a region.</p>
|
|
<p id="gaussdb_11_0024__en-us_topic_0000001251304370_p16476914175718">To obtain this value, see <a href="gaussdb_10_0004.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__en-us_topic_0000001251304370_row197844933113"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.2.3.1.2.5.1.1 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p2153719152911">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.2.3.1.2.5.1.2 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p8572046164115">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.2.2.3.1.2.5.1.3 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p346994410599">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.2.2.3.1.2.5.1.4 "><p id="gaussdb_11_0024__en-us_topic_0000001251304370_p84691144145915">DB instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__section74808438358"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0024__en-us_topic_0000001226563879_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="gaussdb_11_0024__row2480443113520"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="gaussdb_11_0024__p12480643153511">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="gaussdb_11_0024__p10480174313359">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="gaussdb_11_0024__p34801343153517">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="gaussdb_11_0024__p648124333516">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_11_0024__row6480124312355"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_11_0024__p1248113432355">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_11_0024__p948174315359">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_11_0024__p1348134303516">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_11_0024__p5481184343512">User token.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__row14480743123514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_11_0024__p54811143183516">X-Language</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_11_0024__p1048154312355">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_11_0024__p2481184333510">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_11_0024__p04817439352">Language.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__row334373013122"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_11_0024__p15665114311157">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_11_0024__p36651643101518">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_11_0024__p10665443181514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_11_0024__p1866504318159">MIME type of the request body. You are advised to use the default value <strong id="gaussdb_11_0024__b65690314274241">application/json</strong>. For APIs used to upload objects or images, the value can vary depending on the flow type.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__section1148114435351"><h4 class="sectiontitle">Response Parameters</h4><p id="gaussdb_11_0024__p1048114436359"><strong id="gaussdb_11_0024__b74821443113519">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0024__en-us_topic_0000001226563879_response_GetBackupPolicyResponse" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_11_0024__row948211435351"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="gaussdb_11_0024__p9482743143511">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="gaussdb_11_0024__p748274353512">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="gaussdb_11_0024__p1648244313512">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_11_0024__row4482204393520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="gaussdb_11_0024__p1548224373516">backup_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="gaussdb_11_0024__p12482114373520"><a href="#gaussdb_11_0024__en-us_topic_0000001226563879_response_BackupPolicy">BackupPolicy</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="gaussdb_11_0024__p648204333515">Backup policy information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="gaussdb_11_0024__en-us_topic_0000001226563879_response_BackupPolicy"></a><a name="en-us_topic_0000001226563879_response_BackupPolicy"></a><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0024__en-us_topic_0000001226563879_response_BackupPolicy" frame="border" border="1" rules="all"><caption><b>Table 4 </b>BackupPolicy</caption><thead align="left"><tr id="gaussdb_11_0024__row24834432351"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="gaussdb_11_0024__p0483124363518">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="gaussdb_11_0024__p248324393510">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="gaussdb_11_0024__p54831543113515">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_11_0024__row548314383517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="gaussdb_11_0024__p9483143143516">keep_days</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="gaussdb_11_0024__p1648311432356">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="gaussdb_11_0024__p412220818265">Backup retention days.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__row164831243143517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="gaussdb_11_0024__p154844430357">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="gaussdb_11_0024__p248474316356">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="gaussdb_11_0024__p382154145217">Backup time window. Automated backups will be triggered during the backup time window.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__row3483184311354"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="gaussdb_11_0024__p1648416430353">period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="gaussdb_11_0024__p7484144319358">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="gaussdb_11_0024__p883724425216">Backup cycle configuration. Data will be automatically backed up on the selected days every week.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="gaussdb_11_0024__p1448513431359"><strong id="gaussdb_11_0024__b28422871472510">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0024__en-us_topic_0000001226563879_response_MysqlErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_11_0024__row34851343133510"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="gaussdb_11_0024__p12485114317355">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="gaussdb_11_0024__p8485154316351">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="gaussdb_11_0024__p7485154373515">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_11_0024__row17485134383514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="gaussdb_11_0024__p848512439353">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="gaussdb_11_0024__p1548518434359">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="gaussdb_11_0024__p1848624315358">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__row8485943143518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="gaussdb_11_0024__p2486104363514">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="gaussdb_11_0024__p184861439354">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="gaussdb_11_0024__p4486194317353">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="gaussdb_11_0024__p548610434356"><strong id="gaussdb_11_0024__b46319645964017">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0024__table1748624373512" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_11_0024__row17486204319357"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.1"><p id="gaussdb_11_0024__p6486143203514">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.2"><p id="gaussdb_11_0024__p11487184315352">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.8.2.4.1.3"><p id="gaussdb_11_0024__p548714319353">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_11_0024__row548611433356"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p id="gaussdb_11_0024__p1948754318356">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p id="gaussdb_11_0024__p184871543133515">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p id="gaussdb_11_0024__p1148714434350">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_11_0024__row174861443183516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p id="gaussdb_11_0024__p174876431358">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p id="gaussdb_11_0024__p13487204313514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p id="gaussdb_11_0024__p1448724373518">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__section135631414165"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="gaussdb_11_0024__screen175071359169">get https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/ba62a0b83a1b42bfab275829d86ac0fdin07/backups/policy</pre>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__section1948864383517"><h4 class="sectiontitle">Example Response</h4><p id="gaussdb_11_0024__p948812438353"><strong id="gaussdb_11_0024__b84885437350">Status code: 200</strong></p>
|
|
<p id="gaussdb_11_0024__p248813438358">Success.</p>
|
|
<pre class="screen" id="gaussdb_11_0024__screen1148819437352">{
|
|
"backup_policy" : {
|
|
"keep_days" : "7,",
|
|
"start_time" : "19:00-20:00",
|
|
"period" : "1,2"
|
|
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__section4778540915440"><h4 class="sectiontitle">Status Code</h4><p id="gaussdb_11_0024__p0723374409">For details, see <a href="gaussdb_10_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="gaussdb_11_0024__section2557116171718"><h4 class="sectiontitle">Error Code</h4><p id="gaussdb_11_0024__p855716160178">For details, see <a href="gaussdb_10_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="gaussdb_11_0021.html">Backup Management</a></div>
|
|
</div>
|
|
</div>
|
|
|