Skip to main content

ips

Creates, updates, deletes, gets or lists an ips resource.

Overview​

Nameips
TypeResource
Idovh.vps.ips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
gatewaystring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0)
geolocationstringGeolocation of the IP Address (at, au, be, ca, ch, cz, de, es, fi, fr, gb, ie, in, it, lt, nl, pl, pt, sg, uk, us)
ip_addressstring (ipv4)The effective ip address of the Ip object (example: 192.0.2.0) (wire: ipAddress)
mac_addressstring (wire: macAddress)
reversestring
typestringIp types on a VPS (additional, primary)
versionstringIp versions (v4, v6)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip_address, service_nameReturns the IP address, its type and version, reverse DNS, geolocation, gateway and MAC address.
listselectservice_namex_pagination_modeReturns the IP addresses attached to the VPS.
updateupdateip_address, service_nameUpdates the reverse DNS of an IP of the VPS.
deletedeleteip_address, service_nameReleases an additional IP from the VPS.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
ip_addressstring (ipv4)Ip address (wire: ipAddress)
service_namestringService name (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the IP address, its type and version, reverse DNS, geolocation, gateway and MAC address.

SELECT
gateway,
geolocation,
ip_address,
mac_address,
reverse,
type,
version
FROM ovh.vps.ips
WHERE ip_address = '{{ ip_address }}' -- required
AND service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Updates the reverse DNS of an IP of the VPS.

UPDATE ovh.vps.ips
SET
reverse = '{{ reverse }}'
WHERE
ip_address = '{{ ip_address }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Releases an additional IP from the VPS.

DELETE FROM ovh.vps.ips
WHERE ip_address = '{{ ip_address }}' --required
AND service_name = '{{ service_name }}' --required
;