Skip to main content

reverses

Creates, updates, deletes, gets or lists a reverses resource.

Overview​

Namereverses
TypeResource
Idovh.ip.reverses

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
ip_reversestring (ipv4)IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipReverse)
reversestring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, ip_reverseGet a reverse. Returns the reverse DNS (PTR) name set on this address of the block, with the address itself.
listselectipx_pagination_modeList reverses. Returns the addresses of the block that have a reverse DNS (PTR) record, not the reverse names themselves.
createinsertip, ip_reverse, reverseCreate a reverse. Sets the reverse DNS name of one address of the block. The name must resolve to that address.
deletedeleteip, ip_reverseDelete a reverse. Removes the reverse DNS (PTR) name set on this address of the block. The call returns no content.

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 (ip-block)
ip_reversestring (ipv4) (wire: ipReverse)
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​

Get a reverse. Returns the reverse DNS (PTR) name set on this address of the block, with the address itself.

SELECT
ip_reverse,
reverse
FROM ovh.ip.reverses
WHERE ip = '{{ ip }}' -- required
AND ip_reverse = '{{ ip_reverse }}' -- required
;

INSERT examples​

Create a reverse. Sets the reverse DNS name of one address of the block. The name must resolve to that address.

INSERT INTO ovh.ip.reverses (
ip_reverse,
reverse,
ip
)
SELECT
'{{ ip_reverse }}' /* required */,
'{{ reverse }}' /* required */,
'{{ ip }}'
RETURNING
ip_reverse,
reverse
;

DELETE examples​

Delete a reverse. Removes the reverse DNS (PTR) name set on this address of the block. The call returns no content.

DELETE FROM ovh.ip.reverses
WHERE ip = '{{ ip }}' --required
AND ip_reverse = '{{ ip_reverse }}' --required
;