Skip to main content

dedicated_servers

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

Overview​

Namededicated_servers
TypeResource
Idovh.vrack.dedicated_servers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
dedicated_serverstringDedicated Server (wire: dedicatedServer)
vrackstringvrack name

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdedicated_server, service_nameGet a server link (legacy). Returns the attached server and its vRack. This is the legacy whole-server link, not an interface link.
listselectservice_namex_pagination_modeList servers (legacy). Returns the dedicated servers attached as a whole to the vRack, in the legacy mode. Attaching by interface replaces it.
createinsertservice_name, dedicated_serverAttach a server (legacy). Attaches a whole dedicated server to the vRack, in the legacy mode. Prefer attaching one of its interfaces. Returns the task that performs it.
deletedeletededicated_server, service_nameDetach a server (legacy). Detaches a whole dedicated server from the vRack, in the legacy mode. 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"}})
dedicated_serverstringDedicated Server (wire: dedicatedServer)
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 server link (legacy). Returns the attached server and its vRack. This is the legacy whole-server link, not an interface link.

SELECT
dedicated_server,
vrack
FROM ovh.vrack.dedicated_servers
WHERE dedicated_server = '{{ dedicated_server }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Attach a server (legacy). Attaches a whole dedicated server to the vRack, in the legacy mode. Prefer attaching one of its interfaces. Returns the task that performs it.

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

DELETE examples​

Detach a server (legacy). Detaches a whole dedicated server from the vRack, in the legacy mode. Returns the task that performs it.

DELETE FROM ovh.vrack.dedicated_servers
WHERE dedicated_server = '{{ dedicated_server }}' --required
AND service_name = '{{ service_name }}' --required
;