forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
134 lines
11 KiB
HTML
134 lines
11 KiB
HTML
<a name="rds_09_0001"></a><a name="rds_09_0001"></a>
|
|
|
|
<h1 class="topictitle1">Binding or Unbinding an EIP</h1>
|
|
<div id="body1508227694255"><div class="section" id="rds_09_0001__section36524518102048"><h4 class="sectiontitle">Function</h4><p id="rds_09_0001__p5695975102048">This API is used to bind or unbind an EIP.</p>
|
|
</div>
|
|
<div class="section" id="rds_09_0001__section51263775102048"><h4 class="sectiontitle">URI</h4><ul id="rds_09_0001__ul58725117102048"><li id="rds_09_0001__li58764013102048">URI format<p id="rds_09_0001__p59114076102048"><a name="rds_09_0001__li58764013102048"></a><a name="li58764013102048"></a>PATH: /rds/v1/{project_id}/instances/{instanceId}/action</p>
|
|
<p id="rds_09_0001__p62264644102048">Method: POST</p>
|
|
</li><li id="rds_09_0001__li23510884102048">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_09_0001__table10271366102048" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_09_0001__row47701174102048"><th align="left" class="cellrowborder" valign="top" width="20.97%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="rds_09_0001__p38589920102048"><strong id="rds_09_0001__b84235270691445_1">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.110000000000003%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="rds_09_0001__p38775843102048"><strong id="rds_09_0001__b842352706102346_1">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.919999999999995%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="rds_09_0001__p53835558102048"><strong id="rds_09_0001__b842352706163417_1">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_09_0001__row65712913102048"><td class="cellrowborder" valign="top" width="20.97%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="rds_09_0001__p21145741102048">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.110000000000003%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="rds_09_0001__p35083457102048">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.919999999999995%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="rds_09_0001__p23187798102048">Specifies the project ID of a tenant in a region.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_09_0001__row7363596102048"><td class="cellrowborder" valign="top" width="20.97%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="rds_09_0001__p751522153814">instanceId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.110000000000003%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="rds_09_0001__p61286098102048">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.919999999999995%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="rds_09_0001__p7417132564016">Specifies the primary node ID of the DB instance.</p>
|
|
<div class="note" id="rds_09_0001__note18250133224019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="rds_09_0001__p142501332164011">This field is not the DB instance ID. You are advised to use API v3 and the DB instance ID to perform related operations.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="rds_09_0001__ul42619298102048"><li id="rds_09_0001__li48029366102048">Restrictions<p id="rds_09_0001__p65173451102048"><a name="rds_09_0001__li48029366102048"></a><a name="li48029366102048"></a>First, invoke the VPC API to query EIPs by referring to section "Querying Elastic IP Addresses" in the <em id="rds_09_0001__i84235269795937">Virtual Private Cloud API Reference</em>. If no EIP is available for the tenant, invoke the VPC API to create an EIP by referring to section "Applying for an Elastic IP Address" in the <em id="rds_09_0001__i120534968610340">Virtual Private Cloud API Reference</em>.</p>
|
|
<p id="rds_09_0001__p20737812183338">EIPs cannot be bound to or unbound from primary/standby DB instances of earlier versions.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_09_0001__section49690149102048"><h4 class="sectiontitle">Request</h4><ul id="rds_09_0001__ul65479160102048"><li id="rds_09_0001__li52441530102048">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_09_0001__table2211723102048" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_09_0001__row16582139102048"><th align="left" class="cellrowborder" valign="top" width="21.242124212421242%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="rds_09_0001__p976041102048"><strong id="rds_09_0001__b84235270691445_5">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.192819281928188%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="rds_09_0001__p11950471102048"><strong id="rds_09_0001__b842352706102346_5">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.562556255625562%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="rds_09_0001__p28464061102048"><strong id="rds_09_0001__b842352706164541_1">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.002500250025%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="rds_09_0001__p23887604102048"><strong id="rds_09_0001__b842352706163417_5">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_09_0001__row55847763102048"><td class="cellrowborder" valign="top" width="21.242124212421242%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="rds_09_0001__p27374979102048">setPublicIp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.192819281928188%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="rds_09_0001__p2780844102048">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="rds_09_0001__p23921781102048">Dictionary data structure. For details, see <a href="#rds_09_0001__table16417881161621">Table 3</a>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.002500250025%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="rds_09_0001__p58616070102048">Returns EIP information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rds_09_0001__table16417881161621"></a><a name="table16417881161621"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_09_0001__table16417881161621" frame="border" border="1" rules="all"><caption><b>Table 3 </b>setPublicIp field data structure description</caption><thead align="left"><tr id="rds_09_0001__row16337907161621"><th align="left" class="cellrowborder" valign="top" width="20.419999999999998%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="rds_09_0001__p42405005161621"><strong id="rds_09_0001__b84235270691445_7">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.810000000000002%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="rds_09_0001__p10953378161621"><strong id="rds_09_0001__b842352706102346_7">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26.13%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="rds_09_0001__p34762175162215"><strong id="rds_09_0001__b842352706164541_3">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.64%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="rds_09_0001__p45164760161621"><strong id="rds_09_0001__b842352706163417_7">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_09_0001__row56422788161621"><td class="cellrowborder" valign="top" width="20.419999999999998%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_09_0001__p52148269161621">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.810000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_09_0001__p58818313161621">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.13%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_09_0001__p10340856162215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.64%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_09_0001__p37698381163714">If this parameter is <span class="parmvalue" id="rds_09_0001__parmvalue1792293094213356"><b>enablePublicAccess</b></span>, the EIP is bound to the target DB instance.</p>
|
|
<p id="rds_09_0001__p3023621616172">If this parameter is <span class="parmvalue" id="rds_09_0001__parmvalue23207739010939"><b>disablePublicAccess</b></span>, the EIP is unbound from the target DB instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_09_0001__row45499856161621"><td class="cellrowborder" valign="top" width="20.419999999999998%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_09_0001__p1877671161621">publicIP</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.810000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_09_0001__p66741607161621">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.13%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_09_0001__p49060751162215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.64%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_09_0001__p26919856162049">Specifies the EIP obtained by invoking the VPC API. This parameter is not contained in the request when unbinding the EIP.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_09_0001__row8184527161621"><td class="cellrowborder" valign="top" width="20.419999999999998%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_09_0001__p55239882161621">publicIPId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.810000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_09_0001__p21739441161621">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.13%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_09_0001__p64203138162215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.64%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_09_0001__p52500795161621">Specifies the EIP ID obtained by invoking the VPC API. This parameter is not contained in the request when unbinding the EIP.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="rds_09_0001__ul50281224102048"><li id="rds_09_0001__li49877834102048">Request example<div class="p" id="rds_09_0001__p28975255105348"><a name="rds_09_0001__li49877834102048"></a><a name="li49877834102048"></a>Binding an EIP:<pre class="codeblock" id="rds_09_0001__codeblock42021961162138">{
|
|
"setPublicIp":{
|
|
"action":"enablePublicAccess",
|
|
"publicIP":"10.145.49.92",
|
|
"publicIPId":"4c9c30f5-54fb-4e44-8c6e-df4ea8790e93"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="rds_09_0001__p3197484105433">Unbinding an EIP:</p>
|
|
<pre class="codeblock" id="rds_09_0001__codeblock66096141105458">{
|
|
"setPublicIp":{
|
|
"action":"disablePublicAccess"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_09_0001__section13572792102048"><h4 class="sectiontitle">Normal Response</h4><pre class="codeblock" id="rds_09_0001__codeblock2249609510523">{}</pre>
|
|
</div>
|
|
<div class="section" id="rds_09_0001__section64738761102048"><h4 class="sectiontitle">Abnormal Response</h4><p id="rds_09_0001__p9348284102048">For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_06_0016.html">DB Instance Management</a></div>
|
|
</div>
|
|
</div>
|
|
|