Files
doc-exports/docs/iam/api-ref/en-us_topic_0097949518.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

560 lines
50 KiB
HTML

<a name="en-us_topic_0097949518"></a><a name="en-us_topic_0097949518"></a>
<h1 class="topictitle1">Obtaining a Temporary AK/SK</h1>
<div id="body8662426"><div class="section" id="en-us_topic_0097949518__s37f73fa9234e41d3aee73c75a47eabba"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0097949518__a51aaf3d4e4cc4682a18637a9046fc38d">You can obtain a temporary AK/SK and security token (offline AK/SK) by using a user token, agency token, and federated token. A temporary AK/SK is a token with temporary permissions issued to users. It conforms to the principle of least privilege and can be used to temporarily access OBS.</p>
</div>
<div class="section" id="en-us_topic_0097949518__s6da80212b87341a6b73b416e9ceede6d"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0097949518__a1cf01790b0c9461b89702f5e9cafaef9">POST /v3.0/OS-CREDENTIAL/securitytokens</p>
<ul id="en-us_topic_0097949518__ul139311431151716"><li id="en-us_topic_0097949518__li0931131121715">Parameters in the request header<ul id="en-us_topic_0097949518__ul09311831111720"><li id="en-us_topic_0097949518__li8931731111718">Obtaining a temporary AK/SK with an agency token (<strong id="en-us_topic_0097949518__b57131235144314">methods</strong> is set to <strong id="en-us_topic_0097949518__b653832134318">assume_role</strong>)
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table2931153116175" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row193183113174"><th align="left" class="cellrowborder" valign="top" width="18.89%" id="mcps1.3.2.3.1.1.1.3.1.5.1.1"><p id="en-us_topic_0097949518__p793193116173"><strong id="en-us_topic_0097949518__a173ae121cc9e48328ca613e72f2a1504_1">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.99%" id="mcps1.3.2.3.1.1.1.3.1.5.1.2"><p id="en-us_topic_0097949518__p593116310178"><strong id="en-us_topic_0097949518__ac429376f11ae472b87ff4be326afb9d8_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.49%" id="mcps1.3.2.3.1.1.1.3.1.5.1.3"><p id="en-us_topic_0097949518__p13931731181720"><strong id="en-us_topic_0097949518__b842352706143526_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.629999999999995%" id="mcps1.3.2.3.1.1.1.3.1.5.1.4"><p id="en-us_topic_0097949518__p1193114310172"><strong id="en-us_topic_0097949518__b1734705850163452_1">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row29316313175"><td class="cellrowborder" valign="top" width="18.89%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__p6931103151714">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__p693193113178">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="22.49%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__p17932123114179">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.629999999999995%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__p18932133131714">Token with permissions of the <strong id="en-us_topic_0097949518__b28891254114313">Agent Operator</strong> policy.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__row49329311171"><td class="cellrowborder" valign="top" width="18.89%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__p69321310177">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__p2932113117176">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="22.49%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__p49322318172">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.629999999999995%" headers="mcps1.3.2.3.1.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__p0932203121712">Fill <strong id="en-us_topic_0097949518__b842352706161331_1">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0097949518__ul893223121713"><li id="en-us_topic_0097949518__li209329313176">Obtaining a temporary AK/SK with a user token or a federated token (<strong id="en-us_topic_0097949518__b13538171364413">methods</strong> is set to <strong id="en-us_topic_0097949518__b145381813104416">token</strong>)
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table139322319176" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row593213310178"><th align="left" class="cellrowborder" valign="top" width="18.891889188918892%" id="mcps1.3.2.3.1.2.1.3.1.5.1.1"><p id="en-us_topic_0097949518__p89321031121712"><strong id="en-us_topic_0097949518__a173ae121cc9e48328ca613e72f2a1504_3">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.831983198319833%" id="mcps1.3.2.3.1.2.1.3.1.5.1.2"><p id="en-us_topic_0097949518__p99323314175"><strong id="en-us_topic_0097949518__b719667073">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.492249224922492%" id="mcps1.3.2.3.1.2.1.3.1.5.1.3"><p id="en-us_topic_0097949518__p15932133114173"><strong id="en-us_topic_0097949518__b212143656">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.78387838783878%" id="mcps1.3.2.3.1.2.1.3.1.5.1.4"><p id="en-us_topic_0097949518__p4932173171710"><strong id="en-us_topic_0097949518__b1734705850163452_3">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row3932173151719"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__p119324317172">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="19.831983198319833%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__p8932163171717">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="22.492249224922492%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__p13932203118178">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.78387838783878%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__p69323313179">Fill <strong id="en-us_topic_0097949518__b842352706161331_3">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__row18932931191712"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__p199321631151715">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="19.831983198319833%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__p8932123151711">No</p>
</td>
<td class="cellrowborder" valign="top" width="22.492249224922492%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__p293243114178">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.78387838783878%" headers="mcps1.3.2.3.1.2.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__p11932331171718">User token or federated token required for obtaining a temporary AK/SK. You need to specify either this parameter or the token ID in the request body. This parameter takes the precedence.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</li></ul>
</div>
<div class="section" id="en-us_topic_0097949518__s926b2080db4b47cc9d4dbc9ec412dcf1"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0097949518__u368220e527934028995484cb642e8be0"><li id="en-us_topic_0097949518__l2cef74bac1eb416db84197647c347a34">Parameters in the request body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table203749712572" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row1838477135712"><th align="left" class="cellrowborder" valign="top" width="25.069999999999997%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0097949518__p103844713573">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.580000000000002%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0097949518__p1038467125715">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="4.91%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0097949518__p1838417717571">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.44%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0097949518__p33841374572">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row1538437195717"><td class="cellrowborder" valign="top" width="25.069999999999997%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0097949518__p183841785715"><a href="#en-us_topic_0097949518__li5114857145913">auth</a></p>
</td>
<td class="cellrowborder" valign="top" width="19.580000000000002%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0097949518__p1838415715579">TokenAuth object</p>
</td>
<td class="cellrowborder" valign="top" width="4.91%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0097949518__p83841375576">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0097949518__p1838410795719">Authentication information.</p>
</td>
</tr>
</tbody>
</table>
</div>
<ul id="en-us_topic_0097949518__ul1516010216437"><li id="en-us_topic_0097949518__li5114857145913"><a name="en-us_topic_0097949518__li5114857145913"></a><a name="li5114857145913"></a>auth
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table1157805085919" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row12588050195919"><th align="left" class="cellrowborder" valign="top" width="25.040000000000003%" id="mcps1.3.3.2.1.2.1.1.1.5.1.1"><p id="en-us_topic_0097949518__p15881250105911">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.96%" id="mcps1.3.3.2.1.2.1.1.1.5.1.2"><p id="en-us_topic_0097949518__p155881050155915">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="5%" id="mcps1.3.3.2.1.2.1.1.1.5.1.3"><p id="en-us_topic_0097949518__p1158865010597">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.2.1.1.1.5.1.4"><p id="en-us_topic_0097949518__p13588155017592">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row25887505594"><td class="cellrowborder" valign="top" width="25.040000000000003%" headers="mcps1.3.3.2.1.2.1.1.1.5.1.1 "><p id="en-us_topic_0097949518__p2058865014592"><a href="#en-us_topic_0097949518__li6795121125811">identity</a></p>
</td>
<td class="cellrowborder" valign="top" width="19.96%" headers="mcps1.3.3.2.1.2.1.1.1.5.1.2 "><p id="en-us_topic_0097949518__p25881850115911">TokenAuthIdentity object</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.1.1.1.5.1.3 "><p id="en-us_topic_0097949518__p158855045919">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.1.1.1.5.1.4 "><p id="en-us_topic_0097949518__p2588850145918">Authentication parameters.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__li6795121125811"><a name="en-us_topic_0097949518__li6795121125811"></a><a name="li6795121125811"></a>auth.identity
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table0861114095718" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row5886164013570"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.2.2.1.1.5.1.1"><p id="en-us_topic_0097949518__p12886144017572">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.2.1.1.5.1.2"><p id="en-us_topic_0097949518__p1888624065717">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="5%" id="mcps1.3.3.2.1.2.2.1.1.5.1.3"><p id="en-us_topic_0097949518__p13886140165719">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.2.2.1.1.5.1.4"><p id="en-us_topic_0097949518__p488604055710">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row288674095714"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__p6886340105717">methods</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__p158861940115716">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__p11886154016574">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__p08861840155713">Authentication method. The value of this parameter is <strong id="en-us_topic_0097949518__b397483314189">["token"]</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__row1688664035711"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__p98863403576"><a href="#en-us_topic_0097949518__li165461944165814">token</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__p5886140195719">IdentityToken object</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__p10886540145715">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__p4886240155717">IAM user token, federated user token, or agency token. The <strong id="en-us_topic_0097949518__b1792560103413">id</strong> in this parameter is the same as that of <strong id="en-us_topic_0097949518__b121210543417">X-Auth-Token</strong> in the request header. This parameter is to be discarded.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__row1888612408575"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__p9886114019575"><a href="#en-us_topic_0097949518__li12704105945813">policy</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__p2886184016573">ServicePolicy object</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__p8886124013572">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__p1188644005718">Content of the custom policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__li165461944165814"><a name="en-us_topic_0097949518__li165461944165814"></a><a name="li165461944165814"></a>auth.identity.token
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table9863194025716" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row198861140165715"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.2.3.1.1.5.1.1"><p id="en-us_topic_0097949518__p4886194012571">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.3.1.1.5.1.2"><p id="en-us_topic_0097949518__p2088614407574">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="5%" id="mcps1.3.3.2.1.2.3.1.1.5.1.3"><p id="en-us_topic_0097949518__p188869408577">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.2.3.1.1.5.1.4"><p id="en-us_topic_0097949518__p08865408571">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row148861340165715"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.1 "><p id="en-us_topic_0097949518__p6886140145716">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.2 "><p id="en-us_topic_0097949518__p088664020574">string</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.3 "><p id="en-us_topic_0097949518__p1788634025713">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.4 "><p id="en-us_topic_0097949518__p58861840205718">Token ID. Same as the <strong id="en-us_topic_0097949518__b11513133143516">X-Auth-Token</strong> in the request header. This parameter is to be discarded.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__row2088634011573"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.1 "><p id="en-us_topic_0097949518__p1288644020579">duration_seconds</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.2 "><p id="en-us_topic_0097949518__p118861540115714">integer</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.3 "><p id="en-us_topic_0097949518__p988634015716">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.3.1.1.5.1.4 "><p id="en-us_topic_0097949518__p1888619402579">Validity period (in seconds) of an AK/SK and security token. The value ranges from 15 minutes to 24 hours. The default value is <strong id="en-us_topic_0097949518__b931163573517">15min</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__li12704105945813"><a name="en-us_topic_0097949518__li12704105945813"></a><a name="li12704105945813"></a>auth.identity.policy
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table986484025711" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row58861240175710"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.2.4.1.1.5.1.1"><p id="en-us_topic_0097949518__p1988654075720">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.4.1.1.5.1.2"><p id="en-us_topic_0097949518__p8886114016576">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="5%" id="mcps1.3.3.2.1.2.4.1.1.5.1.3"><p id="en-us_topic_0097949518__p98861740145719">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.2.4.1.1.5.1.4"><p id="en-us_topic_0097949518__p1288615405572">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row288614015574"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.1 "><p id="en-us_topic_0097949518__p98871940135712">Version</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.2 "><p id="en-us_topic_0097949518__p4887174018576">string</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.3 "><p id="en-us_topic_0097949518__p48878408576">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.4 "><p id="en-us_topic_0097949518__p1388714025718">Policy version. When creating a custom policy, set this parameter to <strong id="en-us_topic_0097949518__b572318159315">1.1</strong>.</p>
<ul id="en-us_topic_0097949518__ul1888734045717"><li id="en-us_topic_0097949518__li1588794017574"><strong id="en-us_topic_0097949518__b19912716163119">1.0</strong>: System-defined role. Only a limited number of service-level roles are provided for authorization.</li><li id="en-us_topic_0097949518__li1088734075711"><strong id="en-us_topic_0097949518__b1726716513312">1.1</strong>: Policy. A policy defines the permissions required to perform actions on a specific cloud resource under certain conditions.</li></ul>
</td>
</tr>
<tr id="en-us_topic_0097949518__row158871440125714"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.1 "><p id="en-us_topic_0097949518__p88871740165719"><a href="#en-us_topic_0097949518__li15900131065911">Statement</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.2 "><p id="en-us_topic_0097949518__p15887140105715">Array of ServiceStatement objects</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.3 "><p id="en-us_topic_0097949518__p7887740105710">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.4.1.1.5.1.4 "><p id="en-us_topic_0097949518__p988754075716">Statement of the policy, which describes details of a custom policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__li15900131065911"><a name="en-us_topic_0097949518__li15900131065911"></a><a name="li15900131065911"></a>auth.identity.policy.Statement
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__table1086574035718" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__row888754020579"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.1.2.5.1.1.5.1.1"><p id="en-us_topic_0097949518__p1088724012570">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.5.1.1.5.1.2"><p id="en-us_topic_0097949518__p888774017578">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="5%" id="mcps1.3.3.2.1.2.5.1.1.5.1.3"><p id="en-us_topic_0097949518__p2887104085713">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.1.2.5.1.1.5.1.4"><p id="en-us_topic_0097949518__p9887340105719">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__row9887114065718"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.1 "><p id="en-us_topic_0097949518__p1888734017577">Action</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.2 "><p id="en-us_topic_0097949518__p08871640135717">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.3 "><p id="en-us_topic_0097949518__p1888724025719">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.4 "><p id="en-us_topic_0097949518__p12887184085712">Specific operation permissions on a resource.</p>
<ul id="en-us_topic_0097949518__ul148871240145715"><li id="en-us_topic_0097949518__li1688794085718">Format: <em id="en-us_topic_0097949518__i2246334193915">Service name</em>:<em id="en-us_topic_0097949518__i1324633412396">Resource type</em>:<em id="en-us_topic_0097949518__i1124733413396">Action</em>, for example, <strong id="en-us_topic_0097949518__b192471034103911">vpc:ports:create</strong></li><li id="en-us_topic_0097949518__li13887164014576"><em id="en-us_topic_0097949518__i20272105273912">Service name</em>: indicates the service name, such as <strong id="en-us_topic_0097949518__b10272155233918">ecs</strong>, <strong id="en-us_topic_0097949518__b10272452193914">evs</strong>, or <strong id="en-us_topic_0097949518__b1272952153911">vpc</strong>. Only lowercase letters are allowed. Resource types and actions are not case-sensitive. You can use an asterisk (*) to represent all actions.</li></ul>
</td>
</tr>
<tr id="en-us_topic_0097949518__row118871740145715"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.1 "><p id="en-us_topic_0097949518__p3887440115710">Effect</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.2 "><p id="en-us_topic_0097949518__p20887114015717">string</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.3 "><p id="en-us_topic_0097949518__p2088754045710">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.4 "><p id="en-us_topic_0097949518__p188875400573">Effect of the permission. The value can be <strong id="en-us_topic_0097949518__b163291251194611">Allow</strong> or <strong id="en-us_topic_0097949518__b1132945164611">Deny</strong>. If both Allow and Deny statements are found in a policy, the authentication starts from the Deny statements.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__row388712405577"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.1 "><p id="en-us_topic_0097949518__p13887104065719">Condition</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.2 "><p id="en-us_topic_0097949518__p788724065711">Map&lt;String,Map&lt;String,Array&lt;String&gt;&gt;&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.3 "><p id="en-us_topic_0097949518__p58878400575">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.4 "><p id="en-us_topic_0097949518__p139313435469">Conditions for the permission to take effect.</p>
<div class="note" id="en-us_topic_0097949518__note122334794612"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="en-us_topic_0097949518__p1276712344919">Take the condition in the sample request as an example, the values of the condition key (<strong id="en-us_topic_0097949518__b2044035918404">obs:prefix</strong>) and string (<strong id="en-us_topic_0097949518__b114401059154015">public</strong>) must be equal (<strong id="en-us_topic_0097949518__b644035974015">StringEquals</strong>).</p>
<pre class="screen" id="en-us_topic_0097949518__screen18948143318464"> "Condition": {
"StringEquals": {
"obs:prefix": [
"public"
]
}
}</pre>
</div></div>
</td>
</tr>
<tr id="en-us_topic_0097949518__row15887840135710"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.1 "><p id="en-us_topic_0097949518__p11887840185715">Resource</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.2 "><p id="en-us_topic_0097949518__p888734011570">Object</p>
</td>
<td class="cellrowborder" valign="top" width="5%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.3 "><p id="en-us_topic_0097949518__p14887940205711">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.1.2.5.1.1.5.1.4 "><p id="en-us_topic_0097949518__p388704035715">Cloud resource. The rules are as follows:</p>
<ul id="en-us_topic_0097949518__ul13887154065713"><li id="en-us_topic_0097949518__li16887340175712">The five-segment format can contain an asterisk (*): &lt;service-name&gt;:&lt;region&gt;:&lt;account-id&gt;:&lt;resource-type&gt;:&lt;resource-path&gt;, for example, <strong id="en-us_topic_0097949518__b19416115913413">obs:::bucket:*</strong>.</li><li id="en-us_topic_0097949518__li15887124045710">The region segment can be <strong id="en-us_topic_0097949518__b20721354425">*</strong> or a region accessible to the user. The service must exist and the specified resource must belong to the service.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<div class="p" id="en-us_topic_0097949518__p85718409107"><ul id="en-us_topic_0097949518__uec80746e3df84ff99a2f30cc61aea103"><li id="en-us_topic_0097949518__l436190b53edb43969713c265de0f3db4">Obtaining a temporary AK/SK with an agency token (<strong id="en-us_topic_0097949518__b2049641814619">methods</strong> is set to <strong id="en-us_topic_0097949518__b1950051817468">assume_role</strong>)
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__t7f269af2050e4926afefd365e178465b" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__rfa1f5a414e7649ccabd96455047cd3ec"><th align="left" class="cellrowborder" valign="top" width="18.891889188918892%" id="mcps1.3.3.2.1.3.1.1.3.1.5.1.1"><p id="en-us_topic_0097949518__a649ea58427784f7c8d86c5602b87104a"><strong id="en-us_topic_0097949518__a173ae121cc9e48328ca613e72f2a1504_5">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.82198219821982%" id="mcps1.3.3.2.1.3.1.1.3.1.5.1.2"><p id="en-us_topic_0097949518__a52636b4d38214015a6e48784d5252467"><strong id="en-us_topic_0097949518__b842352706161749_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.59225922592259%" id="mcps1.3.3.2.1.3.1.1.3.1.5.1.3"><p id="en-us_topic_0097949518__afd0e518a88e24a4e96c697a7be19cbc2"><strong id="en-us_topic_0097949518__b842352706143526_5">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.693869386938694%" id="mcps1.3.3.2.1.3.1.1.3.1.5.1.4"><p id="en-us_topic_0097949518__ae12c862e63504aceac73f270bcbb9ef9"><strong id="en-us_topic_0097949518__b1734705850163452_5">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__r5ba29f30d0294f649c0261f5ee268550"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__ae5fb6c05f11245888a4a7a589ff026a7">methods</p>
</td>
<td class="cellrowborder" valign="top" width="19.82198219821982%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__ae26f131fe9d644aa83c2ad45d95fdb09">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="22.59225922592259%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__a58724c182f834f54a8f205ce939f82c9">String Array</p>
</td>
<td class="cellrowborder" valign="top" width="38.693869386938694%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__a01ebfabb039940b98c89b3bdd2a6afd6">Fill <strong id="en-us_topic_0097949518__b57935728112411">assume_role</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r0d2ff120207942b89f88af082b9117b0"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__af4d55619f8a2469eaaf399b8834e518f">agency_name</p>
</td>
<td class="cellrowborder" valign="top" width="19.82198219821982%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__a5793c583ab0141fe972ccbf5facb7194">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="22.59225922592259%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__a3bdb8564f3174d0b993ece861ab5616f">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.693869386938694%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__a9ecdb84d5c71491b990a05b8ca924957">Name of the agency created by a delegating party.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r0c25bdcbbff040338d36adc023dd9f97"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p4770553481">domain_name or domain_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.82198219821982%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p97709531782">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="22.59225922592259%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p07709531487">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.693869386938694%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__p20786433672"><strong id="en-us_topic_0097949518__b1037264594613">domain.name</strong>: Name of the domain which the delegating party belongs to.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r97b524a758e644548a5bd34a3b932739"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__a3ece2697bd6d4562bed05c8f4e7f1223">duration_seconds</p>
</td>
<td class="cellrowborder" valign="top" width="19.82198219821982%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__a2d5bebeac9e9467aa26ee50af3fd5add">No</p>
</td>
<td class="cellrowborder" valign="top" width="22.59225922592259%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__af9d0db00c0434ce6a95dbfe36a10aeca">Int</p>
</td>
<td class="cellrowborder" valign="top" width="38.693869386938694%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__af31246a849e544a3991f0e364ab07f69">Validity period (in seconds) of an AK/SK and security token. The value ranges from 15 minutes to 24 hours. The default value is 15 minutes.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__rd6399e933eb2454e9a76a7fdfca8ab98"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.1 "><p id="en-us_topic_0097949518__a4a5c49065d0a4094bb3c5dbeceee21fa">scope</p>
</td>
<td class="cellrowborder" valign="top" width="19.82198219821982%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.2 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p294332614915">No</p>
</td>
<td class="cellrowborder" valign="top" width="22.59225922592259%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.3 "><p id="en-us_topic_0097949518__a49000ad4482a4b75bc5b3979401126a4">Object</p>
</td>
<td class="cellrowborder" valign="top" width="38.693869386938694%" headers="mcps1.3.3.2.1.3.1.1.3.1.5.1.4 "><p id="en-us_topic_0097949518__a130c9be5ca064773977f5fb0438d9bbf">AK/SK and security token. If this parameter is left blank, the generated security token does not contain the scope information. You are advised to leave this parameter blank. To set the scope of the temporary AK/SK and security token, specify a project or domain.</p>
<ul id="en-us_topic_0097949518__ul32091543195912"><li id="en-us_topic_0097949518__li1842613483596">If this field is set to <strong id="en-us_topic_0097949518__b183251123124810">project</strong>, the temporary AK/SK and security token can only be used to access resources in the project of a specified ID or name.<pre class="screen" id="en-us_topic_0097949518__screen842664845912">"scope": {
"project": {
"id": "0b95b78b67fa045b38104c12fb..."
}
}</pre>
</li><li id="en-us_topic_0097949518__li761211595616">If this field is set to <strong id="en-us_topic_0097949518__b6738191914913">domain</strong>, the temporary AK/SK and security token can be used to access all resources under the domain of a specified ID or name.<pre class="screen" id="en-us_topic_0097949518__screen59171740125811">"scope": {
"domain": {
"name": " domain A"
}
}</pre>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__l1597131a5cff444886b1fedb9cb0abb4">Obtaining a temporary AK/SK with a user token or a federated token (<strong id="en-us_topic_0097949518__b92518311494">methods</strong> is set to <strong id="en-us_topic_0097949518__b122537311492">token</strong>)
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__t0cc84c02310f4e9ead62efd457aee291" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__r3dedc45671b342c18a7f17a5959c2c6d"><th align="left" class="cellrowborder" valign="top" width="18.89%" id="mcps1.3.3.2.1.3.1.2.3.1.5.1.1"><p id="en-us_topic_0097949518__a32881b797ceb4fd7bd9d1e95689a4b18"><strong id="en-us_topic_0097949518__a173ae121cc9e48328ca613e72f2a1504_7">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.99%" id="mcps1.3.3.2.1.3.1.2.3.1.5.1.2"><p id="en-us_topic_0097949518__ab36ba8846cb94d62b7f5d8b60b38ea6e"><strong id="en-us_topic_0097949518__b842352706161749_3">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.43%" id="mcps1.3.3.2.1.3.1.2.3.1.5.1.3"><p id="en-us_topic_0097949518__en-us_topic_0056596910_p317413396472"><strong id="en-us_topic_0097949518__b842352706143526_7">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.690000000000005%" id="mcps1.3.3.2.1.3.1.2.3.1.5.1.4"><p id="en-us_topic_0097949518__a47c280f6407e4eb9aa2aea4f0a17fe5f"><strong id="en-us_topic_0097949518__b1734705850163452_7">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__r954d63fb5ea74e1ab584dcaf2647bbb6"><td class="cellrowborder" valign="top" width="18.89%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.1 "><p id="en-us_topic_0097949518__a48ec5a0484d541f8bea4918148ba5196">methods</p>
</td>
<td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.2 "><p id="en-us_topic_0097949518__a44e8a16c13df423fbc01aa468913ccb3">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="22.43%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.3 "><p id="en-us_topic_0097949518__a9555d192db1640e9bef878d59d74fbfe">String Array</p>
</td>
<td class="cellrowborder" valign="top" width="38.690000000000005%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.4 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p21894397479">Fill <strong id="en-us_topic_0097949518__a31662b8438c74691a674fd0082d0bd07">token</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r0f9953c7a6d3424aa0970d2040e217e4"><td class="cellrowborder" valign="top" width="18.89%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.1 "><p id="en-us_topic_0097949518__acaa2e64ab6fc49e68a46298439d441f9">token</p>
</td>
<td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.2 "><p id="en-us_topic_0097949518__a71cb30778b8942ee9047b5f39d87ee65">No</p>
</td>
<td class="cellrowborder" valign="top" width="22.43%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.3 "><p id="en-us_topic_0097949518__aa8d2a2f59cdd48fba1e9314e917c8ac3">JSON object</p>
</td>
<td class="cellrowborder" valign="top" width="38.690000000000005%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.4 "><p id="en-us_topic_0097949518__ac870e4fca7234a2f94746dffa8f632b3">Common token or federated token required for obtaining a temporary AK/SK. You need to choose either the ID in this object or <strong id="en-us_topic_0097949518__b842352706135731">X-Auth-Token</strong> in the request header. <strong id="en-us_topic_0097949518__b842352706172831_3">X-Auth-Token</strong> takes priority over the ID in this object.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__rb4e32f4fe494428f9ed9f658c259150f"><td class="cellrowborder" valign="top" width="18.89%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.1 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p520553910477">duration_seconds</p>
</td>
<td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.2 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p720573919472">No</p>
</td>
<td class="cellrowborder" valign="top" width="22.43%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.3 "><p id="en-us_topic_0097949518__abbf4b1dc17a44f2b8babcc21c7a179d3">Int</p>
</td>
<td class="cellrowborder" valign="top" width="38.690000000000005%" headers="mcps1.3.3.2.1.3.1.2.3.1.5.1.4 "><p id="en-us_topic_0097949518__aa2081311b8ac4113873c6dec1088c6ad">Validity period (in seconds) of an AK/SK and security token. The value ranges from 15 minutes to 24 hours. The default value is 15 minutes.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
</li></ul>
<ul id="en-us_topic_0097949518__ubc8db2cb59fe46db8cbf6681ad6c29a0"><li id="en-us_topic_0097949518__l32bb8faf83a84a94ac8f42d1bc61d4a0">Example request<ul id="en-us_topic_0097949518__ub038337bb3e246c187baed1ac96d2742"><li id="en-us_topic_0097949518__l5888067067eb449d909bbd8a72df37ca">When the <strong id="en-us_topic_0097949518__b842352706173940_7">methods</strong> parameter is set to <strong id="en-us_topic_0097949518__b842352706172611_7">assume_role</strong><pre class="screen" id="en-us_topic_0097949518__s23175b0499ea4ec7b324e79b7657cd1f">{
"auth": {
"identity": {
"methods": [
"assume_role"
],
"assume_role": {
"domain_id": "411edb4b634144f587ffc88f9bbdxxx",
"xrole_name": "testagency",
"duration_seconds": 3600
}
}
}
}
</pre>
</li><li id="en-us_topic_0097949518__l15481a00613f46799f47522c57397b84">When the <strong id="en-us_topic_0097949518__b842352706173940_9">methods</strong> parameter is set to <strong id="en-us_topic_0097949518__b842352706172611_9">token</strong><pre class="screen" id="en-us_topic_0097949518__s81d149c004be4922be84dbabf86de758">{
"auth": {
"identity": {
"methods": [
"token"
],
"token": {
"id": "MIIDkgYJKoZIhvcNAQcCoIIDgzCCA38CAQExDTALBglghkgBZQMEAgEwgXXXXX...",
"duration_seconds": 900
}
}
}
}</pre>
</li></ul>
</li></ul>
</div>
<div class="section" id="en-us_topic_0097949518__s987a5f64dbf0425e90492e131d91dd6f"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0097949518__uc3c31d5559884234b63c79bbceee1b81"><li id="en-us_topic_0097949518__le013778996eb4bcfbb97deae53a2fd02">Parameters in the response body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__t71075bd9372146418f36f309206d546d" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__rf7ba2ad3ea734fb189aae9eb6784fd91"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0097949518__ad370c33f356448bcb31af8e0a47fa4a7">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0097949518__a6b1db5c43430453cb2cfcfc6d048dfed">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0097949518__a7ad7e600531b40b3a8555205463593d3">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0097949518__ade5bee541a32463fa7012f60fcb3f63d">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__rf579990aecad486eac8bb7dfe74d6b74"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0097949518__a278f9d3ee45e4fb8a3cc5936ff19051c"><a href="#en-us_topic_0097949518__l53ef2f530ba94d11ab572f044d6d13b5">credential</a></p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0097949518__aca41c717ac524f31a56378a2c8c4f51f">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0097949518__ac04d3c547d714a10b2f62d91aa41f664">Object</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0097949518__a6411ff72d5ba4ea8ab677dc86ec0cced">Authentication information.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__l53ef2f530ba94d11ab572f044d6d13b5"><a name="en-us_topic_0097949518__l53ef2f530ba94d11ab572f044d6d13b5"></a><a name="l53ef2f530ba94d11ab572f044d6d13b5"></a>credential
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__t157a41ad55344766b92133f6d3f67e5a" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__r9d3a37aba7ce462182a7cd0239930a7a"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.1.1.5.1.1"><p id="en-us_topic_0097949518__en-us_topic_0056596910_p320143315838">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.1.1.5.1.2"><p id="en-us_topic_0097949518__ac1c056f03f83468cb805ca9df721dbe0">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.1.1.5.1.3"><p id="en-us_topic_0097949518__en-us_topic_0056596910_p83862915838">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.1.1.5.1.4"><p id="en-us_topic_0097949518__af0bf232ddbc7479499019d16557db9a0">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__rc7cc77854d024936aac9b583cfda4fe5"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__a224f3f82590742e88e3374ce148016c1">expires_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p980353615838">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__af45ccde870e945cf85ab9f0d752a2280">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__ae308362385a643649affe75a07309253">Expiration time.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r64d452b576404dafa65dacd8447b5aaa"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__ac3da1b0f861f418487ebd046cdb66b88">access</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__a5f47e16e7ea041e89d0d104441960b63">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__a0bddf8bfa6144272b1e177b5309b0a52">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__aa5f31f411bf14cbd95be31d808218af1">AK.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r5e51a148bd4e408ca0685564b5cab2e0"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__a0e433ade2cf44aff83d3c39384ba7099">secret</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__acfbaff0b9ac74f40966e3cea0ed2a6d9">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__a9b62f5a5264a45daa918b775d6a41364">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__a3b6f57d267a247389755c61ec5eab3f7">SK.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r0e1615b25cf94e3f9d31da428fd6f183"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0097949518__a03203c3fd4aa4562be555db0211fb280">securitytoken</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0097949518__a4677aaac4a2d4eaa811fd7fc4af15f4c">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0097949518__a0aba3b9c8a554f9785fbd81db65c487e">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0097949518__en-us_topic_0056596910_p299581715838">Used for subsequent replacement of an SK or token.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0097949518__lfdba574b90f14a809e5632bf003b8676">Example response<pre class="screen" id="en-us_topic_0097949518__s63c95050692b460eb639da636c132b65">{
"credential": {
"access": "NQC51NFINJS1JXX...",
"secret": "EY74MByPZ46kTRJL9ay5DskqXX...",
"expires_at": "2017-04-17T07:55:18.575000Z",
"securitytoken": "gAAAAABY9GbWUaGtoa9DPj7_dE4qUSnAXXX..."
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0097949518__sf1bd0a17f1264315a1a57eb5a7071c36"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0097949518__t91b628302cf7421e82389201ba4efef3" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0097949518__re0457507a24943248c88a719663a909f"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0097949518__a15db1e723300498ba8617cc58814d6d6">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.2"><p id="en-us_topic_0097949518__a1a5e5610b8214de590cdd018dabefd62">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0097949518__ra1cb949214b145a785a6104d2b7c031c"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0097949518__ae777b0ccd79c4a7abd06adbe666cf58d">201</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0097949518__a2bcab7f854f649bc8340f67c6af52f11">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r27baf852d3024d6083962a8e171779d7"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0097949518__a87b2b54aeca74bf0a937231e459e9f82">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0097949518__a096326a738fe46e7ab08a31fcafc07bc">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r39eef0d38db74d6bbdc97157ff431207"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0097949518__a7d1f83e848ef4251a12c7dea6015c977">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0097949518__ac0ff9b21c5e64620b8a4c45cd6f028fb">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__r56e109619204490a8ac60a2823d869a3"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0097949518__ae2eefb749ba14306b62424ca672248dd">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0097949518__a605e2f64e1da4fc1a570f243a8629758">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0097949518__reb0e6b35be084cfc8ca80c6ff3187ae4"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0097949518__a337aa80f74e34e5f80bd7dfb27912528">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0097949518__ae2f7f519962748728723158751d8697f">The system is abnormal.</p>
</td>
</tr>
</tbody>
</table>
</div>
</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>