1
0
forked from docs/doc-exports
doc-exports/docs/dds/api-ref/dds_api_0104.html
Wang , Deng Ke 4c6bc53817 dds api for docs/document-database-service#35
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2023-07-11 10:47:18 +00:00

85 lines
7.4 KiB
HTML

<a name="dds_api_0104"></a><a name="dds_api_0104"></a>
<h1 class="topictitle1">Configuring Cross-CIDR Access for a Replica Set</h1>
<div id="body0000001136678111"><div class="section" id="dds_api_0104__section1556264610399"><h4 class="sectiontitle">Function</h4><p id="dds_api_0104__p062814615395">This API is used to configure cross-CIDR access for a replica set instance.</p>
</div>
<div class="section" id="dds_api_0104__section756215463393"><h4 class="sectiontitle">Constraints</h4><p id="dds_api_0104__p6359041085">Only replica set instances are supported.</p>
</div>
<div class="section" id="dds_api_0104__section956434615390"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0104__ul166291046153912"><li id="dds_api_0104__li8629184620398">URI format<p id="dds_api_0104__p166299467391"><a name="dds_api_0104__li8629184620398"></a><a name="li8629184620398"></a>POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/client-network</p>
</li><li id="dds_api_0104__li3629446173916">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0104__table656784633916" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0104__row10629184643917"><th align="left" class="cellrowborder" valign="top" width="24.240000000000002%" id="mcps1.3.3.2.2.1.2.4.1.1"><p id="dds_api_0104__p16293462394">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.240000000000002%" id="mcps1.3.3.2.2.1.2.4.1.2"><p id="dds_api_0104__p1629546103913">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.519999999999996%" id="mcps1.3.3.2.2.1.2.4.1.3"><p id="dds_api_0104__p5629546153914">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0104__row196294461395"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0104__p176299464399">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0104__p96291446163912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.519999999999996%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0104__p96298461390">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
<tr id="dds_api_0104__row962934633916"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0104__p5629114653918">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0104__p1462954673910">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.519999999999996%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0104__p362920461394">Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dds_api_0104__section5575146123912"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0104__ul146290463391"><li id="dds_api_0104__li86291146123918">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0104__table1157712467398" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0104__row66291746123910"><th align="left" class="cellrowborder" valign="top" width="30.610000000000003%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="dds_api_0104__p2629046173920">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.290000000000003%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="dds_api_0104__p762914463391">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.39%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="dds_api_0104__p14629946193919">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.71%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="dds_api_0104__p4629174617399">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0104__row14629184612399"><td class="cellrowborder" valign="top" width="30.610000000000003%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0104__p13629184663911">client_network_ranges</p>
</td>
<td class="cellrowborder" valign="top" width="14.290000000000003%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0104__p562918466397">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.39%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0104__p1362917469399">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="35.71%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0104__p16291046113918">CIDR block where the client is located</p>
<div class="note" id="dds_api_0104__note1282719742210"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="dds_api_0104__ul141671303226"><li id="dds_api_0104__li93541512132918">Cross-CIDR access is required only when the CIDR blocks of the client and the replica set instance are different. For example, if the client CIDR block is 192.168.0.0/16 and the replica set instance's CIDR block is 172.16.0.0/24, add the CIDR block 192.168.0.0/16 so that the client can access the replica set instance. This function is available only for replica sets.</li><li id="dds_api_0104__li257511392226">For example, if the source network segment is 192.168.0.0/<em id="dds_api_0104__i73709373104">xx</em>, the value of <em id="dds_api_0104__i20338441191019">xx</em> must range from <strong id="dds_api_0104__b59621344141017">8</strong> to <strong id="dds_api_0104__b1833144771014">32</strong>.</li><li id="dds_api_0104__li2167113042215">To ensure the ECS and the instance can communicate with each other, configure the connection by referring to VPC Peering Connection Overview.</li></ul>
</div></div>
<p id="dds_api_0104__p9629204610396"></p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="dds_api_0104__ul1462994623919"><li id="dds_api_0104__li6629164613397">Request example<p id="dds_api_0104__p38537114015"><a name="dds_api_0104__li6629164613397"></a><a name="li6629164613397"></a>POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/client-network</p>
<pre class="codeblock" id="dds_api_0104__codeblock19671381801">{
"client_network_ranges":["192.168.0.0/16"]
}</pre>
</li></ul>
</div>
<div class="section" id="dds_api_0104__section7584104673913"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0104__ul176293465395"><li id="dds_api_0104__li1629746113914">Response example</li></ul>
<pre class="codeblock" id="dds_api_0104__codeblock206299466395">{} </pre>
</div>
<div class="section" id="dds_api_0104__section5382712154838"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0104__dds_api_0018_p16131712193312">Status Code:200.</p>
<p id="dds_api_0104__dds_api_0018_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
</div>
<div class="section" id="dds_api_0104__section6522193710339"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0104__dds_api_0018_p20466124120334">For more information, see <a href="dds_error_code.html">Error Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_instance_mgmt.html">DB Instance Management</a></div>
</div>
</div>