doc-exports/docs/iam/api-ref/iam_03_0003.html
zhangyue 3b5a58b1fe IAM API 2.0.38
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2022-10-26 04:31:24 +00:00

208 lines
18 KiB
HTML

<a name="iam_03_0003"></a><a name="iam_03_0003"></a>
<h1 class="topictitle1">Listing Permanent Access Keys</h1>
<div id="body8662426"><div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section1936218714203"><h4 class="sectiontitle">Function</h4><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1736219792019">This API can be used by the administrator to list all permanent access key of an IAM user or used by an IAM user to list all of their permanent access keys.</p>
<p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p136317720205">The API can be called using both the global endpoint and region-specific endpoints.</p>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section1336367192012"><h4 class="sectiontitle">URI</h4><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p23638732015">GET /v3.0/OS-CREDENTIAL/credentials</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_table1536410711201" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Query parameters</caption><thead align="left"><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1736312732014"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p83642782010">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.2.5.1.2"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p13364773202">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p8364871203">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.2.5.1.4"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p236417717201">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row136377172019"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p93641071202">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p8364674206">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1036577182014">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p20365873203">User ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section43652711200"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row43656716202"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p203663712019">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.36%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p133661377204">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.64%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p13662715209">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1736611719203">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1136567132015"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1536687102014">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="10.36%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p153661976209">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.64%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p636619715207">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p63671878209">Fill <strong id="iam_03_0003__en-us_topic_0221566837_b57497297112">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1436519711206"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1736712717209">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="10.36%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p436787192013">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.64%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p19367274202">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1736711720207">A token with <strong id="iam_03_0003__b49221247135114">Security Administrator</strong> permissions is required if the administrator is requesting to query all permanent access keys of an IAM user.</p>
<p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1036716782014">The user token (no special permission requirements) of an IAM user is required if the user is requesting to query their permanent access keys.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section136757102010"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_responseParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1836811720202"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p183680792018">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.2"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p153682732016">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.2.2.4.1.3"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p7368871207">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row133681178204"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p436811715205"><a href="#iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_response_Rs43CredentialsArritem">credentials</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p336910782010">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1836915742014">Authentication result.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_response_Rs43CredentialsArritem"></a><a name="en-us_topic_0221566837_en-us_topic_0221482413_response_Rs43CredentialsArritem"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_response_Rs43CredentialsArritem" frame="border" border="1" rules="all"><caption><b>Table 4 </b>credentials</caption><thead align="left"><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row136913713207"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p13691075206">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p337011752013">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p103709712203">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row23698713208"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p33701176204">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1537014712016">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p737047102017">IAM user ID.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row12369147112012"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p163701274208">access</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p4370127112010">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p203712719205">AK.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1736915718205"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p13711477203">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p937137182012">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p537116782011">Status of the access key.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1036910782016"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1637119712202">create_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p237114717206">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p9371972203">Time when the access key was created.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row93691078201"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p03719782015">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p2372107142020">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p037216762015">Description of the access key.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section637216762011"><h4 class="sectiontitle">Example Request</h4><ul id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_ul13372147142015"><li id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_li8372177205">Request for an IAM user to query their permanent access keys<pre class="screen" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_screen13372187202011">GET https://sample.domain.com/v3.0/OS-CREDENTIAL/credentials</pre>
</li><li id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_li1637218719203">Request for an administrator to query all permanent access keys of an IAM user (user ID: <strong id="iam_03_0003__b37301528151111">07609fb9358010e21f7bc003751c...</strong>)<pre class="screen" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_screen1037311782012">GET https://sample.domain.com/v3.0/OS-CREDENTIAL/credentials?user_id=07609fb9358010e21f7bc0037....</pre>
</li></ul>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section7373127132019"><h4 class="sectiontitle">Example Response</h4><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1637310782018"><strong id="iam_03_0003__en-us_topic_0221566837_b1071655319105">Status code: 200</strong></p>
<p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p537316732012">The request is successful.</p>
<pre class="screen" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_screen143736752012">{
"credentials": [
{
"access": "LOSZM4YRVLKOY9E8X...",
"create_time": "2020-01-08T06:26:08.123059Z",
"user_id": "07609fb9358010e21f7bc0037...",
"description": "",
"status": "active"
},
{
"access": "P83EVBZJMXCYTMU...",
"create_time": "2020-01-08T06:25:19.014028Z",
"user_id": "07609fb9358010e21f7bc003751...",
"description": "",
"status": "active"
}
]
}</pre>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section1537519742012"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_table2423" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row73761179209"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p237613714207">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_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p13376117182014">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1337614792011"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1537647172012">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p13376197192015">The request is successful.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row0376167112013"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p133771572209">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p113778717200">The server failed to process the request.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row103761776204"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p03778742011">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1937713702014">Authentication failed.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row73761374204"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p7377778209">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p163774713202">Access denied.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row93768752016"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p93771471208">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1337715716204">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_row1537687162012"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1837818712018">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p1037857182011">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_section163782720204"><h4 class="sectiontitle">Error Codes</h4><p id="iam_03_0003__en-us_topic_0221566837_en-us_topic_0221482413_p20378571209">None</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0097942776.html">Access Key Management</a></div>
</div>
</div>