doc-exports/docs/dli/api-ref/dli_02_0253.html
Su, Xiaomeng 483e5cc6cc dli_api_20240430
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-05-15 12:04:03 +00:00

170 lines
15 KiB
HTML

<a name="dli_02_0253"></a><a name="dli_02_0253"></a>
<h1 class="topictitle1">Changing the Owner of a Group or Resource Package (Discarded)</h1>
<div id="body1585819115847"><div class="section" id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_s1f0e4fd3d502405199f36f78e68721aa"><h4 class="sectiontitle">Function</h4><p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077927_p104605496304">This API is used to change the owner of a program package.</p>
<div class="note" id="dli_02_0253__note794562214412"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_02_0253__dli_02_0298_p69451622184111">This API has been discarded and is not recommended.</p>
</div></div>
</div>
<div class="section" id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_s9e1b8ec5b57c422a942b19835da7d66e"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077927_ul10082125"><li id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077927_li23630265">URI format<p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077927_p11345797"><a name="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077927_li23630265"></a><a name="en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077927_li23630265"></a>PUT /v2.0/{project_id}/resources/owner</p>
</li><li id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_li1725612218454">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077803_table60779388" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077803_row61411666"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_a420a62a594f9410eaea229ffc8037a61">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.64%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077803_p873025824211">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.72%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0253__p1598213812185">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.64%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_a692d3cd97b464aed90ba6d841900a4a5">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077803_row48589216"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077803_p43412436">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_en-us_topic_0069077803_p26746391">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.72%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0253__p20982138121811">String</p>
</td>
<td class="cellrowborder" valign="top" width="59.64%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0253__p1310472724012">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_section20458182103"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0253__en-us_topic_0103345070_en-us_topic_0102902530_en-us_topic_0069077927_table56638444" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="dli_02_0253__en-us_topic_0103345070_en-us_topic_0102902530_en-us_topic_0069077927_row48911609"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_02_0253__en-us_topic_0103345070_en-us_topic_0102902530_ae076f6b3f1bf463b9cc087fc566253d5">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.81%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_02_0253__p1131813819326">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.110000000000001%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_02_0253__en-us_topic_0103345070_en-us_topic_0102902530_a59685f4525af4d82a623288ff8ccb0f4">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.08%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_02_0253__en-us_topic_0103345070_en-us_topic_0102902530_en-us_topic_0069077927_p632718127368">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0253__en-us_topic_0103345070_en-us_topic_0102902530_row1458133461718"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0253__p26222237285">new_owner</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0253__p96220232286">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.110000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0253__p146221823102820">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.08%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0253__p396633217282">New username. The name contains 5 to 32 characters, including only digits, letters, underscores (_), and hyphens (-). It cannot start with a digit.</p>
</td>
</tr>
<tr id="dli_02_0253__row735714256101"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0253__p962352362812">group_name</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0253__p4446917172914">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.110000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0253__p8447717172910">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.08%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0253__p78371346112817">Group name. The name contains a maximum of 64 characters. Only digits, letters, periods (.), underscores (_), and hyphens (-) are allowed.</p>
</td>
</tr>
<tr id="dli_02_0253__row112881959122516"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0253__p262322312819">resource_name</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0253__p859182112910">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.110000000000001%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0253__p3592102182915">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.08%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0253__p169355312287">Package name. The name can contain only digits, letters, underscores (_), exclamation marks (!), hyphens (-), and periods (.), but cannot start with a period. The length (including the file name extension) cannot exceed 128 characters.</p>
<p id="dli_02_0253__p9737132061917"><strong id="dli_02_0253__b1323584919253">This parameter is mandatory if you want to change the owner of a resource package in a group.</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="dli_02_0253__note137592632612"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_02_0253__p1242052818260"><span class="parmname" id="dli_02_0253__parmname1276216379262"><b>group_name</b></span> and <span class="parmname" id="dli_02_0253__parmname1196134815261"><b>resource_name</b></span> can be used independently or together.</p>
<ul id="dli_02_0253__ul7587175842620"><li id="dli_02_0253__li95881358192615">To change the owner of a group, use <span class="parmname" id="dli_02_0253__parmname2322166102717"><b>group_name</b></span>.</li><li id="dli_02_0253__li1858875832615">To change the owner of a resource package, use <span class="parmname" id="dli_02_0253__parmname1885110101273"><b>resource_name</b></span>.</li><li id="dli_02_0253__li18588185818260">To change the owner of a resource package in a group, use <span class="parmname" id="dli_02_0253__parmname214813170273"><b>group_name</b></span> and <span class="parmname" id="dli_02_0253__parmname168664274278"><b>resource_name</b></span> at the same time.</li></ul>
</div></div>
</div>
<div class="section" id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_sd1ecb66580054b2ea403be8b2272a2c7"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0253__table203572149334" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0253__row9357161473316"><th align="left" class="cellrowborder" valign="top" width="13.03%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0253__p43571314143314">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.91%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0253__p735721410336">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.98%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0253__p935711419333">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.08%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0253__p835715146336">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0253__row5358714133318"><td class="cellrowborder" valign="top" width="13.03%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0253__p11119174311336">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="9.91%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0253__p1111914383311">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0253__p101196439336">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="57.08%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0253__p1452616502331">Whether the request is successfully executed. Value <strong id="dli_02_0253__b070731295014">true</strong> indicates that the request is successfully executed.</p>
</td>
</tr>
<tr id="dli_02_0253__row153581614153319"><td class="cellrowborder" valign="top" width="13.03%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0253__p1811912436336">message</p>
</td>
<td class="cellrowborder" valign="top" width="9.91%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0253__p141192043123313">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0253__p911918438336">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.08%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0253__p148612056163320">System prompt. If execution succeeds, the parameter setting may be left blank.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0253__section1884785414314"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0253__p4404111411331">Change the group name of the program package to <strong id="dli_02_0253__b125891342111814">groupName</strong> and the user name to <strong id="dli_02_0253__b1875385841813">scuser1</strong>.</p>
<pre class="screen" id="dli_02_0253__screen08018575185">{
"new_owner": "scuser1",
"group_name": "groupName"
}</pre>
</div>
<div class="section" id="dli_02_0253__en-us_topic_0104202532_en-us_topic_0102902530_section17446171164041"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0253__screen6891391913">{
"is_success": "true",
"message": ""
}</pre>
</div>
<div class="section" id="dli_02_0253__sf39cfd445ad24e9e82754fcb0027179d"><h4 class="sectiontitle">Status Codes</h4><p id="dli_02_0253__a04144ca3a08e4576b386c6a98f43a2ae"><a href="#dli_02_0253__tb12870f1c5f24b27abd55ca24264af36">Table 4</a> describes the status code.</p>
<div class="tablenoborder"><a name="dli_02_0253__tb12870f1c5f24b27abd55ca24264af36"></a><a name="tb12870f1c5f24b27abd55ca24264af36"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0253__tb12870f1c5f24b27abd55ca24264af36" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="dli_02_0253__r8d54231f95b14c01a5e55e95f3b2e838"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="dli_02_0253__ab49d21f312644072a331f43e92baf853">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.7.3.2.3.1.2"><p id="dli_02_0253__aea1d3bd107bb4c499da79a88832d256c">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0253__r211ad4eb571d4d938e5579998723174e"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0253__a3153e07b3a9749adba92599fe6628fbf">200</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0253__p104431642124811">The modification operations are successful.</p>
</td>
</tr>
<tr id="dli_02_0253__row44937531727"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0253__p184941532219">404</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0253__p2049413539219">Request error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0253__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0253__p420584425712">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Codes</a>.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0253__table847819307387" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Error codes</caption><thead align="left"><tr id="dli_02_0253__row2479163016383"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.8.3.2.3.1.1"><p id="dli_02_0253__p114796309389">Error Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.8.3.2.3.1.2"><p id="dli_02_0253__p1647973053817">Error Message</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0253__row1047920308387"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.8.3.2.3.1.1 "><p id="dli_02_0253__p6904173942012">DLI.0002</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.8.3.2.3.1.2 "><p id="dli_02_0253__p4357953182011">No such user. userName:ssssss.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0166.html">Package Group-related APIs (Discarded)</a></div>
</div>
</div>