doc-exports/docs/dws/api-ref/dws_02_0026.html
Lu, Huayi 24f47208ec DWS API 831.100 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-10-07 10:18:56 +00:00

204 lines
17 KiB
HTML

<a name="EN-US_TOPIC_0000001185673172"></a><a name="EN-US_TOPIC_0000001185673172"></a>
<h1 class="topictitle1">Creating a Snapshot</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_sca64f36627a3417bbeb0c43855a40ce7"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_aa1b0da11092d4f65a968e39f0eca4859">This API is used to create snapshots for a specified cluster.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_s79bb432d7cfa4d6ba3fe910602033e78"><h4 class="sectiontitle">URI</h4><pre class="screen" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_screen23853128599">POST /v1.0/{project_id}/snapshots</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185673172__table1809165211303" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185673172__row480812523309"><th align="left" class="cellrowborder" valign="top" width="15.76%" id="mcps1.3.2.3.2.5.1.1"><p id="EN-US_TOPIC_0000001185673172__p280725263018"><strong id="EN-US_TOPIC_0000001185673172__b203113932082021">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.94%" id="mcps1.3.2.3.2.5.1.2"><p id="EN-US_TOPIC_0000001185673172__p16808852153010"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b6167984116271">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.479999999999999%" id="mcps1.3.2.3.2.5.1.3"><p id="EN-US_TOPIC_0000001185673172__p1880845216306"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b14166175915269">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61.82%" id="mcps1.3.2.3.2.5.1.4"><p id="EN-US_TOPIC_0000001185673172__p11808155219306"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b169519010270">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185673172__row78096524305"><td class="cellrowborder" valign="top" width="15.76%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185673172__p10808185217309">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="9.94%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185673172__p6808652163017">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.479999999999999%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185673172__p18808105213018">String</p>
</td>
<td class="cellrowborder" valign="top" width="61.82%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185673172__p1280915529306"><span id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_text1665163515339">Project ID</span>. For details about how to obtain the project ID, see <a href="dws_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001185673172__section920117192315"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185673172__table18646131173112" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185673172__row5646173117315"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001185673172__p46471131133114"><strong id="EN-US_TOPIC_0000001185673172__b17285498682021">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001185673172__p2064717319312"><strong id="EN-US_TOPIC_0000001185673172__b1281421947">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000001185673172__p6647731123120"><strong id="EN-US_TOPIC_0000001185673172__b57974975">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001185673172__p9647113115313"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b9302121482713">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185673172__row4647431173113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001185673172__p16471831183114">snapshot</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001185673172__p5647531103117">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001185673172__p5647123193110"><a href="#EN-US_TOPIC_0000001185673172__table136481731183114">Snapshot</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001185673172__p264833123116">Snapshot object</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001185673172__table136481731183114"></a><a name="table136481731183114"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185673172__table136481731183114" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Snapshot</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185673172__row7648123103118"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000001185673172__p1664812318311"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b181618438357">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="EN-US_TOPIC_0000001185673172__p2064819318317"><strong id="EN-US_TOPIC_0000001185673172__b1311731264">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="EN-US_TOPIC_0000001185673172__p196481316310"><strong id="EN-US_TOPIC_0000001185673172__b639414202">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="EN-US_TOPIC_0000001185673172__p186481031173115"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b569345143514">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185673172__row2064983103115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185673172__p1649931113112">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185673172__p964923119311">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185673172__p3649153110318">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185673172__p364920319318">Snapshot name, which must be unique and start with a letter. It consists of 4 to 64 characters, which are case-insensitive and contain letters, digits, hyphens (-), and underscores (_) only.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row764914318317"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185673172__p196494310311">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185673172__p764913103114">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185673172__p13649183143112">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185673172__p4649103163112">ID of the cluster for which you want to create a snapshot. For details about how to obtain the ID, see <a href="dws_02_00068.html">Obtaining the Cluster ID</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row136501631123112"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185673172__p8650631153115">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185673172__p15650123153120">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185673172__p19650831143118">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185673172__p20650331163112">Snapshot description. If no value is specified, the description is empty. Enter a maximum of 256 characters. The following special characters are not allowed: !&lt;&gt;'=&amp;"</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001185673172__section9486042103111"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185673172__table556165414316" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185673172__row10561854163119"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="EN-US_TOPIC_0000001185673172__p157185412313"><strong id="EN-US_TOPIC_0000001185673172__b196626520982021">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.2"><p id="EN-US_TOPIC_0000001185673172__p25711546316"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b152305033517">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.2.2.4.1.3"><p id="EN-US_TOPIC_0000001185673172__p3571547311"><strong id="EN-US_TOPIC_0000001185673172__b919861790">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185673172__row195719545311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001185673172__p115765414311">snapshot</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001185673172__p1757125415312"><a href="#EN-US_TOPIC_0000001185673172__table195813546313">SnapshotResp</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001185673172__p958854173120">Snapshot object</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001185673172__table195813546313"></a><a name="table195813546313"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185673172__table195813546313" frame="border" border="1" rules="all"><caption><b>Table 5 </b>SnapshotResp</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185673172__row1858554153120"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0000001185673172__p175815411313"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b1587945410352">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0000001185673172__p18581654143115"><strong id="EN-US_TOPIC_0000001185673172__b215116164">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0000001185673172__p13581354103119"><strong id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_b275016561359">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185673172__row25814541312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001185673172__p175805433119">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001185673172__p14591254143117">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001185673172__p17599541319">Snapshot ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_s21224531b3af41768965da75256b6574"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0000001185673172__screen7161145015294">POST https://{Endpoint}/v1.0/89cd04f168b84af6be287f71730fdb4b/snapshots
{
"snapshot" : {
"name" : "snapshot-3",
"cluster_id" : "44b277eb-39be-4921-be31-3d61b43651d7",
"description" : "Snapshot-3 description"
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_s74ab9ad56efb4dddbd3dd843c2374513"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_sdaaaf97b5ae446aa87884f56b09b844b">{
"snapshot": {
"id": "2a4d0f86-67cd-408a-8b66-017454fb7793"
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001098656810_s763e6683944443b1a55793807c544818"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185673172__en-us_topic_0000001387338900_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001185673172__row12762174151818"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="EN-US_TOPIC_0000001185673172__p1877454110183">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="EN-US_TOPIC_0000001185673172__p27781741121816"><strong id="EN-US_TOPIC_0000001185673172__b1873277748">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185673172__row15762341121814"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p7782241141816">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p978514120184">The snapshot is created.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row197621541171814"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p6788194161817">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p5791141121814">Request error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row17621041121818"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p1579411417181">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p167981241131811">Authentication failed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row5762144101819"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p158025411184">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p38051641151814">You do not have required permissions.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row13763124114182"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p16809441111820">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p168131941191815">No resources found.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row1976314191818"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p78166413184">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p1781994181819">Internal service error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185673172__row6763541141812"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185673172__p118237416188">503</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001185673172__p7827124191810">Service unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_02_0023.html">Snapshot Management APIs</a></div>
</div>
</div>