voxel.ips.assign

Assign an IP address to a server or VM.

Parameters

device_id (required)
Numeric Voxel device id, available from devices.list
facility (required)
Datacenter facility code, available via voxcloud.facilities.list or voxservers.facilities.list.
ip_address_type (required)
The type of address to assign. Must be one of "frontend" or "backend".
ip_address (optional)
The specific address to assign. Must be from one of the VLANs valid at the requested facility.

Example Response

<rsp stat="ok">
  <ipassignment description="192.168.1.1/32" id="1234" type="frontend">192.168.1.1</ipassignment>
</rsp>

Notes

You must specify a device_id (e.g., from devices.list); a facility code (generally, one that is associated with some IP addresses in ips.list); and an ip_address_type (one of "frontend" or "backend", depending upon whether you want a publicly accessible IP or one internal to Voxel's network). For the call to succeed, you must have some available IPs matching the criteria; ips.list lists your available IP addresses.

If you specify a specific ip_address, and that address is available at the requested facility and assigned to your account, then that address is assigned to the specified device.

The method returns several details of the IP assignment, including the assigned IP itself, its type, and an IP assignment id that may be used with ips.unassign.

Method Specific Error Codes

100: Unknown device
The device_id passed in can't be matched to a valid device.
206: Failed acquiring resource
A resource required to perform the action could not be obtained.