List IP addresses of the switch
listSwitchIPs returns the IP addresses configured on the switch and whether each one is already assigned to an environment. Call it before createEnvironment or updateEnvironment to pick a free address for assigned_ips. Only the root customer of the root environment can call it.
The method supports trusted mode with i_customer, the ID of the root customer.
Parameters
Section titled “Parameters”The method takes no parameters. Send an empty struct.
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
ips |
array | One struct per IP address, with the members below |
| Name | Type | Description |
|---|---|---|
ip |
string | The IP address |
status |
string | AVAILABLE: you can assign it to an environment. INUSE: it is assigned to an environment already |
Example
Section titled “Example”call("listSwitchIPs", {}){ "result": "OK", "ips": [ {"ip": "192.0.2.10", "status": "INUSE"}, {"ip": "192.0.2.20", "status": "INUSE"}, {"ip": "192.0.2.21", "status": "AVAILABLE"}, ],}Related
Section titled “Related”- Virtual environments: Environment IPs of the Environments screen
- Create an environment
- Update an environment