doc-exports/docs/apig/api-ref/CreateApiAclBindingV2.html
Chen, Junjie 2fc8a34abd APIG API 20240125 version
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-10-25 11:19:06 +00:00

400 lines
28 KiB
HTML

<a name="CreateApiAclBindingV2"></a><a name="CreateApiAclBindingV2"></a>
<h1 class="topictitle1">Binding an Access Control Policy to an API</h1>
<div id="body485515549919"><div class="section" id="CreateApiAclBindingV2__section88551954294"><h4 class="sectiontitle">Function</h4><p id="CreateApiAclBindingV2__p1485525413916">This API is used to bind an access control policy to a specified API.</p>
<p id="CreateApiAclBindingV2__p48561354999">You can bind different access control policies to an API in different environments, but you can bind only one access control policy to the API in each environment.</p>
</div>
<div class="section" id="CreateApiAclBindingV2__atuogenerate_1"><h4 class="sectiontitle">Calling Method</h4><p id="CreateApiAclBindingV2__p138562543919">For details, see <a href="apig-api-180713003.html">Calling APIs</a>.</p>
</div>
<div class="section" id="CreateApiAclBindingV2__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p id="CreateApiAclBindingV2__p785615542917">POST /v2/{project_id}/apigw/instances/{instance_id}/acl-bindings</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__table11857175417914" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row10857165410915"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateApiAclBindingV2__p10857175419917">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateApiAclBindingV2__p28582054298">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateApiAclBindingV2__p19858254996">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateApiAclBindingV2__p985825419916">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row158571354294"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateApiAclBindingV2__p1685811541898">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateApiAclBindingV2__p185814541693">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateApiAclBindingV2__p985975414910">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateApiAclBindingV2__p1859185417917">Project ID. For details about how to obtain it, see <a href="apig-api-180713009.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row68575541091"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateApiAclBindingV2__p28591754391">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateApiAclBindingV2__p1485925419919">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateApiAclBindingV2__p38595548911">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateApiAclBindingV2__p4859145417918">Gateway ID, which can be obtained from the gateway information on the APIG console.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateApiAclBindingV2__section198594549912"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row7860115410912"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="CreateApiAclBindingV2__p186019541096">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="CreateApiAclBindingV2__p16860195417913">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="CreateApiAclBindingV2__p1886018547916">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="CreateApiAclBindingV2__p16860165410918">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row1486010541296"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="CreateApiAclBindingV2__p3861754598">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="CreateApiAclBindingV2__p9861195418911">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="CreateApiAclBindingV2__p168615548918">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="CreateApiAclBindingV2__p18861145416910">User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__request_AclApiBindingCreate" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row19861125415917"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="CreateApiAclBindingV2__p386219544920">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="CreateApiAclBindingV2__p13862154693">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="CreateApiAclBindingV2__p2086245410910">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="CreateApiAclBindingV2__p188621547918">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row186195417914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="CreateApiAclBindingV2__p686211541391">acl_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="CreateApiAclBindingV2__p1286211549920">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="CreateApiAclBindingV2__p786310548918">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="CreateApiAclBindingV2__p2086319541299">Access control policy ID.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row28616545918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="CreateApiAclBindingV2__p118633542910">publish_ids</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="CreateApiAclBindingV2__p386312541496">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="CreateApiAclBindingV2__p6863185413918">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="CreateApiAclBindingV2__p19863125420916">API publication record ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateApiAclBindingV2__section5863105410910"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateApiAclBindingV2__p386310541096"><strong id="CreateApiAclBindingV2__b1863185415914">Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_AclApiBindingResult" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row1286413548910"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="CreateApiAclBindingV2__p98644544917">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="CreateApiAclBindingV2__p586415544918">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="CreateApiAclBindingV2__p1486411547911">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row1186435416917"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="CreateApiAclBindingV2__p28641540919">acl_bindings</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="CreateApiAclBindingV2__p198651054197">Array of <a href="#CreateApiAclBindingV2__response_AclApiBindingInfo">AclApiBindingInfo</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="CreateApiAclBindingV2__p58651454696">Access control policy binding records.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateApiAclBindingV2__response_AclApiBindingInfo"></a><a name="response_AclApiBindingInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_AclApiBindingInfo" frame="border" border="1" rules="all"><caption><b>Table 5 </b>AclApiBindingInfo</caption><thead align="left"><tr id="CreateApiAclBindingV2__row1386514541898"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="CreateApiAclBindingV2__p586619541692">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="CreateApiAclBindingV2__p15866354190">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="CreateApiAclBindingV2__p168672541492">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row13865115414915"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="CreateApiAclBindingV2__p486705413911">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="CreateApiAclBindingV2__p1086719542092">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="CreateApiAclBindingV2__p8867165414917">Binding record ID.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row1586512542913"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="CreateApiAclBindingV2__p38683545910">api_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="CreateApiAclBindingV2__p158681654499">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="CreateApiAclBindingV2__p1986818549919">API ID.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row1686595417914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="CreateApiAclBindingV2__p11868175410912">env_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="CreateApiAclBindingV2__p286845417910">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="CreateApiAclBindingV2__p108691541911">Environment ID.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row1786525410912"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="CreateApiAclBindingV2__p10869115413915">acl_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="CreateApiAclBindingV2__p1486911541898">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="CreateApiAclBindingV2__p148696546916">Access control policy ID.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row16865354496"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="CreateApiAclBindingV2__p1586916541696">create_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="CreateApiAclBindingV2__p486945415918">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="CreateApiAclBindingV2__p5869205410918">Binding time.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateApiAclBindingV2__p1987065418910"><strong id="CreateApiAclBindingV2__b1187012541599">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_ErrorMsg" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row12870195413915"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="CreateApiAclBindingV2__p17871105419919">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p id="CreateApiAclBindingV2__p487110541698">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p id="CreateApiAclBindingV2__p1487119541692">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row7870195419918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="CreateApiAclBindingV2__p20871145417912">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="CreateApiAclBindingV2__p1687110543913">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="CreateApiAclBindingV2__p1087117541199">Error code.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row12870754693"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="CreateApiAclBindingV2__p1187111541494">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="CreateApiAclBindingV2__p1387111542912">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="CreateApiAclBindingV2__p178729549910">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateApiAclBindingV2__p128723543918"><strong id="CreateApiAclBindingV2__b7872654994">Status code: 401</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_ErrorMsg_1" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row487214547913"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p id="CreateApiAclBindingV2__p1387317541090">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.2"><p id="CreateApiAclBindingV2__p187316541390">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.8.2.4.1.3"><p id="CreateApiAclBindingV2__p58731354796">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row8872854397"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="CreateApiAclBindingV2__p178732541699">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="CreateApiAclBindingV2__p787319544918">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="CreateApiAclBindingV2__p687412541493">Error code.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row198731454598"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="CreateApiAclBindingV2__p687475411911">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="CreateApiAclBindingV2__p887412545915">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="CreateApiAclBindingV2__p1387411541595">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateApiAclBindingV2__p587420543918"><strong id="CreateApiAclBindingV2__b1587417541190">Status code: 403</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_ErrorMsg_2" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row28748541694"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.4.1.1"><p id="CreateApiAclBindingV2__p148751554392">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.4.1.2"><p id="CreateApiAclBindingV2__p187516541098">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.10.2.4.1.3"><p id="CreateApiAclBindingV2__p787510541793">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row88759546918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.1 "><p id="CreateApiAclBindingV2__p1887515411912">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.2 "><p id="CreateApiAclBindingV2__p168765541191">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.10.2.4.1.3 "><p id="CreateApiAclBindingV2__p14876145411920">Error code.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row787595414912"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.1 "><p id="CreateApiAclBindingV2__p58761545916">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.2 "><p id="CreateApiAclBindingV2__p16876854791">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.10.2.4.1.3 "><p id="CreateApiAclBindingV2__p158760541097">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateApiAclBindingV2__p1887615541797"><strong id="CreateApiAclBindingV2__b2087617541094">Status code: 404</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_ErrorMsg_3" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row28769541496"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.12.2.4.1.1"><p id="CreateApiAclBindingV2__p118771254594">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.12.2.4.1.2"><p id="CreateApiAclBindingV2__p12877115417915">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.12.2.4.1.3"><p id="CreateApiAclBindingV2__p10878454496">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row98774544918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.1 "><p id="CreateApiAclBindingV2__p128785541499">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.2 "><p id="CreateApiAclBindingV2__p19878115413911">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.12.2.4.1.3 "><p id="CreateApiAclBindingV2__p1187818549918">Error code.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row11877154993"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.1 "><p id="CreateApiAclBindingV2__p687895413916">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.2 "><p id="CreateApiAclBindingV2__p5878105416918">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.12.2.4.1.3 "><p id="CreateApiAclBindingV2__p2878254391">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateApiAclBindingV2__p087820541791"><strong id="CreateApiAclBindingV2__b7879185414917">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__response_ErrorMsg_4" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="CreateApiAclBindingV2__row1687913541295"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.14.2.4.1.1"><p id="CreateApiAclBindingV2__p5879205413916">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.14.2.4.1.2"><p id="CreateApiAclBindingV2__p58796541394">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.14.2.4.1.3"><p id="CreateApiAclBindingV2__p138801054096">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row78791854595"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.1 "><p id="CreateApiAclBindingV2__p28808541690">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.2 "><p id="CreateApiAclBindingV2__p118806549912">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.14.2.4.1.3 "><p id="CreateApiAclBindingV2__p988055417915">Error code.</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row15879165418919"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.1 "><p id="CreateApiAclBindingV2__p5880145413916">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.2 "><p id="CreateApiAclBindingV2__p13881145420916">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.14.2.4.1.3 "><p id="CreateApiAclBindingV2__p1688110545917">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateApiAclBindingV2__section1088110542916"><h4 class="sectiontitle">Example Requests</h4><p id="CreateApiAclBindingV2__p14881254295">Binding an access control policy to an API</p>
<pre class="screen" id="CreateApiAclBindingV2__screen138813547915">{
"acl_id" : "7eb619ecf2a24943b099833cd24a01ba",
"publish_ids" : [ "40e7162dc6b94bbbbb1a60d2a24b1b0c" ]
}</pre>
</div>
<div class="section" id="CreateApiAclBindingV2__section98822541493"><h4 class="sectiontitle">Example Responses</h4><p id="CreateApiAclBindingV2__p14882195415911"><strong id="CreateApiAclBindingV2__b138821544910">Status code: 201</strong></p>
<p id="CreateApiAclBindingV2__p158821654798">Created</p>
<pre class="screen" id="CreateApiAclBindingV2__screen1688375416918">{
"acl_bindings" : [ {
"id" : "332c5db1458a477b89b2ea741fec94a3",
"api_id" : "5f918d104dc84480a75166ba99efff21",
"env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
"acl_id" : "7eb619ecf2a24943b099833cd24a01ba",
"create_time" : "2020-08-04T08:58:03.001228747Z"
} ]
}</pre>
<p id="CreateApiAclBindingV2__p11886654497"><strong id="CreateApiAclBindingV2__b98864541919">Status code: 400</strong></p>
<p id="CreateApiAclBindingV2__p12886135416919">Bad Request</p>
<pre class="screen" id="CreateApiAclBindingV2__screen688717547910">{
"error_code" : "APIG.2011",
"error_msg" : "Invalid parameter value,parameterName:acl_id. Please refer to the support documentation"
}</pre>
<p id="CreateApiAclBindingV2__p168876544913"><strong id="CreateApiAclBindingV2__b138873545916">Status code: 401</strong></p>
<p id="CreateApiAclBindingV2__p108871654596">Unauthorized</p>
<pre class="screen" id="CreateApiAclBindingV2__screen1988811541594">{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}</pre>
<p id="CreateApiAclBindingV2__p17888165419919"><strong id="CreateApiAclBindingV2__b1388815541998">Status code: 403</strong></p>
<p id="CreateApiAclBindingV2__p28882543919">Forbidden</p>
<pre class="screen" id="CreateApiAclBindingV2__screen1488815541592">{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
}</pre>
<p id="CreateApiAclBindingV2__p208896542917"><strong id="CreateApiAclBindingV2__b20889115412914">Status code: 404</strong></p>
<p id="CreateApiAclBindingV2__p688919541092">Not Found</p>
<pre class="screen" id="CreateApiAclBindingV2__screen1888919541291">{
"error_code" : "APIG.3006",
"error_msg" : "Access control policy 7eb619ecf2a24943b099833cd24a01ba does not exist"
}</pre>
<p id="CreateApiAclBindingV2__p168901154496"><strong id="CreateApiAclBindingV2__b1889014541395">Status code: 500</strong></p>
<p id="CreateApiAclBindingV2__p58904541991">Internal Server Error</p>
<pre class="screen" id="CreateApiAclBindingV2__screen198905545915">{
"error_code" : "APIG.9999",
"error_msg" : "System error"
}</pre>
</div>
<div class="section" id="CreateApiAclBindingV2__section18901354491"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateApiAclBindingV2__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateApiAclBindingV2__row7891854999"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="CreateApiAclBindingV2__p1189145410917">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="CreateApiAclBindingV2__p17892105417919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateApiAclBindingV2__row889110541398"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateApiAclBindingV2__p38926549915">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateApiAclBindingV2__p148929545914">Created</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row158912541299"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateApiAclBindingV2__p989217549916">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateApiAclBindingV2__p198921541196">Bad Request</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row198911154299"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateApiAclBindingV2__p1589225412910">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateApiAclBindingV2__p118929541495">Unauthorized</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row108911540913"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateApiAclBindingV2__p15892135411917">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateApiAclBindingV2__p13892454599">Forbidden</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row12891185419916"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateApiAclBindingV2__p8893135414913">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateApiAclBindingV2__p1589314545913">Not Found</p>
</td>
</tr>
<tr id="CreateApiAclBindingV2__row10891754998"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateApiAclBindingV2__p78645519919">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateApiAclBindingV2__p68618551599">Internal Server Error</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateApiAclBindingV2__section28616558917"><h4 class="sectiontitle">Error Codes</h4><p id="CreateApiAclBindingV2__p158619554919">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="AclPolicyBinding.html">Binding/Unbinding Access Control Policies</a></div>
</div>
</div>