Files
doc-exports/docs/iam/api-ref/iam_02_0633.html
weihongmin1 46d24ba358 IAM API 0401 Version
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com>
Co-authored-by: weihongmin1 <weihongmin1@huawei.com>
Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
2026-01-14 14:13:49 +00:00

193 lines
16 KiB
HTML

<a name="iam_02_0633"></a><a name="iam_02_0633"></a>
<h1 class="topictitle1">Granting Permissions to Agencies Associated with Specified Enterprise Projects</h1>
<div id="body8662426"><div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section14855102554412"><h4 class="sectiontitle">Function</h4><p id="iam_02_0633__en-us_topic_0000001491323110_p38561925174417">This API is used to grant permissions to agencies associated with specified enterprise projects.</p>
</div>
<div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section985622544415"><h4 class="sectiontitle">URI</h4><p id="iam_02_0633__en-us_topic_0000001491323110_p148568256442">PUT /v3.0/OS-PERMISSION/subjects/agency/scopes/enterprise-project/role-assignments</p>
</div>
<div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section12863425164414"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0633__en-us_topic_0000001491323110_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_02_0633__en-us_topic_0000001491323110_row5863172512442"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_02_0633__en-us_topic_0000001491323110_p68641925174413"><strong id="iam_02_0633__en-us_topic_0000001491323110_b866610367205">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_02_0633__en-us_topic_0000001491323110_p10864025204411"><strong id="iam_02_0633__en-us_topic_0000001491323110_b20645123712200">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_02_0633__en-us_topic_0000001491323110_p1486592515446">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_02_0633__en-us_topic_0000001491323110_p586517259446">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0633__en-us_topic_0000001491323110_row144702194216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p14702191526">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p154704194213">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0633__en-us_topic_0000001491323110_p14706191326">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0633__en-us_topic_0000001491323110_p14470191917212">Fill <strong id="iam_02_0633__en-us_topic_0000001491323110_b25763205506">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_row8863172544415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p5865925134415">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p19866132510448">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0633__en-us_topic_0000001491323110_p14866132534416">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0633__en-us_topic_0000001491323110_p1186642512445">Authenticated token with <strong id="iam_02_0633__en-us_topic_0000001491323110_b04210432208">iam:permissions:grantRoleToAgencyOnEnterpriseProject</strong> or <strong id="iam_02_0633__en-us_topic_0000001491323110_b104313432207">Security Administrator</strong> permissions.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_requestParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request body</caption><thead align="left"><tr id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_row1818954855520"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p111902048105516"><strong id="iam_02_0633__en-us_topic_0000001491323110_b9545155212010">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.3.2.5.1.2"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p14190144819556"><strong id="iam_02_0633__en-us_topic_0000001491323110_b48581153162010">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p21908483556">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.5.1.4"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p16191114816557">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_row518913480559"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p13529434205013"><a href="#iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_request_Rq123Agency">role_assignments</a></p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p11911488554">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p111921348195512">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_02_0633__en-us_topic_0000001491323110_p13838454105011">Association between agencies and enterprise projects. A maximum of 250 association records are supported.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_request_Rq123Agency"></a><a name="en-us_topic_0000001491323110_en-us_topic_0222594411_request_Rq123Agency"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_request_Rq123Agency" frame="border" border="1" rules="all"><caption><b>Table 3 </b>role_assignments</caption><thead align="left"><tr id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_row1619364835511"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p419414816558"><strong id="iam_02_0633__en-us_topic_0000001491323110_b326924372214">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.4.2.5.1.2"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p31941048165516"><strong id="iam_02_0633__en-us_topic_0000001491323110_b11886644102215">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p1119416484554">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.4.2.5.1.4"><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p319444812555">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_row1819334819555"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p8195948155517">agency_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.4.2.5.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p8195174875514">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p19195164815554">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.4.2.5.1.4 "><p id="iam_02_0633__en-us_topic_0000001491323110_p754964845116">Agency ID.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_row419384825518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p14196184812552">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.4.2.5.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p17196164817555">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p619618485551">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.4.2.5.1.4 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p131961048145516">Enterprise project ID.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_row319313483557"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p3196184818555">role_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.4.2.5.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p19197134865513">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="iam_02_0633__en-us_topic_0000001491323110_en-us_topic_0222594411_p41971248115513">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.4.2.5.1.4 "><p id="iam_02_0633__en-us_topic_0000001491323110_p13604210528">Policy ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section1186762518441"><h4 class="sectiontitle">Response Parameters</h4><p id="iam_02_0633__en-us_topic_0000001491323110_p286720257447">None</p>
</div>
<div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section4867202504413"><h4 class="sectiontitle">Example Request</h4><p id="iam_02_0633__en-us_topic_0000001491323110_p1686418418117">Request for granting permissions to agencies associated with a specified enterprise project</p>
<pre class="screen" id="iam_02_0633__en-us_topic_0000001491323110_screen786832515445">PUT /v3.0/OS-PERMISSION/subjects/agency/scopes/enterprise-project/role-assignments
{
"role_assignments": [
{
"agency_id": "as0d9f8asdfasdfa09sd8f9aaa",
"enterprise_project_id": "3asdfs0d9f8asdfasdfa09sd8f9aaa",
"role_id": "5s0d9f8dafsdfasdfa09sd8f9aaa"
}
]
}</pre>
</div>
<div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section986814254447"><h4 class="sectiontitle">Example Response</h4><p id="iam_02_0633__en-us_topic_0000001491323110_p16898195313374"><strong id="iam_02_0633__en-us_topic_0000001491323110_b1517417342315">Status code: 200</strong></p>
<p id="iam_02_0633__en-us_topic_0000001491323110_p1389810537378">The request is successful.</p>
<p id="iam_02_0633__en-us_topic_0000001491323110_p464275653719"></p>
<p id="iam_02_0633__en-us_topic_0000001491323110_p1286912258449"><strong id="iam_02_0633__en-us_topic_0000001491323110_b52333662319">Status code: 400</strong></p>
<p id="iam_02_0633__en-us_topic_0000001491323110_p1986962574419">Parameter error.</p>
<pre class="screen" id="iam_02_0633__en-us_topic_0000001491323110_screen11869182516442">{
"error" : {
"message" : "Illegal request",
"code" : 400,
"title" : "Bad Request"
}
}</pre>
<p id="iam_02_0633__en-us_topic_0000001491323110_p12871152510441"><strong id="iam_02_0633__en-us_topic_0000001491323110_b591969102313">Status code: 401</strong></p>
<p id="iam_02_0633__en-us_topic_0000001491323110_p13872192594411">Authentication failed.</p>
<pre class="screen" id="iam_02_0633__en-us_topic_0000001491323110_screen158721925174412">{
"error" : {
"message" : "Authentication failed",
"code" : 401,
"title" : "Unauthorized"
}
}</pre>
<p id="iam_02_0633__en-us_topic_0000001491323110_p587422584415"><strong id="iam_02_0633__en-us_topic_0000001491323110_b3175172502310">Status code: 403</strong></p>
<p id="iam_02_0633__en-us_topic_0000001491323110_p198741525154410">Operation denied.</p>
<pre class="screen" id="iam_02_0633__en-us_topic_0000001491323110_screen487582515448">{
"error" : {
"message" : "Forbidden operation",
"code" : 403,
"title" : "Forbidden"
}
}</pre>
</div>
<div class="section" id="iam_02_0633__en-us_topic_0000001491323110_section8877122517442"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0633__en-us_topic_0000001491323110_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0633__en-us_topic_0000001491323110_row987762564414"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="iam_02_0633__en-us_topic_0000001491323110_p2878925104411">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="iam_02_0633__en-us_topic_0000001491323110_p188781025174411">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0633__en-us_topic_0000001491323110_row3877152564410"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p138791525174412">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p387982519443">The request is successful.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_row168771125144410"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p187916253449">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p17880122524414">Parameter error.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_row1887715255441"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p3880125164413">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p10880525164410">Authentication failed.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_row7877182594414"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p10881192510441">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p1188110250443">Unauthorized operation.</p>
</td>
</tr>
<tr id="iam_02_0633__en-us_topic_0000001491323110_row11877192520445"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_02_0633__en-us_topic_0000001491323110_p12881725144419">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_02_0633__en-us_topic_0000001491323110_p1188213253440">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="iam_12_0513.html">Enterprise Project Management</a></div>
</div>
</div>