Network Interface API Reference¶
Changed in version 3.2.2: The following methods are not available anymore : hosting.iface.ip_attach, hosting.iface.ip_detach
Methods¶
-
hosting.iface.
count
(apikey[, opts=nil])¶ Count network interfaces.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: int – number of network interfaces
-
hosting.iface.
create
(apikey, iface_spec)¶ - Create a network interface using attributes specified by iface_spec.
Parameters: - apikey (string) – API connection key
- iface_spec (struct) –
specifications of the network interface to create
Returns: struct –
iface_create operation
-
hosting.iface.
delete
(apikey, iface_id)¶ Delete a network interface.
Parameters: - apikey (string) – API connection key
- iface_id (int) – unique identifier of the network interface to delete
Returns: struct –
iface_delete operation
-
hosting.iface.
info
(apikey, iface_id)¶ Get information about a network interface.
Parameters: - apikey (string) – API connection key
- iface_id (int) – network interface unique identifier
Returns: struct –
network interface information
-
hosting.iface.
list
(apikey[, opts=nil])¶ List network interfaces.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: list of struct –
list of network interfaces descriptions
-
hosting.iface.
migrate
(apikey, iface_id, target_dc)¶ - Migrate an iface between datacenters.
Parameters: - apikey (string) – API connection key
- iface_id (int) – Iface unique identifier
- target_dc (int) – datacenter unique identifier
Returns: struct –
hosting_migration_iface operation
-
hosting.iface.
update
(apikey, iface_id, iface_spec)¶ - Updates a network interface using attributes specified by iface_spec.
Parameters: - apikey (string) – API connection key
- iface_id (int) – network interface unique identifier
- iface_spec (struct) –
specifications of the iface to update
Returns: struct –
iface_update operation
-
hosting.vlan.
count
(apikey[, opts=nil])¶ Count private VLAN handled by this account.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: int – number of private VLAN
-
hosting.vlan.
create
(apikey, params)¶ Create a private VLAN using attributes specified by params.
The private VLAN name is uniq.
Parameters: - apikey (string) – API connection key
- params (struct) –
specifications of the private VLAN to create
Returns: struct –
vlan_create operation
-
hosting.vlan.
delete
(apikey, vlan)¶ Delete a private VLAN if nothing is associated.
Parameters: - apikey (string) – API connection key
- vlan (int) – private VLAN unique identifier
Returns: struct –
vlan_delete operation
-
hosting.vlan.
info
(apikey, vlan)¶ Get information about a private VLAN.
Parameters: - apikey (string) – API connection key
- vlan (int) – private VLAN unique identifier
Returns: struct –
private VLAN information
-
hosting.vlan.
list
(apikey[, opts=nil])¶ List private VLAN handled by this account.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: struct –
list of private VLAN
-
hosting.vlan.
update
(apikey, vlan, params)¶ Update a private VLAN name.
/!the return changed from the vlan to an update operation.
Parameters: - apikey (string) – API connection key
- vlan (int) – private VLAN unique identifier
- params (struct) –
specifications of the private VLAN to update
Returns: struct –
vlan_update operation
Parameters¶
Enum
¶List of elements that should be documented.
IfaceCountOptions
¶parameter of
hosting.iface.count()
andiface.count()
Name Default Type Mandatory datacenter_id
int or array of int no id
of thedatacenter
id int or array of int no id
of theinterface
ip.address array of string or string no IP Address ip.reverse array of string or string no PTR record of the address state
string no type
string no vlan string no name
of thevlan
vlan_id int or array of int no id
of thevlan
vm_id int or array of int no id
of thevm
~vlan string no match the name
of thevlan
IfaceDescription
¶parameter of
hosting.iface.create()
andiface.create()
Changed in version 3.3.24: key
ip
has been added.
ip
parameter.Changed in version 3.2.0: key
vlan
has been added.
vlan
parameter.Changed in version 3.2.0: key
ip_version
has changed.
ip_version
optional parameter.
Name Default Type Mandatory datacenter_id
int yes id
of thedatacenter
bandwidth double no network bandwidth in bit/s ip string no private vlan ip ip_version
string no IP version vlan int no private vlan if specified
IfaceListOptions
¶parameter of
hosting.iface.list()
andiface.list()
Name Default Type Mandatory datacenter_id
int or array of int no id
of thedatacenter
id int or array of int no id
of theinterface
ip.address array of string or string no IP Address ip.reverse array of string or string no PTR record of the address items_per_page 100 int no number of items returned for the pagination page 0 int no page number for pagination offset sort_by string no used to sort returned items: datacenter_id, id, ip.address, ip.reverse, state, type, vlan, vlan_id, vm_id state
string no type
string no vlan string no name
of thevlan
vlan_id int or array of int no id
of thevlan
vm_id int or array of int no id
of thevm
~vlan string no match the name
of thevlan
IfaceState
¶used by
IfaceCountOptions
,IfaceListOptions
andIfaceReturn
Name Description used Interface is currently attached to a vm free Interface is not attached to a vm being_migrated Interface is being migrated to another datacenter
IfaceType
¶used by
IfaceCountOptions
,IfaceListOptions
andIfaceReturn
Name Description public public iface private private iface
IfaceUpdate
¶parameter of
hosting.iface.update()
andiface.update()
Changed in version 3.3.24: key
ip
has been added.
ip
parameter.Changed in version 3.3.24: key
bandwidth
has changed.
bandwidth
optional parameter.
Name Default Type Mandatory bandwidth double no network bandwidth to apply in bit/s ip string no private vlan ip
IPState
¶used by
IPCountOptions
,IPListOptions
andIPReturn
Name Description being_created The IP address is not allocated yet created the IP is allocated recyclable The IP has been deleted, and is still allocated to this account releasing The IP is no longer allocated to this account
PrivateVlanCreate
¶parameter of
hosting.vlan.create()
Changed in version 3.3.24: keys
subnet
,gateway
have been added.
.
.
Name Default Type Mandatory datacenter_id
int yes id
of thedatacenter
of the instancename string yes name of the private VLAN gateway string no private network gateway subnet string no private network subnet
PrivateVlanListOptions
¶parameter of
hosting.vlan.count()
andhosting.vlan.list()
Name Default Type Mandatory datacenter_id
int or array of int no id int or array of int no items_per_page 100 int no number of items returned for the pagination name string no page 0 int no page number for pagination offset sort_by string no used to sort returned items: datacenter_id, id, name ~name string no
PrivateVlanUpdate
¶parameter of
hosting.vlan.update()
Changed in version 3.3.24: key
gateway
has been added.
.
Name Default Type Mandatory gateway string no private network gateway name string no name of the private VLAN
Returns¶
IfaceReturn
¶returned by
hosting.iface.info()
,hosting.iface.list()
,iface.info()
andiface.list()
used by
VMReturn
Name Type bandwidth double Network bandwidth in bit/s datacenter_id int id
of thedatecenter
where the interface is available.date_created dateTime.iso8601 date_updated dateTime.iso8601 entity_id string id int Network Interface unique identifier ips
array of struct only returned with method hosting.iface.info()
andiface.info()
ips_id struct id
of theIP
attached with this interface.num int state
string type
string vlan
struct private vlan
where the iface exists ornil
for public interface.vm_id int id
of thevm
attached with this interface.
IPReturn
¶returned by
hosting.ip.info()
,hosting.ip.list()
,ip.info()
andip.list()
used by
IfaceReturn
Changed in version 3.3.36: key
key:
has been added.
key:
vm_id, type, bandwidth and iface_num.
Name Type bandwidth double bandwidth of the interface datacenter_id int id
of thedatecenter
where the IP is available.date_created dateTime.iso8601 date_updated dateTime.iso8601 entity_id string id int unique identifier of the ip iface_id int id
of the associatedinterface
iface_num int position of the interface ip string num int position of the address in its interface interface
reverse string hostname in the PTR record of the IP Address state
string type string public or private version
string 4 or 6 vm_id int id
of thevm
attached with this interface.
PrivateVlanReturn
¶returned by
hosting.vlan.info()
andhosting.vlan.list()
used by
IfaceReturn
Name Type datacenter
struct private VLAN datacenter
only returned with method hosting.vlan.info()
datacenter_id int id
of thedatacenter
where the private VLAN is availableonly returned with method hosting.vlan.list()
entity_id string gateway string only returned with method hosting.vlan.info()
andhosting.vlan.list()
id int private VLAN unique identifier name string private VLAN name state string private VLAN administrative state only returned with method hosting.vlan.info()
andhosting.vlan.list()
subnet string only returned with method hosting.vlan.info()
andhosting.vlan.list()
uuid int private VLAN uuid only returned with method hosting.vlan.info()
andhosting.vlan.list()
OperationReturn
¶returned by
account.credit()
,domain.contacts.set()
,domain.mailbox.purge()
,domain.mailbox.responder.activate()
,domain.mailbox.responder.deactivate()
,domain.packmail.autorenew()
,domain.packmail.create()
,domain.packmail.delete()
,domain.packmail.renew()
,domain.packmail.update()
,domain.reseller.set()
,domain.transferout.proceed()
,hosting.account.credit()
,hosting.rproxy.create()
,hosting.rproxy.delete()
,hosting.rproxy.probe.disable()
,hosting.rproxy.probe.enable()
,hosting.rproxy.probe.update()
,hosting.rproxy.server.create()
,hosting.rproxy.server.delete()
,hosting.rproxy.server.disable()
,hosting.rproxy.server.enable()
,hosting.rproxy.update()
,hosting.rproxy.vhost.alter_zone()
,hosting.rproxy.vhost.create()
,hosting.rproxy.vhost.delete()
,hosting.vlan.create()
,hosting.vlan.delete()
,hosting.vlan.update()
,notification.subscription.create()
,notification.subscription.delete()
andoperation.info()
Name Type date_created dateTime.iso8601 date_start dateTime.iso8601 date_updated dateTime.iso8601 errortype
struct classification of the error cause if the operation is in error (possible values for errortype defined behind) eta int estimated time of processing the operation id int infos
array of struct last_error string last error of the operation last_support_error string last “support” error of the operation (that should be handled manually by the support team) params struct session_id int session number for the operation source string contact who create the operation step
string current step of the operation type
string Possible Errors
Error identifier Type authorization_error support_recoverable An authorization error happened duplicate fatal The wanted object is duplicate missing_parameter client_recoverable There is a missing parameter ratelimit temporary The query was ratelimited timeout temporary The query timeout unknown unknown Unknown