1
0
forked from docs/doc-exports
doc-exports/docs/dcs/api-ref/dcs-api-0312007.html
Chen, Junjie 5e34f6ce26 DCS API-REF Initial Version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2022-12-09 16:44:56 +00:00

183 lines
15 KiB
HTML

<a name="dcs-api-0312007"></a><a name="dcs-api-0312007"></a>
<h1 class="topictitle1">Modifying Information About a DCS Instance</h1>
<div id="body59271898"><div class="section" id="dcs-api-0312007__section1160237530"><h4 class="sectiontitle">Function</h4><p id="dcs-api-0312007__p78721842259">This API is used to modify the information about a DCS instance, including the instance name, description, backup policy, start and end time of the maintenance window, and security group.</p>
</div>
<div class="section" id="dcs-api-0312007__section1280994914394"><h4 class="sectiontitle">URI</h4><p class="msonormal" id="dcs-api-0312007__p12700155514318">PUT /v1.0/{project_id}/instances/{instance_id}</p>
<div class="p" id="dcs-api-0312007__p8911185533420"><a href="#dcs-api-0312007__table938420556341">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="dcs-api-0312007__table938420556341"></a><a name="table938420556341"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312007__table938420556341" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dcs-api-0312007__row173849558349"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.1"><p id="dcs-api-0312007__p33841155103412">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.2"><p id="dcs-api-0312007__p193842555348">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.3"><p id="dcs-api-0312007__p63841255173414">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.4"><p id="dcs-api-0312007__p63841255193412">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312007__row1038418553349"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312007__p93841755143410">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312007__p93841855183415">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312007__p3384155518344">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312007__p173841855123420">Project ID.</p>
</td>
</tr>
<tr id="dcs-api-0312007__row163841755113413"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312007__p53841255193410">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312007__p538414550343">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312007__p1384165517346">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312007__p0384455123420">DCS instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="dcs-api-0312007__section143751710194016"><h4 class="sectiontitle">Request</h4><p id="dcs-api-0312007__p5654105481017"><strong id="dcs-api-0312007__b619316506172">Request parameters</strong></p>
<div class="p" id="dcs-api-0312007__p1046523193511"><a href="#dcs-api-0312007__table785213273513">Table 2</a> describes the request parameters.
<div class="tablenoborder"><a name="dcs-api-0312007__table785213273513"></a><a name="table785213273513"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312007__table785213273513" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dcs-api-0312007__row1585116223517"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.3.3.2.2.5.1.1"><p id="dcs-api-0312007__p88511827356">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.3.2.2.5.1.2"><p id="dcs-api-0312007__p58515253512">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9%" id="mcps1.3.3.3.2.2.5.1.3"><p id="dcs-api-0312007__p1485112193510">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53%" id="mcps1.3.3.3.2.2.5.1.4"><p id="dcs-api-0312007__p10851925356">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312007__row1085112273514"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.2.2.5.1.1 "><p id="dcs-api-0312007__p1885119243518">name</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.2.5.1.2 "><p id="dcs-api-0312007__p10851112143519">String</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.3.3.3.2.2.5.1.3 "><p id="dcs-api-0312007__p385117263516">No</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.3.2.2.5.1.4 "><p id="dcs-api-0312007__p15851172133513">DCS instance name.</p>
<p id="dcs-api-0312007__p5676152019920">An instance name can contain 4 to 64 characters, including letters, digits, underscores (_), and hyphens (-), and must start with a letter.</p>
</td>
</tr>
<tr id="dcs-api-0312007__row198523215355"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.2.2.5.1.1 "><p id="dcs-api-0312007__p1685115211359">description</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.2.5.1.2 "><p id="dcs-api-0312007__p1585216293512">String</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.3.3.3.2.2.5.1.3 "><p id="dcs-api-0312007__p148521528356">No</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.3.2.2.5.1.4 "><p id="dcs-api-0312007__p1852124352">Brief description of the DCS instance.</p>
<p id="dcs-api-0312007__p1782063116014">A brief description supports up to 1024 characters.</p>
<div class="note" id="dcs-api-0312007__note450874595312"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dcs-api-0312007__p155091445135316">"\" is defined as an escape character in the queue description. If you need to enter a backward slash (\) or a double quotation mark (") in the queue description, enter <strong id="dcs-api-0312007__b12224005144110">\\</strong> or <strong id="dcs-api-0312007__b5675418144110">\"</strong>.</p>
</div></div>
</td>
</tr>
<tr id="dcs-api-0312007__row27821175915"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.2.2.5.1.1 "><p id="dcs-api-0312007__p14303144614">instance_backup_policy</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.2.5.1.2 "><p id="dcs-api-0312007__p183031446120">Object</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.3.3.3.2.2.5.1.3 "><p id="dcs-api-0312007__p93031141411">No</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.3.2.2.5.1.4 "><p id="dcs-api-0312007__p10047281144121">Backup policy.</p>
<p id="dcs-api-0312007__p355912469149">This parameter is available for master/standby and cluster DCS instances. For details, see <a href="dcs-api-0312004.html#dcs-api-0312004__table12803218151513">Table 3</a> and <a href="dcs-api-0312004.html#dcs-api-0312004__table187492037201518">Table 4</a>.</p>
</td>
</tr>
<tr id="dcs-api-0312007__row10563194525819"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.2.2.5.1.1 "><p id="dcs-api-0312007__p1339311593585">maintain_begin</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.2.5.1.2 "><p id="dcs-api-0312007__p1839355913585">String</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.3.3.3.2.2.5.1.3 "><p id="dcs-api-0312007__p13393115916580">No</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.3.2.2.5.1.4 "><p id="dcs-api-0312007__p1058769144129">Time at which the maintenance time window starts.</p>
<p id="dcs-api-0312007__p19394125913588">Format: hh:mm:ss.</p>
<ul id="dcs-api-0312007__ul1039485925815"><li id="dcs-api-0312007__li0394125917583">The start time and end time of the maintenance time window must indicate the time segment of a supported maintenance time window. For details on how to query the time segments of supported maintenance time windows, see <a href="dcs-api-0312041.html">Querying Maintenance Time Window</a>.</li><li id="dcs-api-0312007__li961613298283">The start time must be set to 22:00:00, 02:00:00, 06:00:00, 10:00:00, 14:00:00, or 18:00: 00.</li><li id="dcs-api-0312007__li1529203802813">Parameters <strong id="dcs-api-0312007__b56748219194258">maintain_begin</strong> and <strong id="dcs-api-0312007__b40971925194258">maintain_end</strong> must be set in pairs. If parameter <strong id="dcs-api-0312007__b587561699143218">maintain_begin</strong> is left blank, parameter <strong id="dcs-api-0312007__b786701452143218">maintain_end</strong> is also blank.</li></ul>
</td>
</tr>
<tr id="dcs-api-0312007__row311274695815"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.2.2.5.1.1 "><p id="dcs-api-0312007__p139425905813">maintain_end</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.2.5.1.2 "><p id="dcs-api-0312007__p12394195917585">String</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.3.3.3.2.2.5.1.3 "><p id="dcs-api-0312007__p123941059105813">No</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.3.2.2.5.1.4 "><p id="dcs-api-0312007__p58934172144144">Time at which the maintenance time window ends.</p>
<p id="dcs-api-0312007__p10394205975819">Format: hh:mm:ss.</p>
<ul id="dcs-api-0312007__ul93951259155810"><li id="dcs-api-0312007__li83951959155810">The start time and end time of the maintenance time window must indicate the time segment of a supported maintenance time window. For details on how to query the time segments of supported maintenance time windows, see <a href="dcs-api-0312041.html">Querying Maintenance Time Window</a>.</li></ul>
<ul id="dcs-api-0312007__ul183951559135818"><li id="dcs-api-0312007__li32324820288">The end time is four hours later than the start time. For example, if the start time is 22:00:00, the end time is 02:00:00.</li><li id="dcs-api-0312007__li712320528287">Parameters <strong id="dcs-api-0312007__b52982079194536">maintain_begin</strong> and <strong id="dcs-api-0312007__b24090421194540">maintain_end</strong> must be set in pairs. If parameter <strong id="dcs-api-0312007__b1274439765143241">maintain_end</strong> is left blank, parameter <strong id="dcs-api-0312007__b2016295787143241">maintain_start</strong> is also blank.</li></ul>
</td>
</tr>
<tr id="dcs-api-0312007__row1281151472916"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.3.3.2.2.5.1.1 "><p id="dcs-api-0312007__p5971325112912">security_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.2.5.1.2 "><p id="dcs-api-0312007__p49711125112910">String</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.3.3.3.2.2.5.1.3 "><p id="dcs-api-0312007__p19710250295">No</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.3.2.2.5.1.4 "><p id="dcs-api-0312007__p797132511297">Security group ID.</p>
<p id="dcs-api-0312007__p7952614184115">The value can be obtained from the VPC console or the API.</p>
<p id="dcs-api-0312007__p16561144364118">This parameter is supported only by DCS Redis 3.0 instances.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="dcs-api-0312007__p1773752020114"><strong id="dcs-api-0312007__b969112612184">Example request</strong></p>
<p id="dcs-api-0312007__p155721268514">Request URL:</p>
<pre class="screen" id="dcs-api-0312007__screen777212214167">PUT https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}</pre>
<ul id="dcs-api-0312007__ul541717808"><li id="dcs-api-0312007__li16451713010">Example 1<pre class="screen" id="dcs-api-0312007__screen1455014391019">{
"description": "instance description"
}</pre>
</li><li id="dcs-api-0312007__li165941420300">Example 2<pre class="screen" id="dcs-api-0312007__screen159414201403">{
"name": "dcs002",
"description": "instance description",
"instance_backup_policy": {
"backup_type": "auto",
"save_days": 1,
"periodical_backup_plan": {
"begin_at": "00:00-01:00",
"period_type": "weekly",
"backup_at": [
"1",
"2",
"3",
"4",
"6",
"7"
]
}
},
"security_group_id": "18e9309f-f81a-4749-bb21-f74576292162",
"maintain_begin": "02:00:00",
"maintain_end": "06:00:00"
}</pre>
</li></ul>
</div>
<div class="section" id="dcs-api-0312007__section1971312572428"><h4 class="sectiontitle">Response</h4><p class="msonormal" id="dcs-api-0312007__p11892839181412"><strong id="dcs-api-0312007__b15912745171813">Response parameters</strong></p>
<p id="dcs-api-0312007__p189001324041">None</p>
<p id="dcs-api-0312007__p8592144131417"><strong id="dcs-api-0312007__b09483219331">Example response</strong></p>
<p id="dcs-api-0312007__p790019241847">None</p>
</div>
<div class="section" id="dcs-api-0312007__section1375913561211"><h4 class="sectiontitle">Status Code</h4><p id="dcs-api-0312007__p147591511122"><a href="#dcs-api-0312007__table1475915181216">Table 3</a> describes the status code of successful operations. For details about other status codes, see <a href="dcs-api-0312043.html#dcs-api-0312043__table5210141351517">Table 1</a>.</p>
<div class="tablenoborder"><a name="dcs-api-0312007__table1475915181216"></a><a name="table1475915181216"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312007__table1475915181216" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Status code</caption><thead align="left"><tr id="dcs-api-0312007__row97607581218"><th align="left" class="cellrowborder" valign="top" width="15.98%" id="mcps1.3.5.3.2.3.1.1"><p id="dcs-api-0312007__p1676020511123">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="84.02%" id="mcps1.3.5.3.2.3.1.2"><p id="dcs-api-0312007__p18760351121">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312007__row177611155124"><td class="cellrowborder" valign="top" width="15.98%" headers="mcps1.3.5.3.2.3.1.1 "><p id="dcs-api-0312007__p37612517124">204</p>
</td>
<td class="cellrowborder" valign="top" width="84.02%" headers="mcps1.3.5.3.2.3.1.2 "><p id="dcs-api-0312007__p776112513121">DCS instance modified successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-api-0312003.html">Lifecycle Management APIs</a></div>
</div>
</div>