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>
194 lines
16 KiB
HTML
194 lines
16 KiB
HTML
<a name="swr_02_0042"></a><a name="swr_02_0042"></a>
|
|
|
|
<h1 class="topictitle1">Creating Organization Permissions</h1>
|
|
<div id="body8662426"><div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section11161231183312"><h4 class="sectiontitle">Description</h4><p id="swr_02_0042__en-us_topic_0000001231195473_p1716153113338">Create organization permissions.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section161616311338"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0042__en-us_topic_0000001231195473_p31663115334">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section416173119332"><h4 class="sectiontitle">URI</h4><p id="swr_02_0042__en-us_topic_0000001231195473_p1517731133319">POST /v2/manage/namespaces/{namespace}/access</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__en-us_topic_0000001231195473_table118183118332" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameter</caption><thead align="left"><tr id="swr_02_0042__en-us_topic_0000001231195473_row517431193319"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0042__en-us_topic_0000001231195473_p5181431113318">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_0042__en-us_topic_0000001231195473_p17191318338">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_0042__en-us_topic_0000001231195473_p111916317339">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_0042__en-us_topic_0000001231195473_p151983117331">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__en-us_topic_0000001231195473_row11853115335"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p131983113332">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p32012317336">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p182053173318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0042__en-us_topic_0000001231195473_p1620131103315">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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section102053123311"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__en-us_topic_0000001231195473_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0042__en-us_topic_0000001231195473_row2211731103317"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0042__en-us_topic_0000001231195473_p1622173123317">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_0042__en-us_topic_0000001231195473_p172263153320">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_0042__en-us_topic_0000001231195473_p102203133320">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_0042__en-us_topic_0000001231195473_p0221331193310">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__en-us_topic_0000001231195473_row121173118330"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p42293163310">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p192211317331">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p52217315339">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0042__en-us_topic_0000001231195473_p123431163319">Message body type (format). The value can be <strong id="swr_02_0042__en-us_topic_0000001231195473_b742319255013">application/json</strong> or <strong id="swr_02_0042__en-us_topic_0000001231195473_b124237257017">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0042__en-us_topic_0000001231195473_p22373112331">Default value: <strong id="swr_02_0042__en-us_topic_0000001231195473_b3760102713015">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row18216313339"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p0231031203310">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_0042__en-us_topic_0000001231195473_p142373113315">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p192393183317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0042__en-us_topic_0000001231195473_p8241431153318">User token.</p>
|
|
<p id="swr_02_0042__en-us_topic_0000001231195473_p124173114333">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0042__en-us_topic_0000001231195473_b20996962561194">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_0042__en-us_topic_0000001231195473_request_RequestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameter</caption><thead align="left"><tr id="swr_02_0042__en-us_topic_0000001231195473_row1924113153315"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="swr_02_0042__en-us_topic_0000001231195473_p18251431163315">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_0042__en-us_topic_0000001231195473_p125113133320">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_0042__en-us_topic_0000001231195473_p1025143118339">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_0042__en-us_topic_0000001231195473_p16254317331">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__en-us_topic_0000001231195473_row192410313334"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p32511311332">[items]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p152683116330">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p626173115335">Array of <a href="#swr_02_0042__en-us_topic_0000001231195473_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_0042__en-us_topic_0000001231195473_p22663123314">Information required for creating organization permissions.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0042__en-us_topic_0000001231195473_request_UserAuth"></a><a name="en-us_topic_0000001231195473_request_UserAuth"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__en-us_topic_0000001231195473_request_UserAuth" frame="border" border="1" rules="all"><caption><b>Table 4 </b>UserAuth</caption><thead align="left"><tr id="swr_02_0042__en-us_topic_0000001231195473_row426183116333"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="swr_02_0042__en-us_topic_0000001231195473_p152720316337">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_0042__en-us_topic_0000001231195473_p15270315333">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_0042__en-us_topic_0000001231195473_p102813110335">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_0042__en-us_topic_0000001231195473_p1828163123312">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__en-us_topic_0000001231195473_row1726143123314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p5285316339">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p12813114338">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p172833153310">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0042__en-us_topic_0000001231195473_p1628931193313">User ID, which needs to be obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row1027173114339"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p928173113334">user_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p52973118339">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p102983183318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0042__en-us_topic_0000001231195473_p329113143314">Username, which needs to be obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row827831143311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p4291931123311">auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p152913183316">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0042__en-us_topic_0000001231195473_p1329163143316">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0042__en-us_topic_0000001231195473_p530031173320">User permissions. <strong id="swr_02_0042__en-us_topic_0000001231195473_b484717129307">7</strong>: manage. <strong id="swr_02_0042__en-us_topic_0000001231195473_b12848412153017">3</strong>: edit. <strong id="swr_02_0042__en-us_topic_0000001231195473_b784812128309">1</strong>: read.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section163023120333"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0042__en-us_topic_0000001231195473_p1430193110339">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section1430183173310"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0042__en-us_topic_0000001231195473_screen1730531133318">POST https://{endpoint}/v2/manage/namespaces/{namespace}/access
|
|
|
|
[ {
|
|
"user_id" : "fb3f175c1fd146ab8cdae3272be6107b",
|
|
"user_name" : "user01",
|
|
"auth" : 1
|
|
} ]</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section1731831173317"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0042__en-us_topic_0000001231195473_p153117315330">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section1548013310335"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__en-us_topic_0000001231195473_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0042__en-us_topic_0000001231195473_row649143118338"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0042__en-us_topic_0000001231195473_p15480153153315">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_0042__en-us_topic_0000001231195473_p548133163313">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__en-us_topic_0000001231195473_row1449123153318"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p13481183163320">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p19481183112331">Creation succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row114973163317"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p6481133183316">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p4481731113310">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row1349931143317"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p1348163113333">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p13481153143317">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row4491314331"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p1848118318336">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p194815318335">The organization was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row6498317339"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p15481133153313">409</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p34811531163314">The organization permission already exists.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__en-us_topic_0000001231195473_row24933143317"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0042__en-us_topic_0000001231195473_p6481133133317">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0042__en-us_topic_0000001231195473_p5481193112335">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__en-us_topic_0000001231195473_section19481123103317"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0042__en-us_topic_0000001231195473_p13481831193316">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_0090.html">Organization Permission Management</a></div>
|
|
</div>
|
|
</div>
|
|
|