forked from docs/doc-exports
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com> Co-authored-by: Ru, Li Yi <liyiru7@huawei.com> Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
110 lines
11 KiB
HTML
110 lines
11 KiB
HTML
<a name="dds_api_0120"></a><a name="dds_api_0120"></a>
|
|
|
|
<h1 class="topictitle1">Enabling Shard or Config IP Addresses</h1>
|
|
<div id="body0000001072787211"><div class="section" id="dds_api_0120__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="dds_api_0120__p3631239417316">This API is used to enable the IP addresses of shard or config nodes.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_0120__section1239972118494"><h4 class="sectiontitle">Constraints</h4><ul id="dds_api_0120__ul1349153115110"><li id="dds_api_0120__li15447401739">Frozen instances do not support this operation.</li><li id="dds_api_0120__li13778164334514">DB instances associated with the IPv6 subnet do not support this operation.</li><li id="dds_api_0120__li171681511134">If the IP address is enabled, restart the nodes for the setting to take effect.</li><li id="dds_api_0120__li14453318174110">Cluster instances of Community Edition 3.4, 4.0, 4.2 and 4.4 are supported.</li><li id="dds_api_0120__li103765812554">This function cannot be disabled after being enabled.</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0120__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0120__ul3084351717316"><li id="dds_api_0120__li915620217316">URI format<p id="dds_api_0120__p912862005412"><a name="dds_api_0120__li915620217316"></a><a name="li915620217316"></a>POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/create-ip</p>
|
|
</li><li id="dds_api_0120__li15430535">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0120__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0120__row60083059"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.3.2.2.1.2.4.1.1"><p id="dds_api_0120__p34889605">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.9%" id="mcps1.3.3.2.2.1.2.4.1.2"><p id="dds_api_0120__p7485743">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.1%" id="mcps1.3.3.2.2.1.2.4.1.3"><p id="dds_api_0120__p2775334615440">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0120__row57385070"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0120__p732920567115">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0120__p532935613116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0120__p4329756415">Specifies the project ID of a tenant in a region.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0120__row2864326155157"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0120__p963319528116">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.9%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0120__p1032910565114">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.1%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0120__p15330656516">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_0120__section3074340117316"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0120__ul5099287616954"><li id="dds_api_0120__li5628270116954">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0120__table3678226816954" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0120__row1340482316954"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="dds_api_0120__p1204887716954">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.73%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="dds_api_0120__p3643495116954">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.17%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="dds_api_0120__p1680261613614">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="48.1%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="dds_api_0120__p222501215320">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0120__row794180116954"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0120__p37323919416">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.73%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0120__p18748396418">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.17%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0120__p88026168367">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.1%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0120__p9144133716104">Cluster instance type.</p>
|
|
<ul id="dds_api_0120__ul11484131082718"><li id="dds_api_0120__li1748481016275">When applying for a shard IP address, set the value to <strong id="dds_api_0120__b193189494159">shard</strong>. A read-only user <strong id="dds_api_0120__b169138815165">sharduser</strong> is automatically created for the shard group. (Each shard group has a read-only user with the same name.)</li></ul>
|
|
<ul id="dds_api_0120__ul1749444819162"><li id="dds_api_0120__li1068112552717">When applying for a config IP address, set the value to <strong id="dds_api_0120__b498716146205">config</strong>. A read-only user <strong id="dds_api_0120__b1918732292014">csuser</strong> is automatically created for the config group.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0120__row375935052813"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0120__p276045013289">target_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.73%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0120__p157607501285">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.17%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0120__p6802516113612">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.1%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0120__p3322344192017">Shard group ID.</p>
|
|
<div class="caution" id="dds_api_0120__note8782147101710"><span class="cautiontitle"> CAUTION: </span><div class="cautionbody"><ul id="dds_api_0120__ul8279154252715"><li id="dds_api_0120__li7279144217274">If you apply for a shard or config IP address for the first time, this parameter is not specified. You can apply for an IP address for all shard groups using the same password and create a read-only user <strong id="dds_api_0120__b94851016182219">sharduser</strong>.</li><li id="dds_api_0120__li72792042142716">In node scale-out scenarios, the system does not automatically apply for an IP address and read-only user <strong id="dds_api_0120__b1712805422313">sharduser</strong> for the new shard group because there is no <strong id="dds_api_0120__b10833165192417">sharduser</strong> user and password of other shard groups. If you need to apply for an IP address for the new shard group, call this API and specify <strong id="dds_api_0120__b032019832518">target_id</strong> (group ID).</li><li id="dds_api_0120__li1279104292716">If this API is called for multiple times for the same DB instance, the values for the <strong id="dds_api_0120__b4977173742615">password</strong> field can be different. (Each shard group has a read-only user with the same name.)</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0120__row8551715205814"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0120__p18744391445">password</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.73%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0120__p374439545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.17%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0120__p148021216143620">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.1%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0120__p17749394417">The password for enabling this function for a cluster.</p>
|
|
<ul id="dds_api_0120__ul51929218214"><li id="dds_api_0120__li1119282192113">The value must be 8 to 32 characters in length and contain uppercase letters (A to Z), lowercase letters (a to z), digits (0 to 9), and special characters, such as ~!@#%^*-_=+?()$</li><li id="dds_api_0120__li685612512115">Enter a strong password to improve security, preventing security risks such as brute force cracking.</li></ul>
|
|
<div class="caution" id="dds_api_0120__note442401812195"><span class="cautiontitle"> CAUTION: </span><div class="cautionbody"><p id="dds_api_0120__p11936627141911">The password can be changed by calling the API for changing a database user password. After the API for changing a database user password is called, the passwords of the read-only user <strong id="dds_api_0120__b43861578283">sharduser</strong> of all shard groups are the same when <strong id="dds_api_0120__b15647191711293">target_id</strong> is specified.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="dds_api_0120__ul1041877316954"><li id="dds_api_0120__li2666010016954">Request example<div class="p" id="dds_api_0120__p16231155132115"><a name="dds_api_0120__li2666010016954"></a><a name="li2666010016954"></a>POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/create-ip<pre class="codeblock" id="dds_api_0120__codeblock10620175002112">{
|
|
"type": "shard",
|
|
"target_id": "91bac9f23ead42e19013333e05f44829gr02",
|
|
"password": "******"
|
|
}</pre>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0120__section28521534113742"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0120__ul16665627"><li id="dds_api_0120__li15772917">Response example<pre class="codeblock" id="dds_api_0120__codeblock660937479172">{}
|
|
</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0120__section5382712154838"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0120__en-us_topic_0000001387505349_p16131712193312">Status Code:200.</p>
|
|
<p id="dds_api_0120__en-us_topic_0000001387505349_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_0120__section6522193710339"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0120__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>
|
|
|