This API is used to query the IP address whitelist of a specific instance.
GET /v2/{project_id}/instance/{instance_id}/whitelist
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
instance_id |
Yes |
String |
Instance ID. |
None
Status code: 200
Parameter |
Type |
Description |
---|---|---|
enable_whitelist |
Boolean |
Whether to enable the whitelist. Options:
|
whitelist |
Array of Whitelist objects |
IP whitelist group. |
Parameter |
Type |
Description |
---|---|---|
group_name |
String |
Whitelist group name. A maximum of four groups can be created for each instance. |
ip_list |
Array of strings |
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. |
GET https://{dcs_endpoint}/v2/{project_id}/instance/{instance_id}/whitelist
Status code: 200
Instance whitelist queried successfully.
{ "instance_id" : "5560df16-cebf-4473-95c4-d1b573c16e79", "enable_whitelist" : true, "whitelist" : { "group_name" : "test001", "ip_list" : [ "10.10.10.1", "10.10.10.2" ] } }
Status Code |
Description |
---|---|
200 |
Instance whitelist queried successfully. |
See Error Codes.