public_routing_priorities
Creates, updates, deletes, gets or lists a public_routing_priorities resource.
Overview​
| Name | public_routing_priorities |
| Type | Resource |
| Id | ovh.vrack.public_routing_priorities |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
priority_id | string (uuid) | Public routing priority identifier (wire: priorityId) |
availability_zones | array | Priority definition per availability zone (wire: availabilityZones) |
region | string | Name of the region where public routing priority is defined |
type | string | Public routing priority type (custom, default) |
vrack | string | vrack name |
Public routing priority
| Name | Datatype | Description |
|---|---|---|
priority_id | string (uuid) | Public routing priority identifier (wire: priorityId) |
availability_zones | array | Priority definition per availability zone (wire: availabilityZones) |
region | string | Name of the region where public routing priority is defined |
type | string | Public routing priority type (custom, default) |
vrack | string | vrack name |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | priority_id, service_name | Get a priority. Returns the region, the type, default or custom, and the priority of each availability zone. | |
list | select | service_name | x_pagination_mode | List priorities. Returns the identifiers of the 3-AZ failover priorities of the vRack. |
create | insert | service_name, availability_zones, region | 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. | |
update | update | priority_id, service_name | 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. | |
delete | delete | priority_id, service_name | 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. |
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"}}) |
priority_id | string (uuid) | Public routing priority identifier (wire: priorityId) |
service_name | string | The internal name of your vrack (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
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
;
List priorities. Returns the identifiers of the 3-AZ failover priorities of the vRack.
SELECT
priority_id,
availability_zones,
region,
type,
vrack
FROM ovh.vrack.public_routing_priorities
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: public_routing_priorities
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the public_routing_priorities resource.
- name: availability_zones
description: |
Priority definition, every region's availability zones MUST be listed
value:
- name: "{{ name }}"
priority: {{ priority }}
- name: region
value: "{{ region }}"
description: |
Name of the region where Public routing priority is defined
UPDATE examples​
- update
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
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
;