forked from docs/doc-exports
232 lines
18 KiB
HTML
232 lines
18 KiB
HTML
<a name="GetAuthorizations"></a><a name="GetAuthorizations"></a>
|
|
|
|
<h1 class="topictitle1">Viewing an Authorization List</h1>
|
|
<div id="body36231454439"><div class="section" id="GetAuthorizations__section2062317541934"><h4 class="sectiontitle">Function</h4><p id="GetAuthorizations__p16266546316">This API is used to view an authorization list.</p>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section116368544320"><h4 class="sectiontitle">URI</h4><p id="GetAuthorizations__p463912541739">GET /v2/{project_id}/authorizations</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetAuthorizations__table13643954636" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="GetAuthorizations__row166414542033"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="GetAuthorizations__p116440541434">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="GetAuthorizations__p176481154039">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="GetAuthorizations__p116501854434">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="GetAuthorizations__p116531254035">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetAuthorizations__row1064117542318"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="GetAuthorizations__p265515543319">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="GetAuthorizations__p12657135419319">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="GetAuthorizations__p9660254838">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="GetAuthorizations__p1066319542310">Project ID. For details about how to obtain a project ID, see <a href="modelarts_03_0147.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetAuthorizations__table666814541932" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="GetAuthorizations__row196655541330"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="GetAuthorizations__p17669145414314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="GetAuthorizations__p196729543315">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="GetAuthorizations__p967417541737">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="GetAuthorizations__p1067755415318">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetAuthorizations__row136652546314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="GetAuthorizations__p667919541137">sort_by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="GetAuthorizations__p1682205414313">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="GetAuthorizations__p86841541835">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="GetAuthorizations__p126889547313">Sorting field.</p>
|
|
<p id="GetAuthorizations__p16901054731">Options:</p>
|
|
<ul id="GetAuthorizations__ul6693454937"><li id="GetAuthorizations__li126931554933"><strong id="GetAuthorizations__b96952541839">user_name</strong>: IAM user</li><li id="GetAuthorizations__li15697654237"><strong id="GetAuthorizations__b1370012542313">create_time</strong>: creation time</li></ul>
|
|
<p id="GetAuthorizations__p4701195420318">Default: <strong id="GetAuthorizations__b170220541739">user_name</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row116653540310"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="GetAuthorizations__p070385416317">order</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="GetAuthorizations__p87064541315">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="GetAuthorizations__p67083541333">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="GetAuthorizations__p771110541310">Sorting method.</p>
|
|
<p id="GetAuthorizations__p14714205420318">Options:</p>
|
|
<ul id="GetAuthorizations__ul177161454937"><li id="GetAuthorizations__li2717195411311"><strong id="GetAuthorizations__b8720354835">asc</strong>: ascending order</li><li id="GetAuthorizations__li97215541339"><strong id="GetAuthorizations__b4722254530">desc</strong>: descending order</li></ul>
|
|
<p id="GetAuthorizations__p207234548313">Default: <strong id="GetAuthorizations__b10724205410317">asc</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row46661854138"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="GetAuthorizations__p4725145417312">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="GetAuthorizations__p8728145410316">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="GetAuthorizations__p7730195410319">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="GetAuthorizations__p12733185414318">Maximum number of records returned on each page. Default value: <strong id="GetAuthorizations__b97349546320">1000</strong></p>
|
|
<p id="GetAuthorizations__p117352543312">The value ranges from 1 to 1000.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row766615546317"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="GetAuthorizations__p1773810544316">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="GetAuthorizations__p2742165414312">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="GetAuthorizations__p13744354937">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="GetAuthorizations__p1747354134">Start page of the paging list. The default value is <strong id="GetAuthorizations__b1574813541312">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section12750195418313"><h4 class="sectiontitle">Request Parameters</h4><p id="GetAuthorizations__p137522542039">None</p>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section117551254032"><h4 class="sectiontitle">Response Parameters</h4><p id="GetAuthorizations__p6757205417311"><strong id="GetAuthorizations__b87585545314">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetAuthorizations__response_AuthorizationListResponse" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="GetAuthorizations__row177598541838"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="GetAuthorizations__p1476310541632">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="GetAuthorizations__p1876818547319">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="GetAuthorizations__p57700541333">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetAuthorizations__row0759054738"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="GetAuthorizations__p177275420318">total_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="GetAuthorizations__p777415545319">Number</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="GetAuthorizations__p137776541031">Authorization information.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row1975918541833"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="GetAuthorizations__p37791554636">auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="GetAuthorizations__p77832542036">Array of <a href="#GetAuthorizations__response_AuthorizationResponse">AuthorizationResponse</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="GetAuthorizations__p197853541934">Authorization information list.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="GetAuthorizations__response_AuthorizationResponse"></a><a name="response_AuthorizationResponse"></a><table cellpadding="4" cellspacing="0" summary="" id="GetAuthorizations__response_AuthorizationResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>AuthorizationResponse</caption><thead align="left"><tr id="GetAuthorizations__row27881254332"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="GetAuthorizations__p1579213543310">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="GetAuthorizations__p12795155410316">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="GetAuthorizations__p20797105415317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetAuthorizations__row578810541432"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="GetAuthorizations__p1779911540311">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="GetAuthorizations__p1980216549311">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="GetAuthorizations__p1480416544312">User ID. For details about how to obtain a user ID, see <a href="modelarts_03_0006.html">Obtaining a User ID</a>.</p>
|
|
<p id="GetAuthorizations__p1155194211820">If <strong id="GetAuthorizations__b1981815543815">user_id</strong> is set to <strong id="GetAuthorizations__b18257441997">all-users</strong>, authorization is configured for all IAM users. If some users have been authorized, their authorization will be updated.</p>
|
|
<p id="GetAuthorizations__p45649101199">This parameter is mandatory only if the authorization method is set to <strong id="GetAuthorizations__b1577838594">Agency</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row137888541237"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="GetAuthorizations__p281445420315">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="GetAuthorizations__p481717548311">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="GetAuthorizations__p98202548310">Authorization type. <strong id="GetAuthorizations__b282165410311">Agency</strong> is recommended.</p>
|
|
<p id="GetAuthorizations__p98221545313">Options:</p>
|
|
<ul id="GetAuthorizations__ul38254541632"><li id="GetAuthorizations__li3825254533"><strong id="GetAuthorizations__b17827354132">agency</strong>: authorization through an agency</li><li id="GetAuthorizations__li15828195415311"><strong id="GetAuthorizations__b483016541533">credential</strong>: authorization through an access Key (AK/SK)</li></ul>
|
|
<p id="GetAuthorizations__p148329543316">Default: <strong id="GetAuthorizations__b1683311541632">agency</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row17788165416316"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="GetAuthorizations__p15835135416310">content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="GetAuthorizations__p783718548313">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="GetAuthorizations__p103618491292">Authorization content.</p>
|
|
<ul id="GetAuthorizations__ul2299145114914"><li id="GetAuthorizations__li489165415910">If <strong id="GetAuthorizations__b119218541594">Authorization Type</strong> is set to <strong id="GetAuthorizations__b19921554992">Agency</strong>, this field indicates the agency name.</li><li id="GetAuthorizations__li162998519911">If <strong id="GetAuthorizations__b184413542314">Authorization Type</strong> is set to <strong id="GetAuthorizations__b7844185415316">AK/SK</strong>, this field indicates the access key ID (AK).</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row57881541939"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="GetAuthorizations__p584613541839">secret_key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="GetAuthorizations__p12848554635">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="GetAuthorizations__p1685117541039">Secret Access Key (SK). This field is required only when <strong id="GetAuthorizations__b98521541313">Authorization Method</strong> is set to <strong id="GetAuthorizations__b1885225417311">AK/SK</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row1578917547320"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="GetAuthorizations__p2853135413312">create_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="GetAuthorizations__p1285625417319">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="GetAuthorizations__p138581754638">Timestamp when the quality job was created.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section1286119545319"><h4 class="sectiontitle">Example Requests</h4><p id="GetAuthorizations__p986315541834">View an authorization list.</p>
|
|
<pre class="screen" id="GetAuthorizations__screen1186612546310">GET https://{endpoint}/v2/{project_id}/authorizations</pre>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section138698543310"><h4 class="sectiontitle">Example Responses</h4><p id="GetAuthorizations__p1187214540312"><strong id="GetAuthorizations__b20873254434">Status code: 200</strong></p>
|
|
<p id="GetAuthorizations__p787413542038">OK</p>
|
|
<pre class="screen" id="GetAuthorizations__screen787818541735">{
|
|
"total_count" : 1,
|
|
"auth" : [ {
|
|
"user_id" : "****d80fb058844ae8b82aa66d9fe****",
|
|
"user_name" : "iam-user01",
|
|
"type" : "agency",
|
|
"content" : "modelarts_agency",
|
|
"create_time" : 15657747821288
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section17896154830"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetAuthorizations__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="GetAuthorizations__row1989919541937"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="GetAuthorizations__p1490316549320">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="GetAuthorizations__p199063541315">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetAuthorizations__row9899254732"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="GetAuthorizations__p3909154437">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="GetAuthorizations__p6911654730">OK</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row889914541636"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="GetAuthorizations__p1891312541735">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="GetAuthorizations__p891510541732">Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row18899954734"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="GetAuthorizations__p19171954838">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="GetAuthorizations__p391916541736">Unauthorized</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row11899854537"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="GetAuthorizations__p11921155418314">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="GetAuthorizations__p2924195412318">Forbidden</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetAuthorizations__row190019541732"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="GetAuthorizations__p39261541736">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="GetAuthorizations__p169284545313">Not Found</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetAuthorizations__section209311854831"><h4 class="sectiontitle">Error Codes</h4><p id="GetAuthorizations__p69336541631">See <a href="modelarts_03_0095.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="authorization.html">Authorization Management</a></div>
|
|
</div>
|
|
</div>
|
|
|