routings
Creates, updates, deletes, gets or lists a routings resource.
Overview​
| Name | routings |
| Type | Resource |
| Id | ovh.notification.routings |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the routing |
name | string | Name of the routing |
active | boolean | Whether this routing is currently active |
created_at | string (date-time) | Date at which the routing was created (wire: createdAt) |
rules | array | Type of the contact mean |
A routing
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the routing |
name | string | Name of the routing |
active | boolean | Whether this routing is currently active |
created_at | string (date-time) | Date at which the routing was created (wire: createdAt) |
rules | array | Type of the contact mean |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | routing_id | Retrieve information about a routing | |
list | select | x_pagination_cursor, x_pagination_size | Retrieve every routing | |
create | insert | active, name, rules | Create a routing | |
update | update | routing_id | Update a routing | |
delete | delete | routing_id | Delete the routing |
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"}}) |
routing_id | string (uuid) | Routing ID (wire: routingId) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Retrieve information about a routing
SELECT
id,
name,
active,
created_at,
rules
FROM ovh.notification.routings
WHERE routing_id = '{{ routing_id }}' -- required
;
Retrieve every routing
SELECT
id,
name,
active,
created_at,
rules
FROM ovh.notification.routings
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
Create a routing
INSERT INTO ovh.notification.routings (
active,
name,
rules
)
SELECT
{{ active }} /* required */,
'{{ name }}' /* required */,
'{{ rules }}' /* required */
RETURNING
id,
name,
active,
created_at,
rules
;
# Description fields are for documentation purposes
- name: routings
props:
- name: active
value: {{ active }}
description: |
Whether this routing is currently active
- name: name
value: "{{ name }}"
description: |
Name of the routing
- name: rules
description: |
Type of the contact mean
value:
- condition:
category:
- "{{ category }}"
priority:
- "{{ priority }}"
contactMeans: "{{ contactMeans }}"
continue: {{ continue }}
UPDATE examples​
- update
Update a routing
UPDATE ovh.notification.routings
SET
active = {{ active }},
name = '{{ name }}',
rules = '{{ rules }}'
WHERE
routing_id = '{{ routing_id }}' --required
RETURNING
id,
name,
active,
created_at,
rules;
DELETE examples​
- delete
Delete the routing
DELETE FROM ovh.notification.routings
WHERE routing_id = '{{ routing_id }}' --required
;