ips
Creates, updates, deletes, gets or lists an ips resource.
Overview​
| Name | ips |
| Type | Resource |
| Id | ovh.vps.ips |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
gateway | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) |
geolocation | string | Geolocation 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_address | string (ipv4) | The effective ip address of the Ip object (example: 192.0.2.0) (wire: ipAddress) |
mac_address | string | (wire: macAddress) |
reverse | string | |
type | string | Ip types on a VPS (additional, primary) |
version | string | Ip versions (v4, v6) |
Information about an IP address for a VPS Virtual Machine
| Name | Datatype | Description |
|---|---|---|
gateway | string (ipv4) | IP address (e.g., 192.0.2.0) (example: 192.0.2.0) |
geolocation | string | Geolocation 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_address | string (ipv4) | The effective ip address of the Ip object (example: 192.0.2.0) (wire: ipAddress) |
mac_address | string | (wire: macAddress) |
reverse | string | |
type | string | Ip types on a VPS (additional, primary) |
version | string | Ip versions (v4, v6) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip_address, service_name | Returns the IP address, its type and version, reverse DNS, geolocation, gateway and MAC address. | |
list | select | service_name | x_pagination_mode | Returns the IP addresses attached to the VPS. |
update | update | ip_address, service_name | Updates the reverse DNS of an IP of the VPS. | |
delete | delete | ip_address, service_name | Releases 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.
| 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_address | string (ipv4) | Ip address (wire: ipAddress) |
service_name | string | Service name (wire: serviceName) |
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
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
;
Returns the IP addresses attached to the VPS.
SELECT
gateway,
geolocation,
ip_address,
mac_address,
reverse,
type,
version
FROM ovh.vps.ips
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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​
- delete
Releases an additional IP from the VPS.
DELETE FROM ovh.vps.ips
WHERE ip_address = '{{ ip_address }}' --required
AND service_name = '{{ service_name }}' --required
;