reverses
Creates, updates, deletes, gets or lists a reverses resource.
Overview​
| Name | reverses |
| Type | Resource |
| Id | ovh.ip.reverses |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
ip_reverse | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipReverse) |
reverse | string |
Your reverse records on IP
| Name | Datatype | Description |
|---|---|---|
ip_reverse | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipReverse) |
reverse | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip, ip_reverse | Get a reverse. Returns the reverse DNS (PTR) name set on this address of the block, with the address itself. | |
list | select | ip | x_pagination_mode | List reverses. Returns the addresses of the block that have a reverse DNS (PTR) record, not the reverse names themselves. |
create | insert | ip, ip_reverse, reverse | Create a reverse. Sets the reverse DNS name of one address of the block. The name must resolve to that address. | |
delete | delete | ip, ip_reverse | Delete 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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 | string (ip-block) | |
ip_reverse | string (ipv4) | (wire: ipReverse) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List reverses. Returns the addresses of the block that have a reverse DNS (PTR) record, not the reverse names themselves.
SELECT
ip_reverse,
reverse
FROM ovh.ip.reverses
WHERE ip = '{{ ip }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: reverses
props:
- name: ip
value: "{{ ip }}"
description: Required parameter for the reverses resource.
- name: ip_reverse
value: "{{ ip_reverse }}"
description: |
IP address (e.g., 192.0.2.0)
- name: reverse
value: "{{ reverse }}"
DELETE examples​
- delete
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
;