forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
198 lines
17 KiB
HTML
198 lines
17 KiB
HTML
<a name="swr_02_0048"></a><a name="swr_02_0048"></a>
|
|
|
|
<h1 class="topictitle1">Updating Image Permissions</h1>
|
|
<div id="body8662426"><div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section77501431183312"><h4 class="sectiontitle">Description</h4><p id="swr_02_0048__en-us_topic_0000001230995419_p107501131103311">Update image permissions.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section167501631113319"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0048__en-us_topic_0000001230995419_p16750183153312">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section175133112333"><h4 class="sectiontitle">URI</h4><p id="swr_02_0048__en-us_topic_0000001230995419_p1975153118337">PATCH /v2/manage/namespaces/{namespace}/repos/{repository}/access</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__en-us_topic_0000001230995419_table2752631123317" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="swr_02_0048__en-us_topic_0000001230995419_row1175123113317"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0048__en-us_topic_0000001230995419_p875220315331">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="swr_02_0048__en-us_topic_0000001230995419_p16752113113339">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="swr_02_0048__en-us_topic_0000001230995419_p157535311333">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="swr_02_0048__en-us_topic_0000001230995419_p175317319337">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0048__en-us_topic_0000001230995419_row127511031143311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p147538317332">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p15753153193311">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p18753163113338">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p275333112338">Organization name. Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row11752173117337"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p3754203103310">repository</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p1175433120333">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p875419313331">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p1833713588245">Image repository name. Enter 1 to 128 characters. It must start and end with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. Replace a slash (/) with a dollar sign ($) before you send the request.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section27541531133316"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__en-us_topic_0000001230995419_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0048__en-us_topic_0000001230995419_row157551314336"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0048__en-us_topic_0000001230995419_p1575511313334">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="swr_02_0048__en-us_topic_0000001230995419_p157561231103316">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="swr_02_0048__en-us_topic_0000001230995419_p19756153111333">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="swr_02_0048__en-us_topic_0000001230995419_p975703163317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0048__en-us_topic_0000001230995419_row157551931143312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p675773110334">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p275873112339">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p107591931173314">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p775913315331">Message body type (format). The value can be <strong id="swr_02_0048__en-us_topic_0000001230995419_b10999557119">application/json</strong> or <strong id="swr_02_0048__en-us_topic_0000001230995419_b4999351412">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0048__en-us_topic_0000001230995419_p4759031143311">Default value: <strong id="swr_02_0048__en-us_topic_0000001230995419_b20287481015">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row14755331203315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p1759231113311">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p176033193319">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p1376018315331">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p57606314332">User token.</p>
|
|
<p id="swr_02_0048__en-us_topic_0000001230995419_p676015310337">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0048__en-us_topic_0000001230995419_b121566906411911">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__en-us_topic_0000001230995419_request_RequestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameter</caption><thead align="left"><tr id="swr_02_0048__en-us_topic_0000001230995419_row87601631143310"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="swr_02_0048__en-us_topic_0000001230995419_p07619311332">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="swr_02_0048__en-us_topic_0000001230995419_p167622317330">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="swr_02_0048__en-us_topic_0000001230995419_p176283183316">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="swr_02_0048__en-us_topic_0000001230995419_p1762133115333">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0048__en-us_topic_0000001230995419_row1576115316333"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p57621731183316">[items]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p12762731133315">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p376243111337">Array of <a href="#swr_02_0048__en-us_topic_0000001230995419_request_UserAuth">UserAuth</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p47631318331">Information required for creating image permissions.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0048__en-us_topic_0000001230995419_request_UserAuth"></a><a name="en-us_topic_0000001230995419_request_UserAuth"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__en-us_topic_0000001230995419_request_UserAuth" frame="border" border="1" rules="all"><caption><b>Table 4 </b>UserAuth</caption><thead align="left"><tr id="swr_02_0048__en-us_topic_0000001230995419_row876343103313"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="swr_02_0048__en-us_topic_0000001230995419_p976493163316">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="swr_02_0048__en-us_topic_0000001230995419_p7764173153314">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="swr_02_0048__en-us_topic_0000001230995419_p127641631103319">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="swr_02_0048__en-us_topic_0000001230995419_p2076513133316">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0048__en-us_topic_0000001230995419_row576313153316"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p1076573110335">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p167651731143312">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p376593193316">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p6766123173318">User ID, which needs to be obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row8763113113316"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p13766431193319">user_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p14766163143310">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p14766031173315">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p3766103193313">Username, which needs to be obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row1476333112337"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p18767731143315">auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p3767431133315">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0048__en-us_topic_0000001230995419_p167671931173312">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0048__en-us_topic_0000001230995419_p2767183111334">User permissions. <strong id="swr_02_0048__en-us_topic_0000001230995419_b106985573994419">7</strong>: Manage. <strong id="swr_02_0048__en-us_topic_0000001230995419_b31252488294419">3</strong>: Write. <strong id="swr_02_0048__en-us_topic_0000001230995419_b150733389394419">1</strong>: Read.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section5767183173318"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0048__en-us_topic_0000001230995419_p276753183312">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section157671313337"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0048__en-us_topic_0000001230995419_screen1576817315333">PATCH https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/access
|
|
|
|
[ {
|
|
"user_id" : "fb3f175c1fd146ab8cdae3272be6107b",
|
|
"user_name" : "user01",
|
|
"auth" : 7
|
|
} ]</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section27691131123310"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0048__en-us_topic_0000001230995419_p1769331123312">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section0166832153317"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__en-us_topic_0000001230995419_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0048__en-us_topic_0000001230995419_row10792183119338"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0048__en-us_topic_0000001230995419_p1016720322336">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="swr_02_0048__en-us_topic_0000001230995419_p1316753283314">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0048__en-us_topic_0000001230995419_row17792113113339"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p71671232203314">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p516753253317">Update succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row1679223123311"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p18167183215336">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p191671332103316">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row18792143113317"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p15167332103317">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p141678326331">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row979223117335"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p716753263312">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p316783273315">The image was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0048__en-us_topic_0000001230995419_row16792131123318"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0048__en-us_topic_0000001230995419_p1116715329337">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0048__en-us_topic_0000001230995419_p116793220336">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0048__en-us_topic_0000001230995419_section316713219337"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0048__en-us_topic_0000001230995419_p416763263317">For details, see <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_02_0091.html">Image Permission Management</a></div>
|
|
</div>
|
|
</div>
|
|
|