forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
136 lines
9.4 KiB
HTML
136 lines
9.4 KiB
HTML
<a name="ShowIpWhitelist"></a><a name="ShowIpWhitelist"></a>
|
|
|
|
<h1 class="topictitle1">Querying the IP Whitelist of a DCS Instance</h1>
|
|
<div id="body0000001322949120"><div class="section" id="ShowIpWhitelist__section20514720005"><h4 class="sectiontitle">Function</h4><p id="ShowIpWhitelist__p10515520108">This API is used to query the IP address whitelist of a specific instance.</p>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section2051618203014"><h4 class="sectiontitle">URI</h4><p id="ShowIpWhitelist__p14516320509">GET /v2/{project_id}/instance/{instance_id}/whitelist</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowIpWhitelist__table85185205014" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameter</caption><thead align="left"><tr id="ShowIpWhitelist__row8517162018015"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ShowIpWhitelist__p75189204016">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ShowIpWhitelist__p125186203019">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ShowIpWhitelist__p1151942018010">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ShowIpWhitelist__p551992019010">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row115179201901"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowIpWhitelist__p1652011201401">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowIpWhitelist__p4520152012020">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowIpWhitelist__p155209207020">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowIpWhitelist__p252112204018">Project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row251711201401"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowIpWhitelist__p5521112010011">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowIpWhitelist__p165216201507">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowIpWhitelist__p165227201305">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowIpWhitelist__p252219201204">Instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section2522520604"><h4 class="sectiontitle">Request Parameters</h4><p id="ShowIpWhitelist__p552316201107">None</p>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section852310208013"><h4 class="sectiontitle">Response Parameters</h4><p id="ShowIpWhitelist__p9523520205"><strong id="ShowIpWhitelist__b58657138301">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__row19524192015015"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="ShowIpWhitelist__p185258201508">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="ShowIpWhitelist__p1152616203017">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="ShowIpWhitelist__p13526162020015">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row165241720901"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowIpWhitelist__p145271020001">enable_whitelist</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowIpWhitelist__p165277203010">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowIpWhitelist__p1352810202015">Whether to enable the whitelist.</p>
|
|
<p id="ShowIpWhitelist__p1552818201019">Options:</p>
|
|
<ul id="ShowIpWhitelist__ul65281201401"><li id="ShowIpWhitelist__li65284203018"><strong id="ShowIpWhitelist__b6529142012016">true</strong></li><li id="ShowIpWhitelist__li75291520707"><strong id="ShowIpWhitelist__b1152919201002">false</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row1552414200017"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowIpWhitelist__p1852917201503">whitelist</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowIpWhitelist__p65303206011">Array of <a href="#ShowIpWhitelist__response_Whitelist">Whitelist</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowIpWhitelist__p35301420403">IP whitelist group.</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__row153122013014"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="ShowIpWhitelist__p3532152016013">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="ShowIpWhitelist__p153211201103">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="ShowIpWhitelist__p15331520609">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row14531320600"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowIpWhitelist__p55330207018">group_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowIpWhitelist__p1053416203014">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowIpWhitelist__p1853411201306">Whitelist group name. A maximum of four groups can be created for each instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowIpWhitelist__row2531192018010"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowIpWhitelist__p453542013012">ip_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowIpWhitelist__p6535820205">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowIpWhitelist__p12536162015015">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__section115367202018"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="ShowIpWhitelist__screen1953712016015">GET https://{dcs_endpoint}/v2/{project_id}/instance/{instance_id}/whitelist</pre>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section19538420808"><h4 class="sectiontitle">Example Response</h4><p id="ShowIpWhitelist__p105396201603"><strong id="ShowIpWhitelist__b134053143305">Status code: 200</strong></p>
|
|
<p id="ShowIpWhitelist__p11539112014014">Instance whitelist queried successfully.</p>
|
|
<pre class="screen" id="ShowIpWhitelist__screen13540142012018">{
|
|
"instance_id" : "5560df16-cebf-4473-95c4-d1b573c16e79",
|
|
"enable_whitelist" : true,
|
|
"whitelist" : {
|
|
"group_name" : "test001",
|
|
"ip_list" : [ "10.10.10.1", "10.10.10.2" ]
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section1254313201106"><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__row12543202011011"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ShowIpWhitelist__p454413204019">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__p1754502015017">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowIpWhitelist__row1554413201602"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowIpWhitelist__p65466206013">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowIpWhitelist__p1554615200017">Instance whitelist queried successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowIpWhitelist__section115462201606"><h4 class="sectiontitle">Error Codes</h4><p id="ShowIpWhitelist__p16547102015015">See <a href="dcs-api-0312044.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000009.html">Network Security</a></div>
|
|
</div>
|
|
</div>
|
|
|