Skip to main content

ips

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

Overview​

Nameips
TypeResource
Idovh.vrack.ips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
gatewaystring (ip-block)Your gateway (example: 192.0.2.0/24)
ipstring (ip-block)Your IP block (example: 192.0.2.0/24)
public_routing_typestringMode in which gateway is configured (wire: publicRoutingType)
regionstringWhere you want your block announced on the network

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, service_nameGet a block. Returns the Additional IPv4 block, its gateway, its region and its public routing type.
listselectservice_namex_pagination_modeList blocks. Returns the Additional IPv4 blocks routed in the vRack.
createinsertservice_name, blockAttach a block. Routes an Additional IPv4 block in the vRack, in the given region. Returns the task that performs it.
deletedeleteip, service_nameDetach a block. Removes the Additional IPv4 block from the vRack. Returns the task that performs it.

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)Your IP block
service_namestringThe internal name of your vrack (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​

Get a block. Returns the Additional IPv4 block, its gateway, its region and its public routing type.

SELECT
gateway,
ip,
public_routing_type,
region
FROM ovh.vrack.ips
WHERE ip = '{{ ip }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Attach a block. Routes an Additional IPv4 block in the vRack, in the given region. Returns the task that performs it.

INSERT INTO ovh.vrack.ips (
block,
region,
service_name
)
SELECT
'{{ block }}' /* required */,
'{{ region }}',
'{{ service_name }}'
RETURNING
id,
order_id,
service_name,
function,
last_update,
status,
target_domain,
todo_date
;

DELETE examples​

Detach a block. Removes the Additional IPv4 block from the vRack. Returns the task that performs it.

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