Skip to main content

public_routing_priorities

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

Overview​

Namepublic_routing_priorities
TypeResource
Idovh.vrack.public_routing_priorities

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
priority_idstring (uuid)Public routing priority identifier (wire: priorityId)
availability_zonesarrayPriority definition per availability zone (wire: availabilityZones)
regionstringName of the region where public routing priority is defined
typestringPublic routing priority type (custom, default)
vrackstringvrack name

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpriority_id, service_nameGet a priority. Returns the region, the type, default or custom, and the priority of each availability zone.
listselectservice_namex_pagination_modeList priorities. Returns the identifiers of the 3-AZ failover priorities of the vRack.
createinsertservice_name, availability_zones, regionCreate a priority.<br /><br />This endpoint will create a new 'custom' routing priority.<br /><br />You can create a new 'custom' routing priority if you have an additional IP block in your vRack in the same region or not.<br /><br />You do not have to create a 'custom' routing priority for RTvRack 3AZ to work. If you add an additional IP block in a 3AZ region without any routing priority and any additional IP block, a 'default' routing priority will automatically be chosen for you.<br /><br />Priorities must be set to 1, 2 or 3 for each availability zone.<br /><br />1 stands for the availability zone with highest priority, which will handle traffic by default.<br /><br />2 is the availability zone with second-highest priority, which will handle traffic as soon as priority 1 availability zone is not available.<br /><br />3 is the availability zone with lowest priority, it will handle traffic if neither the availability zone with priority 1 nor the availability zone with priority 2 are available.<br /><br />All availability zones in a 3AZ region must be set in the payload in order for the 'custom' routing priority to be created.
updateupdatepriority_id, service_nameUpdate a priority. Updates the priority of each availability zone of a custom failover priority. A default one cannot be updated: create a custom one first.
deletedeletepriority_id, service_nameDelete a priority. Deletes a custom failover priority. If Additional IP blocks remain in the region, a default priority is generated from the infrastructure usage.

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"}})
priority_idstring (uuid)Public routing priority identifier (wire: priorityId)
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 priority. Returns the region, the type, default or custom, and the priority of each availability zone.

SELECT
priority_id,
availability_zones,
region,
type,
vrack
FROM ovh.vrack.public_routing_priorities
WHERE priority_id = '{{ priority_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a priority.<br /><br />This endpoint will create a new 'custom' routing priority.<br /><br />You can create a new 'custom' routing priority if you have an additional IP block in your vRack in the same region or not.<br /><br />You do not have to create a 'custom' routing priority for RTvRack 3AZ to work. If you add an additional IP block in a 3AZ region without any routing priority and any additional IP block, a 'default' routing priority will automatically be chosen for you.<br /><br />Priorities must be set to 1, 2 or 3 for each availability zone.<br /><br />1 stands for the availability zone with highest priority, which will handle traffic by default.<br /><br />2 is the availability zone with second-highest priority, which will handle traffic as soon as priority 1 availability zone is not available.<br /><br />3 is the availability zone with lowest priority, it will handle traffic if neither the availability zone with priority 1 nor the availability zone with priority 2 are available.<br /><br />All availability zones in a 3AZ region must be set in the payload in order for the 'custom' routing priority to be created.

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

UPDATE examples​

Update a priority. Updates the priority of each availability zone of a custom failover priority. A default one cannot be updated: create a custom one first.

UPDATE ovh.vrack.public_routing_priorities
SET
availability_zones = '{{ availability_zones }}'
WHERE
priority_id = '{{ priority_id }}' --required
AND service_name = '{{ service_name }}' --required
RETURNING
id,
order_id,
service_name,
function,
last_update,
status,
target_domain,
todo_date;

DELETE examples​

Delete a priority. Deletes a custom failover priority. If Additional IP blocks remain in the region, a default priority is generated from the infrastructure usage.

DELETE FROM ovh.vrack.public_routing_priorities
WHERE priority_id = '{{ priority_id }}' --required
AND service_name = '{{ service_name }}' --required
;