forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
190 lines
16 KiB
HTML
190 lines
16 KiB
HTML
<a name="EN-US_TOPIC_0036994323"></a><a name="EN-US_TOPIC_0036994323"></a>
|
|
|
|
<h1 class="topictitle1">Updating the Sharing Status for Images</h1>
|
|
<div id="body1472781317567"><div class="section" id="EN-US_TOPIC_0036994323__section11046056154747"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0036994323__p36522613182741">This API is an extension one and used to update the image sharing status after the tenant accepts or rejects the shared images.</p>
|
|
<p id="EN-US_TOPIC_0036994323__p7229911386">This API is an asynchronous one. If <strong id="EN-US_TOPIC_0036994323__b1693617177116">job_id</strong> is returned, the task is successfully delivered. You need to query the status of the asynchronous task. If the status is <strong id="EN-US_TOPIC_0036994323__b393618171815">success</strong>, the task is successfully executed. If the status is <strong id="EN-US_TOPIC_0036994323__b3937151715116">failed</strong>, the task fails. For details about how to query the status of an asynchronous task, see <a href="en-us_topic_0022473688.html">Querying the Status of an Asynchronous Job</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0036994323__section66620681154747"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0036994323__p171775859356">PUT /v1/cloudimages/members</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0036994323__section29704853154747"><h4 class="sectiontitle">Request</h4><div class="p" id="EN-US_TOPIC_0036994323__p8390114154811">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0036994323__table23910047154747" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0036994323__row24965460154747"><th align="left" class="cellrowborder" valign="top" width="20.86%" id="mcps1.3.3.2.1.1.5.1.1"><p id="EN-US_TOPIC_0036994323__p8936346154747">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.919999999999998%" id="mcps1.3.3.2.1.1.5.1.2"><p id="EN-US_TOPIC_0036994323__p4072498116916">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.990000000000002%" id="mcps1.3.3.2.1.1.5.1.3"><p id="EN-US_TOPIC_0036994323__p52755425154747">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="37.230000000000004%" id="mcps1.3.3.2.1.1.5.1.4"><p id="EN-US_TOPIC_0036994323__p57477321154747">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0036994323__row25151394154747"><td class="cellrowborder" valign="top" width="20.86%" headers="mcps1.3.3.2.1.1.5.1.1 "><p id="EN-US_TOPIC_0036994323__p503796569524">images</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.1.1.5.1.2 "><p id="EN-US_TOPIC_0036994323__p542203749524">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.2.1.1.5.1.3 "><p id="EN-US_TOPIC_0036994323__p297741849524">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.230000000000004%" headers="mcps1.3.3.2.1.1.5.1.4 "><p id="EN-US_TOPIC_0036994323__p628987279524">Specifies the image IDs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row97255929413"><td class="cellrowborder" valign="top" width="20.86%" headers="mcps1.3.3.2.1.1.5.1.1 "><p id="EN-US_TOPIC_0036994323__p178181919524">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.1.1.5.1.2 "><p id="EN-US_TOPIC_0036994323__p339873569524">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.2.1.1.5.1.3 "><p id="EN-US_TOPIC_0036994323__p15124339524">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.230000000000004%" headers="mcps1.3.3.2.1.1.5.1.4 "><p id="EN-US_TOPIC_0036994323__p553982639524">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row387653339418"><td class="cellrowborder" valign="top" width="20.86%" headers="mcps1.3.3.2.1.1.5.1.1 "><p id="EN-US_TOPIC_0036994323__p529068859524">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.1.1.5.1.2 "><p id="EN-US_TOPIC_0036994323__p575993249524">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.2.1.1.5.1.3 "><p id="EN-US_TOPIC_0036994323__p350336309524">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.230000000000004%" headers="mcps1.3.3.2.1.1.5.1.4 "><p id="EN-US_TOPIC_0036994323__p25826739537">Specifies whether a shared image will be accepted or declined.</p>
|
|
<p id="EN-US_TOPIC_0036994323__p166859539539">The value can be one of the following:</p>
|
|
<ul id="EN-US_TOPIC_0036994323__ul346242429557"><li id="EN-US_TOPIC_0036994323__li41401210142719"><strong id="EN-US_TOPIC_0036994323__b84235270693711">accepted</strong>: indicates that a shared image is accepted. After an image is accepted, the image is displayed in the image list. You can use the image to create ECSs.</li><li id="EN-US_TOPIC_0036994323__li17906312142713"><strong id="EN-US_TOPIC_0036994323__b84235270693734">rejected</strong>: indicates that a shared image is declined. After an image is declined, the image is not displayed in the image list. However, you can still use the image to create ECSs.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row25222413200"><td class="cellrowborder" valign="top" width="20.86%" headers="mcps1.3.3.2.1.1.5.1.1 "><p id="EN-US_TOPIC_0036994323__p25362419209">vault_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.1.1.5.1.2 "><p id="EN-US_TOPIC_0036994323__p1853142418208">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.2.1.1.5.1.3 "><p id="EN-US_TOPIC_0036994323__p185392422014">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.230000000000004%" headers="mcps1.3.3.2.1.1.5.1.4 "><p id="EN-US_TOPIC_0036994323__p2071553113019">Specifies the ID of a vault.</p>
|
|
<p id="EN-US_TOPIC_0036994323__p105352411209">This parameter is mandatory if you want to accept a shared full-ECS image created from a CBR backup.</p>
|
|
<p id="EN-US_TOPIC_0036994323__p3165158171619">You can obtain the vault ID from the CBR console or section "Querying the Vault List" in <em id="EN-US_TOPIC_0036994323__i361910498486">Cloud Backup and Recovery API Reference</em>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0036994323__section1250011521016"><h4 class="sectiontitle">Example Request</h4><ul id="EN-US_TOPIC_0036994323__ul1558183483917"><li id="EN-US_TOPIC_0036994323__li45817342395">Updating the image sharing status to <strong id="EN-US_TOPIC_0036994323__b198179341070">accepted</strong> in batches<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0036994323__screen157871741123914"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">PUT</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{Endpoint}/v1/cloudimages/members</span>
|
|
<span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"images"</span><span class="p">:</span><span class="w"> </span><span class="o">[</span>
|
|
<span class="w"> </span><span class="s">"d164b5df-1bc3-4c3f-893e-3e471fd16e64"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"0b680482-acaa-4045-b14c-9a8c7dfe9c70"</span>
|
|
<span class="w"> </span><span class="o">]</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"project_id"</span><span class="p">:</span><span class="w"> </span><span class="s">"edc89b490d7d4392898e19b2deb34797"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"status"</span><span class="p">:</span><span class="w"> </span><span class="s">"accepted"</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0036994323__li3581133418392">Updating the sharing status of images created from CBR backups to <strong id="EN-US_TOPIC_0036994323__b1665611816109">accepted</strong> in batches (vault ID: d14r5tef-1bc3-4c4f-823e-3e471rg65e65)<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0036994323__screen9277184619367"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">PUT</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{Endpoint}/v1/cloudimages/members</span>
|
|
<span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"images"</span><span class="p">:</span><span class="w"> </span><span class="o">[</span>
|
|
<span class="w"> </span><span class="s">"d164b5df-1bc3-4c3f-893e-3e471fd16e64"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"0b680482-acaa-4045-b14c-9a8c7dfe9c70"</span>
|
|
<span class="w"> </span><span class="o">]</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"project_id"</span><span class="p">:</span><span class="w"> </span><span class="s">"edc89b490d7d4392898e19b2deb34797"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"status"</span><span class="p">:</span><span class="w"> </span><span class="s">"accepted"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"vault_id"</span><span class="p">:</span><span class="w"> </span><span class="s">"d14r5tef-1bc3-4c4f-823e-3e471rg65e65"</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0036994323__section42338041154747"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0036994323__ul5242527391115"><li id="EN-US_TOPIC_0036994323__li206541791115">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0036994323__table1858875391115" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0036994323__row5097995091115"><th align="left" class="cellrowborder" valign="top" width="30.486951304869514%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0036994323__p3573529991115">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.078292170782923%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0036994323__p4803685091115">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.434756524347556%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0036994323__p6577961291115">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0036994323__row2654833891115"><td class="cellrowborder" valign="top" width="30.486951304869514%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0036994323__p293180691115">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.078292170782923%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0036994323__p4244468991115">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.434756524347556%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0036994323__p1546781891115">Specifies the asynchronous job ID.</p>
|
|
<p id="EN-US_TOPIC_0036994323__p19968122117312">For details, see <a href="en-us_topic_0022473688.html">Querying the Status of an Asynchronous Job</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0036994323__li3986255291235">Example response<pre class="codeblock" id="EN-US_TOPIC_0036994323__codeblock6641838292551">STATUS CODE 200</pre>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0036994323__screen4148514791229"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"job_id"</span><span class="p">:</span><span class="w"> </span><span class="s">"edc89b490d7d4392898e19b2deb34797"</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0036994323__section40084941"><h4 class="sectiontitle">Returned Values</h4><ul id="EN-US_TOPIC_0036994323__ul4445458"><li id="EN-US_TOPIC_0036994323__li40009126">Normal<p id="EN-US_TOPIC_0036994323__p24537816"><a name="EN-US_TOPIC_0036994323__li40009126"></a><a name="li40009126"></a>200</p>
|
|
</li><li id="EN-US_TOPIC_0036994323__li19513753">Abnormal
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0036994323__table1069408417333" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0036994323__row4772021317333"><th align="left" class="cellrowborder" valign="top" width="46.54%" id="mcps1.3.6.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0036994323__p4013206717333">Returned Value</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.459999999999994%" id="mcps1.3.6.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0036994323__p2947196917333">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0036994323__row3841925517333"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0036994323__p2495195017333">400 Bad Request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0036994323__p784206117333">Request error. For details, see <a href="en-us_topic_0022473689.html">Error Codes</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row3122722917333"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0036994323__p4637763817333">401 Unauthorized</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0036994323__p6560116717333">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row5353959117333"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0036994323__p4173958717333">403 Forbidden</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0036994323__p2546341217333">You do not have the rights to perform the operation.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row5197513192250"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0036994323__p21898657192252">404 Not Found</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0036994323__p28960832192252">The requested resource was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row2784412417333"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0036994323__p4078159117333">500 Internal Server Error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0036994323__p1497458717333">Internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0036994323__row55355517333"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0036994323__p4483799017333">503 Service Unavailable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0036994323__p799858217333">The service is unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0135482660.html">Image Sharing</a></div>
|
|
</div>
|
|
</div>
|
|
|