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

222 lines
18 KiB
HTML

<a name="en-us_topic_0057845609"></a><a name="en-us_topic_0057845609"></a>
<h1 class="topictitle1">Updating a Protocol</h1>
<div id="body1492676120182"><div class="section" id="en-us_topic_0057845609__section1123400102933"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845609__p155491621142110">This API is used to update the information about a protocol.</p>
</div>
<div class="section" id="en-us_topic_0057845609__section13652882102933"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0057845609__ul32141673102933"><li id="en-us_topic_0057845609__li20839608102933">URI format<p id="en-us_topic_0057845609__p53338749102933"><a name="en-us_topic_0057845609__li20839608102933"></a><a name="li20839608102933"></a>PATCH /v3/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}</p>
</li></ul>
<ul id="en-us_topic_0057845609__ul10286697102933"><li id="en-us_topic_0057845609__li25471413102933">URI parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845609__table27916130102933" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845609__row45510563102933"><th align="left" class="cellrowborder" valign="top" width="20.48795120487951%" id="mcps1.3.2.3.1.1.1.5.1.1"><p id="en-us_topic_0057845609__p62476969102933"><strong id="en-us_topic_0057845609__a6f95694edbbb43d8a152536754b86c82">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.568243175682433%" id="mcps1.3.2.3.1.1.1.5.1.2"><p id="en-us_topic_0057845609__p27469765102933"><strong id="en-us_topic_0057845609__a105e6ed8c3de4c5a9dde97ae5a71071e_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.698230176982303%" id="mcps1.3.2.3.1.1.1.5.1.3"><p id="en-us_topic_0057845609__p10458460102933"><strong id="en-us_topic_0057845609__a703d34a49a2f4162bc1a1a439f655f95_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.24557544245575%" id="mcps1.3.2.3.1.1.1.5.1.4"><p id="en-us_topic_0057845609__p41828952102933"><strong id="en-us_topic_0057845609__b842352706114032">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845609__row32701985102933"><td class="cellrowborder" valign="top" width="20.48795120487951%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p31615134102933">idp_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.568243175682433%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p10689080102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.698230176982303%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p60509142102933">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.24557544245575%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p2293473102933">ID of an identity provider.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row20641258102933"><td class="cellrowborder" valign="top" width="20.48795120487951%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p61329219102933">protocol _id</p>
</td>
<td class="cellrowborder" valign="top" width="17.568243175682433%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p1610812102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.698230176982303%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p63366909102933">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.24557544245575%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p32445999102933">ID of a protocol. </p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845609__section10880249102933"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845609__ul8884996102933"><li id="en-us_topic_0057845609__li12856105102933">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845609__table48596088102933" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845609__row18928895102933"><th align="left" class="cellrowborder" valign="top" width="20.22202220222022%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845609__p56845520102933"><strong id="en-us_topic_0057845609__b5000791091710">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.961796179617963%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845609__p41084373102933"><strong id="en-us_topic_0057845609__a105e6ed8c3de4c5a9dde97ae5a71071e_3">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.7017701770177%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845609__p39499894102933"><strong id="en-us_topic_0057845609__a703d34a49a2f4162bc1a1a439f655f95_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.114411441144114%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845609__p45374877102933"><strong id="en-us_topic_0057845609__b5320245191710">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845609__row51486383102933"><td class="cellrowborder" valign="top" width="20.22202220222022%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p9647510102933">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="17.961796179617963%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p43250874102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.7017701770177%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p13659906102933">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.114411441144114%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p32710615102933">Fill <strong id="en-us_topic_0057845609__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row25960081102933"><td class="cellrowborder" valign="top" width="20.22202220222022%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p22391844102933">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="17.961796179617963%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p1800055102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.7017701770177%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p11586738102933">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.114411441144114%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p9493251143726">Authenticated token with the <strong id="en-us_topic_0057845609__b750798910387">Security Administrator</strong> permission.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0057845609__li58124402102933">Parameters in the request body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845609__table2294710910289" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845609__row3973971710289"><th align="left" class="cellrowborder" valign="top" width="20.49%" id="mcps1.3.3.2.2.1.1.5.1.1"><p id="en-us_topic_0057845609__p6480052110289"><strong id="en-us_topic_0057845609__b392453709177">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.83%" id="mcps1.3.3.2.2.1.1.5.1.2"><p id="en-us_topic_0057845609__p1435081210289"><strong id="en-us_topic_0057845609__a105e6ed8c3de4c5a9dde97ae5a71071e_5">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.57%" id="mcps1.3.3.2.2.1.1.5.1.3"><p id="en-us_topic_0057845609__p2156516110289"><strong id="en-us_topic_0057845609__a703d34a49a2f4162bc1a1a439f655f95_5">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.11%" id="mcps1.3.3.2.2.1.1.5.1.4"><p id="en-us_topic_0057845609__p194760610289"><strong id="en-us_topic_0057845609__b47738849177">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845609__row2353837910289"><td class="cellrowborder" valign="top" width="20.49%" headers="mcps1.3.3.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845609__p2756056110289">mapping_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.83%" headers="mcps1.3.3.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845609__p1781297510289">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.3.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845609__p3356491010289">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.11%" headers="mcps1.3.3.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845609__p3440322210289">Mapping ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0057845609__ul63571894102933"><li id="en-us_topic_0057845609__li35276141102933">Example request<pre class="screen" id="en-us_topic_0057845609__screen302684462192"><em id="en-us_topic_0057845609__i1489980192518">curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X PATCH -d'{"protocol":{"mapping_id":"ACME"}}' https://sample.domain.com/v3/OS-FEDERATION/identity_providers/ACME/protocols/saml</em></pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845609__section52969420102933"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845609__ul62664621102933"><li id="en-us_topic_0057845609__li27110677102933">Parameters in the response body
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845609__table42669506102933" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845609__row11704882102933"><th align="left" class="cellrowborder" valign="top" width="20.62%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845609__p8571362102933"><strong id="en-us_topic_0057845609__b608462891710">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.7%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845609__p23191731102933"><strong id="en-us_topic_0057845609__a105e6ed8c3de4c5a9dde97ae5a71071e_7">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.7%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845609__p66590924102933"><strong id="en-us_topic_0057845609__a703d34a49a2f4162bc1a1a439f655f95_7">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.980000000000004%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845609__p25155798102933"><strong id="en-us_topic_0057845609__b4935261191710">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845609__row24353785102933"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p26499548102933">id</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p66088615102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p51577603102933">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p17036311102933">ID of a protocol. </p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row19109078102933"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p4331506102933">mapping_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p15307739102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p31967352102933">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p39218738102933">Mapping ID.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row17424325102933"><td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845609__p2084212102933">links</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845609__p34603508102933">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.7%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845609__p51420781102933">Object</p>
</td>
<td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845609__p4333702102933">Protocol resource link.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0057845609__li181968752612">Example response<pre class="screen" id="en-us_topic_0057845609__screen66530663211034">{
"protocol": {
"id": "saml",
"links": {
"identity_provider": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME",
"self": "https://example.com/v3/OS-FEDERATION/identity_providers/ACME/protocols/saml"
},
"mapping_id": "ACME"
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0057845609__section45441013102933"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845609__table56843417102933" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845609__row30012712102933"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845609__p15110647102933"><strong id="en-us_topic_0057845609__b37151362163018">Status Code</strong></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_0057845609__p16002927102933"><strong id="en-us_topic_0057845609__b38470707163018">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0057845609__row21168695102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p36942711102933">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p39569624102933">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row20582300102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p56553617102933">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p17440250102933">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row22744526102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p30367297102933">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p43831964102933">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row58943360102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p9682892102933">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p46116755102933">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row12397617102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p64682943102933">404</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p4827005102933">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row43443045102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p29225775102933">405</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p18477565102933">The method specified in the request is not allowed for the requested resource.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row32080361102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p48372473102933">409</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p25856258102933">A resource conflict occurs.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row31379731102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p58730243102933">413</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p59529215102933">The request entity is too large.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row66000894102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p44472184102933">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p45477171102933">Internal server error.</p>
</td>
</tr>
<tr id="en-us_topic_0057845609__row6641360102933"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845609__p1079311102933">503</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845609__p20315362102933">Service unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845619.html">Protocol</a></div>
</div>
</div>