doc-exports/docs/iam/api-ref/iam_08_0017.html
Wei, Hongmin 80f18fd272 IAM API 2.6 Version
Reviewed-by: Kabai, Zoltán Gábor <zoltan-gabor.kabai@t-systems.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2023-08-03 03:34:59 +00:00

148 lines
9.6 KiB
HTML

<a name="iam_08_0017"></a><a name="iam_08_0017"></a>
<h1 class="topictitle1">Binding a Virtual MFA Device</h1>
<div id="body1604926565941"><div class="section" id="iam_08_0017__section147128110526"><h4 class="sectiontitle">Function</h4><p id="iam_08_0017__p107391116525">This API is provided for IAM users to bind a virtual MFA device.</p>
</div>
<div class="section" id="iam_08_0017__section15147105435411"><h4 class="sectiontitle">URI</h4><p id="iam_08_0017__p916724914542">PUT /v3.0/OS-MFA/mfa-devices/bind</p>
</div>
<div class="section" id="iam_08_0017__section1724151510553"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0017__table2069611019558" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_08_0017__row1474681013553"><th align="left" class="cellrowborder" valign="top" width="22.07%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_08_0017__p11746101065515">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.620000000000001%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_08_0017__p87467103555">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.59%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_08_0017__p1074691020553">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.720000000000006%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_08_0017__p174651035517">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_08_0017__row20746610145519"><td class="cellrowborder" valign="top" width="22.07%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_08_0017__p10746131015552">X-Auth-token</p>
</td>
<td class="cellrowborder" valign="top" width="10.620000000000001%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_08_0017__p674621014551">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.59%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_08_0017__p197468100553">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.720000000000006%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_08_0017__p1713713413245">Token (no special permission requirements) of the IAM user corresponding to the <strong id="iam_08_0017__b1716419475253">user_id</strong> specified in the request body.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0017__table86822147567" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request body</caption><thead align="left"><tr id="iam_08_0017__row368217141563"><th align="left" class="cellrowborder" valign="top" width="22.16%" id="mcps1.3.3.3.2.5.1.1"><p id="iam_08_0017__p53866413183">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.81%" id="mcps1.3.3.3.2.5.1.2"><p id="iam_08_0017__p4386144110180">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.71%" id="mcps1.3.3.3.2.5.1.3"><p id="iam_08_0017__p10386941161812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.32%" id="mcps1.3.3.3.2.5.1.4"><p id="iam_08_0017__p5386164114188">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_08_0017__row196821143566"><td class="cellrowborder" valign="top" width="22.16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_08_0017__p538684191811">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_08_0017__p103861941121820">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_08_0017__p1238684101812">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.32%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_08_0017__p153865419183">ID of the user to whom you will bind the virtual MFA device.</p>
</td>
</tr>
<tr id="iam_08_0017__row15682314185610"><td class="cellrowborder" valign="top" width="22.16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_08_0017__p2386141141816">serial_number</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_08_0017__p8386154114184">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_08_0017__p11386941101818">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.32%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_08_0017__p73868418187">Serial number of the virtual MFA device.</p>
</td>
</tr>
<tr id="iam_08_0017__row12682914165614"><td class="cellrowborder" valign="top" width="22.16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_08_0017__p538674113186">authentication_code_first</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_08_0017__p103871441191817">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_08_0017__p11387141161812">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.32%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_08_0017__p153877416184">Verification code 1.</p>
</td>
</tr>
<tr id="iam_08_0017__row131971924161815"><td class="cellrowborder" valign="top" width="22.16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_08_0017__p738711416181">authentication_code_second</p>
</td>
<td class="cellrowborder" valign="top" width="10.81%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_08_0017__p1638764121817">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_08_0017__p7387114112186">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.32%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_08_0017__p103871441151811">Verification code 2.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_08_0017__section118661551121812"><h4 class="sectiontitle">Response Parameters</h4><p id="iam_08_0017__p18747181012551">None</p>
</div>
<div class="section" id="iam_08_0017__section11724811191910"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_08_0017__screen1474791017556">PUT https://sample.domain.com/v3.0/OS-MFA/mfa-devices/bind
{
"user_id" : "09f99d8f6a001d4f1f01c00c31968...",
"authentication_code_first" : "977931",
"authentication_code_second" : "527347",
"serial_number" : "iam:09f6bd6a96801de40f01c00c85691...:mfa/{device_name}"
}</pre>
</div>
<div class="section" id="iam_08_0017__section335322115197"><h4 class="sectiontitle">Example Response</h4><p id="iam_08_0017__p16272101785316">None</p>
</div>
<div class="section" id="iam_08_0017__section4531524171910"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_08_0017__table4183132655719" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_08_0017__row6237126205714"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="iam_08_0017__p2237192645713">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_08_0017__p3237122612574">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_08_0017__row5237122612573"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p192371626155715">204</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p11237162613578">The request is successful.</p>
</td>
</tr>
<tr id="iam_08_0017__row152371226125718"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p1423772612573">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p1723782635716">The request is invalid.</p>
</td>
</tr>
<tr id="iam_08_0017__row8580172375319"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p1652019501377">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p552075016378">Authentication failed.</p>
</td>
</tr>
<tr id="iam_08_0017__row623719266576"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p62371326115714">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p4237152635713">You do not have permission to perform this action.</p>
</td>
</tr>
<tr id="iam_08_0017__row192372261579"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p16237126145710">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p2023702635717">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="iam_08_0017__row1323782616571"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p723742618577">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p4237326145711">A conflict occurs when the requested resource is saved.</p>
</td>
</tr>
<tr id="iam_08_0017__row1823718260576"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="iam_08_0017__p2023722618576">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="iam_08_0017__p102378265571">A system error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="iam_02_0020.html">Security Settings</a></div>
</div>
</div>