Skip to main content

ips

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

Overview​

Nameips
TypeResource
Idovh.xdsl.ips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
dns_listarray (wire: dnsList)
ipstring (ipv4)The IP address (example: 192.0.2.0)
rangeinteger
statusstringstatus of the IP (active, close, toDelete)
versionstringIp versions (v4, v6)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, service_nameReturns an IP address or block of the access with its version, range, status and DNS servers.
listselectservice_namex_pagination_modeReturns the IP addresses of the access. Get an IP for its version, range, status and DNS servers.
createinsertservice_nameOrders an extra range of eight IPv4 addresses (/29) for the access. Returns the task that performs the change.
deletedeleteip, service_nameStops renewing the extra IPv4 option of the access.

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"}})
ipstring (ipv4)Ip
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 an IP address or block of the access with its version, range, status and DNS servers.

SELECT
dns_list,
ip,
range,
status,
version
FROM ovh.xdsl.ips
WHERE ip = '{{ ip }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Orders an extra range of eight IPv4 addresses (/29) for the access. Returns the task that performs the change.

INSERT INTO ovh.xdsl.ips (
service_name
)
SELECT
'{{ service_name }}'
RETURNING
id,
done_date,
function,
is_archived,
status,
todo_date,
update_date
;

DELETE examples​

Stops renewing the extra IPv4 option of the access.

DELETE FROM ovh.xdsl.ips
WHERE ip = '{{ ip }}' --required
AND service_name = '{{ service_name }}' --required
;