Files
doc-exports/docs/rds/api-ref/rds_05_0040.html
wangdengke2 1ddaec1a62 rds_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>
2026-01-29 11:28:26 +00:00

197 lines
20 KiB
HTML

<a name="rds_05_0040"></a><a name="rds_05_0040"></a>
<h1 class="topictitle1">Obtaining Links for Downloading Error Logs (RDS for PostgreSQL)</h1>
<div id="body0000002506545815"><div class="section" id="rds_05_0040__en-us_topic_0245436507_section61759636"><h4 class="sectiontitle">Function</h4><p id="rds_05_0040__en-us_topic_0000001896189758_p1353124262214">This API is used to obtain links for downloading error logs of a DB instance.</p>
<p id="rds_05_0040__en-us_topic_0000001896189758_p10531104282210">You need to call this API repeatedly until <strong id="rds_05_0040__b1022332713223">FINISH</strong> is returned for <strong id="rds_05_0040__b10293163022216">status</strong>.</p>
<p id="rds_05_0040__en-us_topic_0000001896189758_p105312424225">Or, you can use the <strong id="rds_05_0040__b19558523162315">workflow_id</strong> value returned by the first API call to query the task status. After the task is successfully executed, call the API again to obtain the download link.</p>
<ul id="rds_05_0040__en-us_topic_0245436507_ul12259155218373"><li id="rds_05_0040__en-us_topic_0245436507_en-us_topic_0110967248_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_05_0040__en-us_topic_0245436507_en-us_topic_0110967248_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_05_0040__section2563029124413"><h4 class="sectiontitle">Constraints</h4><p id="rds_05_0040__p04473257307">This API can only be used to obtain links for downloading error logs of an instance that is working properly.</p>
</div>
<div class="section" id="rds_05_0040__en-us_topic_0245436507_section18965813"><h4 class="sectiontitle">URI</h4><ul id="rds_05_0040__en-us_topic_0245436507_ul13194498"><li id="rds_05_0040__en-us_topic_0245436507_li41603465301">URI format<p id="rds_05_0040__en-us_topic_0245436507_p11160246123012"><a name="rds_05_0040__en-us_topic_0245436507_li41603465301"></a><a name="en-us_topic_0245436507_li41603465301"></a>POST https://{<em id="rds_05_0040__en-us_topic_0245436507_i11252164981618">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/errorlog-download</p>
</li></ul>
<ul id="rds_05_0040__en-us_topic_0245436507_ul55999443"><li id="rds_05_0040__en-us_topic_0245436507_li21405046">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0040__en-us_topic_0245436507_table58427690" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_05_0040__en-us_topic_0245436507_row1482002"><th align="left" class="cellrowborder" valign="top" width="21.3%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="rds_05_0040__en-us_topic_0245436507_p52933326"><strong id="rds_05_0040__en-us_topic_0245436507_b95793182501">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.860000000000001%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="rds_05_0040__en-us_topic_0245436507_p59740974"><strong id="rds_05_0040__en-us_topic_0245436507_b63061913506">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63.839999999999996%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="rds_05_0040__en-us_topic_0245436507_p7180698"><strong id="rds_05_0040__en-us_topic_0245436507_b917162020508">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0040__en-us_topic_0245436507_row44765691"><td class="cellrowborder" valign="top" width="21.3%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p2142393">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.860000000000001%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p39316155">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="63.839999999999996%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p30492010">Specifies the project ID of a tenant in a region.</p>
<p id="rds_05_0040__en-us_topic_0245436507_p7139608914">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_05_0040__en-us_topic_0245436507_row5992637"><td class="cellrowborder" valign="top" width="21.3%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p15641626">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.860000000000001%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p59012183">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="63.839999999999996%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p15257500">Specifies the ID of the DB instance to be queried.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_05_0040__en-us_topic_0245436507_section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_05_0040__en-us_topic_0245436507_ul1677317341210"><li id="rds_05_0040__en-us_topic_0245436507_li1830813567439">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0040__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_05_0040__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="rds_05_0040__p95111733143318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="rds_05_0040__p13511123373311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="rds_05_0040__p125111433133312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="rds_05_0040__p551110331335">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0040__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="rds_05_0040__p1163015550331">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="rds_05_0040__p1963035563316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="rds_05_0040__p1630105520331">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="rds_05_0040__p1086851153317">Specifies the user token.</p>
<p id="rds_05_0040__p1057635831">The user token is a response to the API used to <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html" target="_blank" rel="noopener noreferrer">obtain a user token</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_05_0040__ul186310119584"><li id="rds_05_0040__en-us_topic_0245436507_li4411135064210">Example<pre class="screen" id="rds_05_0040__screen1376271713103">POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/3d39c18788b54a919bab633874c159dfin03/errorlog-download</pre>
</li></ul>
</div>
<div class="section" id="rds_05_0040__en-us_topic_0245436507_section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_05_0040__en-us_topic_0245436507_ul66273227"><li id="rds_05_0040__en-us_topic_0245436507_li59588135">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0040__en-us_topic_0245436507_table29752153" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="rds_05_0040__en-us_topic_0245436507_row62070345"><th align="left" class="cellrowborder" valign="top" width="23.880000000000003%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="rds_05_0040__en-us_topic_0245436507_p61642077"><strong id="rds_05_0040__en-us_topic_0245436507_b93806355532">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.119999999999997%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="rds_05_0040__en-us_topic_0245436507_p26952341"><strong id="rds_05_0040__en-us_topic_0245436507_b1491363511533">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="rds_05_0040__en-us_topic_0245436507_p35656026"><strong id="rds_05_0040__en-us_topic_0245436507_b19357153675319">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0040__en-us_topic_0245436507_row49943891183823"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p9423342133810">list</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p542317427389">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p642313424387">List of links for downloading error logs. For details, see <a href="#rds_05_0040__en-us_topic_0245436507_table222815913918">Table 4</a>.</p>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row982565516377"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p1482510551375">status</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p2825195543717">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p638553192018">Status of the error log download link.</p>
<ul id="rds_05_0040__en-us_topic_0245436507_ul8238659192010"><li id="rds_05_0040__en-us_topic_0245436507_li423855982017"><strong id="rds_05_0040__en-us_topic_0245436507_b14683154155410">FINISH</strong>: The download link has been generated.</li><li id="rds_05_0040__en-us_topic_0245436507_li1623814599206"><strong id="rds_05_0040__en-us_topic_0245436507_b16116114558">CREATING</strong>: A file is being generated and the download link is being prepared.</li><li id="rds_05_0040__en-us_topic_0245436507_li923919599200"><strong id="rds_05_0040__en-us_topic_0245436507_b51878262558">FAILED</strong>: The log file fails to be prepared.</li></ul>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row958691303913"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p9586151383916">count</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p1586313103912">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p15587413203918">Number of error log links.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rds_05_0040__en-us_topic_0245436507_table222815913918"></a><a name="en-us_topic_0245436507_table222815913918"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0040__en-us_topic_0245436507_table222815913918" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Data structure description of the list field</caption><thead align="left"><tr id="rds_05_0040__en-us_topic_0245436507_row52291859173911"><th align="left" class="cellrowborder" valign="top" width="23.882388238823886%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="rds_05_0040__en-us_topic_0245436507_p13229115963916"><strong id="rds_05_0040__en-us_topic_0245436507_b16521133895820">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.784278427842786%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="rds_05_0040__en-us_topic_0245436507_p182291598396"><strong id="rds_05_0040__en-us_topic_0245436507_b20130183910587">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="rds_05_0040__en-us_topic_0245436507_p122294599399"><strong id="rds_05_0040__en-us_topic_0245436507_b102691241145815">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0040__en-us_topic_0245436507_row222955914391"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p1522914593393">workflow_id</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p1722911599394">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p6229195933910">Task ID.</p>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row1822985912399"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p722925913916">file_name</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p022945918391">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0000001896189758_p15229125963912">Name of the generated file for downloading.</p>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row18229759143915"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p122985923917">status</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p1622920591397">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__p17827155510152">Status of the current link.</p>
<ul id="rds_05_0040__ul290862471315"><li id="rds_05_0040__li09081124131312"><strong id="rds_05_0040__b42571321353">SUCCESS</strong>: The download link is successfully generated.</li><li id="rds_05_0040__li199082024121316"><strong id="rds_05_0040__b9246151518358">FAILED</strong>: The download link failed to be generated.</li></ul>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row92292059163911"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p17229195919393">file_size</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p10229759103910">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p32296591391">File size, in bytes.</p>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row1522985943915"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p162291259133912">file_link</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p15229195973918">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__p1062558598">Download link.</p>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row72291159133910"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p1822925953914">create_at</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p322915953915">Long</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__en-us_topic_0245436507_p1322913599395">Generation time in the UNIX timestamp format. The unit is millisecond and the time zone is UTC.</p>
</td>
</tr>
<tr id="rds_05_0040__en-us_topic_0245436507_row467516317420"><td class="cellrowborder" valign="top" width="23.882388238823886%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="rds_05_0040__en-us_topic_0245436507_p66761131114211">update_at</p>
</td>
<td class="cellrowborder" valign="top" width="42.784278427842786%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="rds_05_0040__en-us_topic_0245436507_p239633710423">Long</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="rds_05_0040__p14412133751618">Update time in the UNIX timestamp format. The unit is millisecond and the time zone is UTC.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="rds_05_0040__li40040492">Example normal response<p id="rds_05_0040__en-us_topic_0000001896189758_p2948156141320"><a name="rds_05_0040__li40040492"></a><a name="li40040492"></a>Link for downloading error logs obtained successfully.</p>
<pre class="screen" id="rds_05_0040__screen1663919720334">{
"list" : [ {
"workflow_id" : "44fb1d85-2fcc-4d63-ad3b-c3d1ecd7000e",
"file_name" : "054bc9c1f680d55c1f36c006e5a9f67b_errorlog_download_20200515080614589",
"status" : "success",
"file_size" : "0",
"file_link" : "****.com:443/054bc9c1f680d55c1f36c006e5a9f67b_errorlog_download_20200515080614589?AWSAccessKeyId=1BQ38TBCQHAVQXBUMUTC&amp;Expires=1589530200&amp;response-cache-control=no-cache%2Cno-store&amp;Signature=Fgi4%2BLOJ9frAXyOkz5hRoW5O%2BUM%3D",
"create_at" : 1589529991385,
"update_at" : 1589529991385
} ],
"status" : "finish",
"count" : 1
}</pre>
</li></ul>
<ul id="rds_05_0040__en-us_topic_0245436507_ul26818564"><li id="rds_05_0040__en-us_topic_0245436507_li1953636143515">Abnormal response<p id="rds_05_0040__en-us_topic_0245436507_p46896054"><a name="rds_05_0040__en-us_topic_0245436507_li1953636143515"></a><a name="en-us_topic_0245436507_li1953636143515"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_05_0040__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_05_0040__en-us_topic_0032347778_ul7858132212142"><li id="rds_05_0040__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_05_0040__en-us_topic_0032347778_p1040982941020"><a name="rds_05_0040__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_05_0040__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_05_0040__en-us_topic_0032347778_p0723374409"><a name="rds_05_0040__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_05_0040__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_05_0040__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_0056887472.html">Log Information Queries</a></div>
</div>
</div>