doc-exports/docs/gaussdb_mysql/api-ref/UpdateInstanceMonitor.html
Hasko, Vladimir c1056e5100 Recreating PR
Reviewed-by: Drobnak, David <david.drobnak@t-systems.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2023-07-11 13:57:29 +00:00

210 lines
16 KiB
HTML

<a name="UpdateInstanceMonitor"></a><a name="UpdateInstanceMonitor"></a>
<h1 class="topictitle1">Changing the Collection Period of Monitoring by Seconds</h1>
<div id="body8662426"><div class="section" id="UpdateInstanceMonitor__section1984772520469"><h4 class="sectiontitle">Function</h4><p id="UpdateInstanceMonitor__p17847162515468">This API is used to enable and disable Monitoring by Seconds, and change its collection period. Before calling this API, you can:</p>
<ul id="UpdateInstanceMonitor__ul924420236520"><li id="UpdateInstanceMonitor__li136356359522">Learn how to <a href="gaussdb_03_0001.html">authorize and authenticate</a> it.</li><li id="UpdateInstanceMonitor__li1991981933613">Obtain the required <a href="gaussdb_00_0003.html">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="UpdateInstanceMonitor__section1784817258461"><h4 class="sectiontitle">URI</h4><p id="UpdateInstanceMonitor__p178481025144614">PUT /v3/{project_id}/instances/{instance_id}/monitor-policy</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateInstanceMonitor__table58481625104616" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="UpdateInstanceMonitor__row3848112510469"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="UpdateInstanceMonitor__p208499253467">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="UpdateInstanceMonitor__p1284910253465">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="UpdateInstanceMonitor__p1284902518464">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="UpdateInstanceMonitor__p1584912257465">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateInstanceMonitor__row14848202517464"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateInstanceMonitor__p1184982515465">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateInstanceMonitor__p10849102518468">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateInstanceMonitor__p184962518465">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateInstanceMonitor__p124971021121714">Project ID of a tenant in a region.</p>
<p id="UpdateInstanceMonitor__p0497172116174">To obtain this value, see <a href="gaussdb_10_0004.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="UpdateInstanceMonitor__row5848192554614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateInstanceMonitor__p6850725154614">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateInstanceMonitor__p4850162534618">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateInstanceMonitor__p5850925194614">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateInstanceMonitor__p38500258468">DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateInstanceMonitor__section16850725184610"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateInstanceMonitor__en-us_topic_0000001199840946_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="UpdateInstanceMonitor__row188514254461"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="UpdateInstanceMonitor__p985172510465">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="UpdateInstanceMonitor__p11851102516465">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="UpdateInstanceMonitor__p1885282515469">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="UpdateInstanceMonitor__p15852725124610">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateInstanceMonitor__row128514257462"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateInstanceMonitor__p20852182514610">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateInstanceMonitor__p1085212594614">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateInstanceMonitor__p1185219251464">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateInstanceMonitor__p685232554617">User token.</p>
</td>
</tr>
<tr id="UpdateInstanceMonitor__row1985132511462"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateInstanceMonitor__p285215258465">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateInstanceMonitor__p17853112512461">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateInstanceMonitor__p48535257465">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateInstanceMonitor__p14853925124610">Language.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateInstanceMonitor__en-us_topic_0000001199840946_request_TaurusModifyInstanceMonitorRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="UpdateInstanceMonitor__row158532025204617"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="UpdateInstanceMonitor__p78541259467">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="UpdateInstanceMonitor__p88542025154613">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="UpdateInstanceMonitor__p68541825154611">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="UpdateInstanceMonitor__p98541425204613">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateInstanceMonitor__row885302511467"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateInstanceMonitor__p185472512467">monitor_switch</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateInstanceMonitor__p1185512515461">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateInstanceMonitor__p2085592519469">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateInstanceMonitor__p10855132574613">Whether to enable Monitoring by Seconds. <strong id="UpdateInstanceMonitor__b56751228296">true</strong> indicates that the function is enabled, and <strong id="UpdateInstanceMonitor__b1814510431919">false</strong> indicates that the function is disabled.</p>
</td>
</tr>
<tr id="UpdateInstanceMonitor__row20853225114614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateInstanceMonitor__p985572514610">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateInstanceMonitor__p3855112520469">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateInstanceMonitor__p2085502574612">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateInstanceMonitor__p17856142518465">Collection period. This parameter is available only when <strong id="UpdateInstanceMonitor__b3665105813914">monitor_switch</strong> is set to <strong id="UpdateInstanceMonitor__b24811481101">true</strong>. The default value is <strong id="UpdateInstanceMonitor__b8258111771012">5s</strong>. This parameter is not displayed when <strong id="UpdateInstanceMonitor__b642692631019">monitor_switch</strong> is set to <strong id="UpdateInstanceMonitor__b7634234111017">false</strong>.</p>
<p id="UpdateInstanceMonitor__p285612534613"><strong id="UpdateInstanceMonitor__b5426181721111">1</strong>: indicates that the collection period is 1s. <strong id="UpdateInstanceMonitor__b18193182291117">5</strong>: indicates that the collection period is 5s.</p>
<p id="UpdateInstanceMonitor__p6856122518467">Valid value:</p>
<ul id="UpdateInstanceMonitor__ul6856925104618"><li id="UpdateInstanceMonitor__li118561825104611"><strong id="UpdateInstanceMonitor__b138568253468">1</strong></li><li id="UpdateInstanceMonitor__li685616258467"><strong id="UpdateInstanceMonitor__b13856192516462">5</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateInstanceMonitor__section12856925104612"><h4 class="sectiontitle">Response Parameters</h4><p id="UpdateInstanceMonitor__p178562025114619"><strong id="UpdateInstanceMonitor__b212527985125041">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateInstanceMonitor__en-us_topic_0000001199840946_response_TaurusModifyInstanceMonitorResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="UpdateInstanceMonitor__row0857132510464"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="UpdateInstanceMonitor__p1585782524620">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="UpdateInstanceMonitor__p13857102515466">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="UpdateInstanceMonitor__p17857122513465">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateInstanceMonitor__row138571925164619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateInstanceMonitor__p7858725194620">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateInstanceMonitor__p685815251464">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateInstanceMonitor__p4858172520464">Taskflow ID for modifying Monitoring by Seconds</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="UpdateInstanceMonitor__p14858102518460"><strong id="UpdateInstanceMonitor__b71422667225232">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateInstanceMonitor__en-us_topic_0000001199840946_response_MysqlErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="UpdateInstanceMonitor__row1985812251461"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="UpdateInstanceMonitor__p13859172511464">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="UpdateInstanceMonitor__p9859102584619">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="UpdateInstanceMonitor__p108596252467">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateInstanceMonitor__row14858625154617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateInstanceMonitor__p128597258462">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateInstanceMonitor__p1785902513467">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateInstanceMonitor__p14860125154615">Error code.</p>
</td>
</tr>
<tr id="UpdateInstanceMonitor__row885862518461"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateInstanceMonitor__p12860425174614">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateInstanceMonitor__p5860152534618">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateInstanceMonitor__p1860122517468">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="UpdateInstanceMonitor__p786062524617"><strong id="UpdateInstanceMonitor__b1860122516462">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateInstanceMonitor__table58603255462" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="UpdateInstanceMonitor__row18861172516465"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p id="UpdateInstanceMonitor__p1186192517465">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p id="UpdateInstanceMonitor__p1786152544610">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p id="UpdateInstanceMonitor__p7861132584619">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateInstanceMonitor__row17861132574617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateInstanceMonitor__p1186162594614">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateInstanceMonitor__p12862202519465">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateInstanceMonitor__p3862825174620">Error code.</p>
</td>
</tr>
<tr id="UpdateInstanceMonitor__row138613254460"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateInstanceMonitor__p686272504619">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateInstanceMonitor__p3862325184616">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateInstanceMonitor__p186218252463">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateInstanceMonitor__section1186282594614"><h4 class="sectiontitle">Example Request</h4><p id="UpdateInstanceMonitor__p8863102554615">Modifying the collection period of Monitoring by Seconds for an instance. The current collection period to 1s.</p>
<pre class="screen" id="UpdateInstanceMonitor__screen1786314254468">
PUT https://gaussdb-mysql.eu-de.otc.t-systems.com/v3/054e292c9880d4992f02c0196d3ea468/instances/61a4ea66210545909d74a05c27a7179ein07/monitor-policy
{
"monitor_switch" : true,
"period" : 1
}</pre>
</div>
<div class="section" id="UpdateInstanceMonitor__section286472518462"><h4 class="sectiontitle">Example Response</h4><p id="UpdateInstanceMonitor__p786432584614"><strong id="UpdateInstanceMonitor__b83540808925041">Status code: 200</strong></p>
<p id="UpdateInstanceMonitor__p11864202554612">Success.</p>
<pre class="screen" id="UpdateInstanceMonitor__screen20864125114614">{
"job_id" : "6b7dd5d4-4590-4f14-b164-a8737ce071d5"
}</pre>
</div>
<div class="section" id="UpdateInstanceMonitor__section181282211518"><h4 class="sectiontitle">Status Code</h4><p id="UpdateInstanceMonitor__p2012810205114">For details, see <a href="gaussdb_10_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="UpdateInstanceMonitor__section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="UpdateInstanceMonitor__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_04_0003.html">Managing DB Instances</a></div>
</div>
</div>