Querying the IP Whitelist of a DCS Instance
Function
This API is used to query the IP address whitelist of a specific instance.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/instance/{instance_id}/whitelist
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| instance_id | String | Instance ID. |
| enable_whitelist | Boolean | Whether to enable the whitelist. |
| whitelist | Array of Whitelist objects | Current instance IP whitelist. |
| whitelist_ip_limit_num | String | Maximum number of IP addresses allowed in the IP whitelist of a tenant instance. |
| Parameter | Type | Description |
|---|---|---|
| group_name | String | Parameter description: Whitelist group name. Constraints: Four unique groups can be created for each instance. Value range: N/A Default value: N/A |
| ip_list | Array of strings | Parameter description: IP list in a whitelist group. Separate multiple ones with commas (,). Constraints: An instance's IPs must be unique. IP address 0.0.0.0 and IP address range 0.0.0.0/0 are not supported. Value range: N/A Default value: N/A |
Example Requests
GET https://{dcs_endpoint}/v2/{project_id}/instance/{instance_id}/whitelist Example Responses
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" ]
} ],
"whitelist_ip_limit_num" : 20
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Instance whitelist queried successfully. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.