IP Address API Reference¶
Changed in version 3.2.2: The following methods are not available anymore : hosting.ip.create, hosting.ip.delete
Methods¶
-
hosting.ip.
count
(apikey[, opts=nil])¶ Count IP addresses.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: int – number of IPs
-
hosting.ip.
info
(apikey, ip_id)¶ Get information about an IP Address.
Parameters: - apikey (string) – API connection key
- ip_id (int) – IP unique identifier
Returns: struct –
IP Address information
-
hosting.ip.
list
(apikey[, opts=nil])¶ List IP addresses.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: struct –
list of IP descriptions
-
hosting.ip.
update
(apikey, ip_id, ip_spec)¶ - Update an IP address using the attributes specified by ip_spec
Parameters: - apikey (string) – API connection key
- ip_id (int) – unique identifier of the IP address to update
- ip_spec (struct) –
specifications of the IP Address to update
Returns: struct –
ip_update operation
Parameters¶
IP
¶parameter of
hosting.ip.info()
,hosting.ip.update()
,ip.info()
andip.update()
IPCountOptions
¶parameter of
hosting.ip.count()
andip.count()
Name Default Type Mandatory datacenter_id
int or array of int no id
of thedatacenter
where the IP is availableid int or array of int no unique identifier of the IP iface_id int or array of int no id
of theinterface
the ip is attached toip array of string or string no num int or array of int no number of IP in the interface reverse array of string or string no hostname in the PTR record of the IP Address state
string no status of the IP version
string no IP Protocol Version vm_hostname array of string or string no ~vm_hostname string no
IPListOptions
¶parameter of
hosting.ip.list()
andip.list()
Name Default Type Mandatory datacenter_id
int or array of int no id
of thedatacenter
where the IP is availableid int or array of int no unique identifier of the IP iface_id int or array of int no id
of theinterface
the ip is attached toip array of string or string no items_per_page 100 int no number of items returned for the pagination num int or array of int no number of IP in the interface page 0 int no page number for pagination offset reverse array of string or string no hostname in the PTR record of the IP Address sort_by string no used to sort returned items: datacenter_id, id, iface_id, ip, num, reverse, state, version, vm_hostname state
string no status of the IP version
string no IP Protocol Version vm_hostname array of string or string no ~vm_hostname string no
IPUpdate
¶parameter of
hosting.ip.update()
andip.update()
Name Default Type Mandatory reverse string yes hostname in the PTR record of the IP Address