Files
doc-exports/docs/taurusdb/api-ref/gaussdb_06_0005.html
wangdengke2 ee9f8aa0b6 taurusdb_api
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>
2025-10-30 15:48:33 +00:00

211 lines
15 KiB
HTML

<a name="gaussdb_06_0005"></a><a name="gaussdb_06_0005"></a>
<h1 class="topictitle1">Querying an Automated Backup Policy</h1>
<div id="body1595840412324"><div class="section" id="gaussdb_06_0005__section44230431101549"><h4 class="sectiontitle">Function</h4><p id="gaussdb_06_0005__p1350220403353">This API is used to query an automated backup policy. Before using this API:</p>
<ul id="gaussdb_06_0005__ul924420236520"><li id="gaussdb_06_0005__li136356359522">Learn how to <a href="gaussdb_03_0001.html">authorize and authenticate</a> it.</li><li id="gaussdb_06_0005__li1991981933613">Obtain the required <a href="gaussdb_00_0003.html">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="gaussdb_06_0005__section12808135081815"><h4 class="sectiontitle">URI</h4><p id="gaussdb_06_0005__p10808850151817">GET /v3/{project_id}/instances/{instance_id}/backups/policy</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_06_0005__table6809145017181" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="gaussdb_06_0005__row1780818505183"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="gaussdb_06_0005__p14809850151816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="gaussdb_06_0005__p1380985016183">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="gaussdb_06_0005__p88091550131817">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="gaussdb_06_0005__p11809155014183">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_06_0005__row1080855001816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="gaussdb_06_0005__p10809155019185">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="gaussdb_06_0005__p1781015503188">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="gaussdb_06_0005__p11810195001817">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="gaussdb_06_0005__p1425651222516">Project ID of a tenant in a region.</p>
<p id="gaussdb_06_0005__p18256121212253">To obtain this value, see <a href="gaussdb_10_0004.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="gaussdb_06_0005__row17809205016183"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="gaussdb_06_0005__p1181019505189">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="gaussdb_06_0005__p13810205001812">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="gaussdb_06_0005__p18101650111814">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="gaussdb_06_0005__p1981055014183">Instance ID, which is compliant with the UUID format.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_06_0005__section48115506187"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_06_0005__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="gaussdb_06_0005__row1281113504189"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="gaussdb_06_0005__p28111050101813">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="gaussdb_06_0005__p14811155061816">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="gaussdb_06_0005__p68111950101815">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="gaussdb_06_0005__p38121150191817">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_06_0005__row15811150171814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_06_0005__p181225091810">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_06_0005__p68125508181">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_06_0005__p2081215014184">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_06_0005__p1481275014185">User token.</p>
</td>
</tr>
<tr id="gaussdb_06_0005__row15811155031818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_06_0005__p381265021814">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_06_0005__p9812145015187">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_06_0005__p1381355017189">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_06_0005__p081325014186">Language.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_06_0005__section16813450191819"><h4 class="sectiontitle">Response Parameters</h4><p id="gaussdb_06_0005__p17813115013183"><strong id="gaussdb_06_0005__b184900312725045">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_06_0005__response_GetBackupPolicyResponse" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_06_0005__row17813175019189"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="gaussdb_06_0005__p081445061811">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="gaussdb_06_0005__p98141450191820">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="gaussdb_06_0005__p2814125061812">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_06_0005__row1781311505186"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="gaussdb_06_0005__p7814165017186">backup_policy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="gaussdb_06_0005__p981405031810"><a href="#gaussdb_06_0005__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_06_0005__p1981435041816">Backup policy information.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="gaussdb_06_0005__response_BackupPolicy"></a><a name="response_BackupPolicy"></a><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_06_0005__response_BackupPolicy" frame="border" border="1" rules="all"><caption><b>Table 4 </b>BackupPolicy</caption><thead align="left"><tr id="gaussdb_06_0005__row1181512500185"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="gaussdb_06_0005__p2816650191817">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="gaussdb_06_0005__p16816135016185">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="gaussdb_06_0005__p1381645018187">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_06_0005__row15815175051816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="gaussdb_06_0005__p1881705017182">keep_days</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="gaussdb_06_0005__p18818350161818">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="gaussdb_06_0005__p19818145011811">Backup retention days. Value: <strong id="gaussdb_06_0005__b5504172118216">1</strong> to <strong id="gaussdb_06_0005__b8790122411219">732</strong></p>
<p id="gaussdb_06_0005__p18818185081813">Minimum value: <strong id="gaussdb_06_0005__b7818185010181">1</strong></p>
<p id="gaussdb_06_0005__p2819650101815">Maximum value: <strong id="gaussdb_06_0005__b2146152492418">732</strong></p>
</td>
</tr>
<tr id="gaussdb_06_0005__row14815195010181"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="gaussdb_06_0005__p1481918507183">start_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="gaussdb_06_0005__p3819155012188">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="gaussdb_06_0005__p18915202416298">Backup time window. Automated backups will be triggered during the backup time window.</p>
<p id="gaussdb_06_0005__p6819135001816">The value must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.</p>
</td>
</tr>
<tr id="gaussdb_06_0005__row8815155081818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="gaussdb_06_0005__p18820950161811">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="gaussdb_06_0005__p118207505185">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="gaussdb_06_0005__p14878194322916">Backup cycle configuration. Data will be automatically backed up on the selected days every week.</p>
<p id="gaussdb_06_0005__p5515127152914">Value range: The value is a number separated by commas (,), indicating the days of the week.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="gaussdb_06_0005__p118211750131817"><strong id="gaussdb_06_0005__b189138470125237">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_06_0005__response_MysqlErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_06_0005__row3822145018182"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="gaussdb_06_0005__p482295061813">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="gaussdb_06_0005__p682315051816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="gaussdb_06_0005__p148231750121813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_06_0005__row1382219507182"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="gaussdb_06_0005__p3823135019183">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="gaussdb_06_0005__p9824195016185">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="gaussdb_06_0005__p17824050131818">Error code.</p>
</td>
</tr>
<tr id="gaussdb_06_0005__row1982235021812"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="gaussdb_06_0005__p8824950171810">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="gaussdb_06_0005__p782416506181">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="gaussdb_06_0005__p382520508185">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="gaussdb_06_0005__p14825185011814"><strong id="gaussdb_06_0005__b8825850101812">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_06_0005__table15825135081811" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_06_0005__row1082511502185"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.1"><p id="gaussdb_06_0005__p48261150101817">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.2"><p id="gaussdb_06_0005__p982615001814">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.8.2.4.1.3"><p id="gaussdb_06_0005__p208272050161810">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_06_0005__row108253509187"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p id="gaussdb_06_0005__p108279501181">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p id="gaussdb_06_0005__p13827450161815">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p id="gaussdb_06_0005__p19827450191814">Error code.</p>
</td>
</tr>
<tr id="gaussdb_06_0005__row98255507188"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p id="gaussdb_06_0005__p148284504184">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p id="gaussdb_06_0005__p1282818509181">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p id="gaussdb_06_0005__p108281450121812">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_06_0005__section1882835061815"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="gaussdb_06_0005__screen1897782512186">GET https://gaussdb-mysql.eu-de.otc.t-systems.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61a4ea66210545909d74a05c27a7179ein07/backups/policy</pre>
</div>
<div class="section" id="gaussdb_06_0005__section16829115016182"><h4 class="sectiontitle">Example Response</h4><p id="gaussdb_06_0005__p13829750151816"><strong id="gaussdb_06_0005__b119408293025045">Status code: 200</strong></p>
<p id="gaussdb_06_0005__p68301550111811">Success.</p>
<pre class="screen" id="gaussdb_06_0005__screen583095017185">{
"backup_policy" : {
"keep_days" : "7,",
"start_time" : "19:00-20:00",
"period" : "1,2"
}
}</pre>
</div>
<div class="section" id="gaussdb_06_0005__section4778540915440"><h4 class="sectiontitle">Status Code</h4><p id="gaussdb_06_0005__p0723374409">For details, see <a href="gaussdb_10_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="gaussdb_06_0005__section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="gaussdb_06_0005__p19357163913406">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_06_0002.html">Backup Management</a></div>
</div>
</div>