forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
149 lines
10 KiB
HTML
149 lines
10 KiB
HTML
<a name="ShowIpWhitelist"></a><a name="ShowIpWhitelist"></a>
|
|
|
|
<h1 class="topictitle1">Querying the IP Whitelist of a DCS Instance</h1>
|
|
<div id="body1708331107508"><div class="section" id="ShowIpWhitelist__section329631835611"><h4 class="sectiontitle">Function</h4><p id="ShowIpWhitelist__p7297161810563">This API is used to query the IP address whitelist of a specific instance.</p>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section1029741825619"><h4 class="sectiontitle">URI</h4><p id="ShowIpWhitelist__p16297121825611">GET /v2/{project_id}/instance/{instance_id}/whitelist</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowIpWhitelist__table2298718155618" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ShowIpWhitelist__row1029821812566"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ShowIpWhitelist__p529881819564">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ShowIpWhitelist__p14299018115619">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ShowIpWhitelist__p1299121805618">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ShowIpWhitelist__p1929920187565">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row2029811814560"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowIpWhitelist__p8299151810561">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowIpWhitelist__p11299191819561">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowIpWhitelist__p17299201813563">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowIpWhitelist__p142992018145611">Project ID. For details, see <a href="dcs-api-0312045.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row16298171865616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowIpWhitelist__p730016182561">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowIpWhitelist__p1430016183560">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowIpWhitelist__p6300191815616">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowIpWhitelist__p630021875618">Instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section1330061817566"><h4 class="sectiontitle">Request Parameters</h4><p id="ShowIpWhitelist__p1030031811566">None</p>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section9300518105616"><h4 class="sectiontitle">Response Parameters</h4><p id="ShowIpWhitelist__p143001618185620"><strong id="ShowIpWhitelist__b730114187563">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowIpWhitelist__response_ModifyIpWhitelistBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response body parameters</caption><thead align="left"><tr id="ShowIpWhitelist__row1530141815616"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="ShowIpWhitelist__p23021818185616">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="ShowIpWhitelist__p153021718105616">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="ShowIpWhitelist__p230211813567">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row12301918155617"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowIpWhitelist__p113021418155618">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowIpWhitelist__p16302141812569">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowIpWhitelist__p16302218155618">Instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row14301181817569"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowIpWhitelist__p123031318195615">enable_whitelist</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowIpWhitelist__p4303131805616">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowIpWhitelist__p130318180569">Whether to enable the whitelist. The options are <strong id="ShowIpWhitelist__b163031418155614">true</strong> and <strong id="ShowIpWhitelist__b930321812563">false</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row6301161885620"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowIpWhitelist__p1930313185568">whitelist</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowIpWhitelist__p93037188567">Array of <a href="#ShowIpWhitelist__response_Whitelist">Whitelist</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowIpWhitelist__p163031418115616">IP whitelist group. New whitelist settings will overwrite the existing setting. Therefore, save the existing whitelist before you add a new one.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row5153203911569"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowIpWhitelist__p17634350155618">whitelist_ip_limit_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowIpWhitelist__p063417507563">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowIpWhitelist__p9639037966">Maximum whitelisted IP addresses.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ShowIpWhitelist__response_Whitelist"></a><a name="response_Whitelist"></a><table cellpadding="4" cellspacing="0" summary="" id="ShowIpWhitelist__response_Whitelist" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Whitelist</caption><thead align="left"><tr id="ShowIpWhitelist__row14304131810564"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="ShowIpWhitelist__p330431845619">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="ShowIpWhitelist__p1430411875620">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="ShowIpWhitelist__p4304818125614">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row1330451811565"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowIpWhitelist__p203051618135610">group_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowIpWhitelist__p630519183567">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowIpWhitelist__p16305718125617">Whitelist group name. A maximum of four groups can be created for each instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row183041218195610"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowIpWhitelist__p1830561885615">ip_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowIpWhitelist__p9305141818568">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowIpWhitelist__p1430561845610">List of IP addresses in the whitelist group. A maximum of 20 IP addresses or IP address ranges can be added to an instance. Separate multiple IP addresses or IP address ranges with commas (,). IP address 0.0.0.0 and IP address range 0.0.0/0 are not supported.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section130517180562"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="ShowIpWhitelist__screen1130681820565">GET https://{dcs_endpoint}/v2/{project_id}/instance/{instance_id}/whitelist</pre>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section1730691895619"><h4 class="sectiontitle">Example Responses</h4><p id="ShowIpWhitelist__p1430671817562"><strong id="ShowIpWhitelist__b12306131895616">Status code: 200</strong></p>
|
|
<p id="ShowIpWhitelist__p1430611815567">Instance whitelist queried successfully.</p>
|
|
<pre class="screen" id="ShowIpWhitelist__screen143063189563">{
|
|
"instance_id" : "5560df16-cebf-4473-95c4-d1b573c16e79",
|
|
"enable_whitelist" : true,
|
|
"whitelist" : [ {
|
|
"group_name" : "test001",
|
|
"ip_list" : [ "10.10.10.1", "10.10.10.2" ]
|
|
} ],
|
|
"whitelist_ip_limit_num" : 20
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section8307171814562"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowIpWhitelist__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ShowIpWhitelist__row15307151855617"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ShowIpWhitelist__p153071518155618">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ShowIpWhitelist__p1130720184561">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row6307111815616"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowIpWhitelist__p43071118155613">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowIpWhitelist__p10308201825616">Instance whitelist queried successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section20308101811564"><h4 class="sectiontitle">Error Codes</h4><p id="ShowIpWhitelist__p1308131855615">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="NetworkSecurityManagement.html">Network Security</a></div>
|
|
</div>
|
|
</div>
|
|
|