servers
Creates, updates, deletes, gets or lists a servers resource.
Overview​
| Name | servers |
| Type | Resource |
| Id | ovh.dedicated_server.servers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | dedicated server name |
boot_id | integer | (wire: bootId) |
server_id | integer | your server id (wire: serverId) |
availability_zone | string | dedicated AZ localisation (wire: availabilityZone) |
boot_script | string | Ipxe script served on boot (wire: bootScript) |
commercial_range | string | dedicater server commercial range (wire: commercialRange) |
datacenter | string | dedicated datacenter localisation (bhs1, bhs2, bhs3, bhs4, bhs5, bhs6, bhs7, bhs8, cch01, crx1, crx2, dc1, eri1, eri2, frcrx41, frcrx42, frcrx43, gra04, gra1, gra2, gra3, gsw, hdf01, hil1, ieb01, itbsi01, itmil01, itzvf01, lil1-int1, lim1, lim2, lim3, mr901, p19, rbx, rbx-hz, rbx1, rbx10, rbx2, rbx3, rbx4, rbx5, rbx6, rbx7, rbx8, rbx9, sbg1, sbg2, sbg3, sbg4, sbg5, sgp02, sgp1, syd03, syd1, syd2, vin1, waw1, ynm1, yyz01) |
efi_bootloader_path | string | EfiBootloader path (wire: efiBootloaderPath) |
iam | object | IAM resource metadata |
ip | string (ipv4) | dedicated server ip (example: 192.0.2.0) |
link_speed | integer | (wire: linkSpeed) |
monitoring | boolean | Icmp monitoring state |
new_upgrade_system | boolean | (wire: newUpgradeSystem) |
no_intervention | boolean | Prevent datacenter intervention (wire: noIntervention) |
os | string | Operating system |
power_state | string | Power state of the server (poweroff, poweron) (wire: powerState) |
professional_use | boolean | Does this server have professional use option (wire: professionalUse) |
rack | string | |
region | string | dedicated region localisation |
rescue_mail | string | Custom email used to receive rescue credentials (wire: rescueMail) |
rescue_ssh_key | string | Public SSH Key used in the rescue mode (wire: rescueSshKey) |
reverse | string | dedicated server reverse |
root_device | string | (wire: rootDevice) |
state | string | All states a Dedicated can in (error, hacked, hackedBlocked, ok) |
support_level | string | Dedicated server support level (critical, fastpath, gs, pro) (wire: supportLevel) |
Server informations
| Name | Datatype | Description |
|---|---|---|
name | string | dedicated server name |
boot_id | integer | (wire: bootId) |
server_id | integer | your server id (wire: serverId) |
availability_zone | string | dedicated AZ localisation (wire: availabilityZone) |
boot_script | string | Ipxe script served on boot (wire: bootScript) |
commercial_range | string | dedicater server commercial range (wire: commercialRange) |
datacenter | string | dedicated datacenter localisation (bhs1, bhs2, bhs3, bhs4, bhs5, bhs6, bhs7, bhs8, cch01, crx1, crx2, dc1, eri1, eri2, frcrx41, frcrx42, frcrx43, gra04, gra1, gra2, gra3, gsw, hdf01, hil1, ieb01, itbsi01, itmil01, itzvf01, lil1-int1, lim1, lim2, lim3, mr901, p19, rbx, rbx-hz, rbx1, rbx10, rbx2, rbx3, rbx4, rbx5, rbx6, rbx7, rbx8, rbx9, sbg1, sbg2, sbg3, sbg4, sbg5, sgp02, sgp1, syd03, syd1, syd2, vin1, waw1, ynm1, yyz01) |
efi_bootloader_path | string | EfiBootloader path (wire: efiBootloaderPath) |
iam | object | IAM resource metadata |
ip | string (ipv4) | dedicated server ip (example: 192.0.2.0) |
link_speed | integer | (wire: linkSpeed) |
monitoring | boolean | Icmp monitoring state |
new_upgrade_system | boolean | (wire: newUpgradeSystem) |
no_intervention | boolean | Prevent datacenter intervention (wire: noIntervention) |
os | string | Operating system |
power_state | string | Power state of the server (poweroff, poweron) (wire: powerState) |
professional_use | boolean | Does this server have professional use option (wire: professionalUse) |
rack | string | |
region | string | dedicated region localisation |
rescue_mail | string | Custom email used to receive rescue credentials (wire: rescueMail) |
rescue_ssh_key | string | Public SSH Key used in the rescue mode (wire: rescueSshKey) |
reverse | string | dedicated server reverse |
root_device | string | (wire: rootDevice) |
state | string | All states a Dedicated can in (error, hacked, hackedBlocked, ok) |
support_level | string | Dedicated server support level (critical, fastpath, gs, pro) (wire: supportLevel) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Get a server. Returns the properties of the server, such as its datacenter, IP address, operating system, power state, and boot and rescue settings. The response also contains the IAM metadata of the server. | |
list | select | iam_tags, x_pagination_mode | List servers. Returns the names of the dedicated servers the account can access. Each name is the serviceName used by the other calls on a server. | |
update | update | service_name | Update a server. Updates the writable properties of the server, such as its boot, rescue, monitoring and datacenter intervention settings. The other properties are read-only. | |
authentication_secret | exec | serviceName | Get access credentials. Returns the credentials to connect to the server or to an application installed on it, such as SSH, RDP, SQL Server or a web control panel. Each entry gives the access type, URL, login and password. | |
change_contact | exec | serviceName | Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service. | |
confirm_termination | exec | serviceName, token | Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given. | |
ip_block_merge | exec | serviceName, block | Merge a split IP block. Merges a split IP block and routes it to the server. This operation cannot be undone. Returns the task that performs the merge. | |
ip_move | exec | serviceName, ip | Move a failover IP to the server. Moves the given failover IP block to the server. Returns the task that performs the move. | |
license_windows | exec | serviceName, licenseId, version | Add an existing Windows license. Attaches an existing Windows license serial number to the server, for the given license version. The license can then be managed under /license/windows. Returns a task. | |
ola_aggregation | exec | serviceName, name, virtualNetworkInterfaces | Aggregate network interfaces. Groups virtual network interfaces into one link aggregation, under the given name. Returns a task. (Beta version) | |
ola_reset | exec | serviceName, virtualNetworkInterface | Reset a network interface. Resets a virtual network interface to its default configuration. Returns a task. (Beta version) | |
reboot | exec | serviceName | Reboot the server. Performs a hard reboot of the server: the power is cycled without a clean shutdown of the operating system. Returns the reboot task, with its status and completion date. | |
reinstall | exec | serviceName, operatingSystem | Installs an operating system on the server and returns the installation task. operatingSystem must be one of the names returned by GET /dedicated/server/{serviceName}/install/compatibleTemplates. By default, all disks of the disk group are erased. | |
support_replace_cooling | exec | serviceName, comment, details | Request a cooling module replacement. Opens a support request to replace a cooling module of the server, with a comment and technical details or logs. Returns the identifiers of the created support ticket and message. (Beta version) | |
support_replace_hard_disk_drive | exec | serviceName, comment, disks, inverse | Request a disk replacement. Opens a support request to replace disks of the server, identified by serial number or slot. With inverse set to true, the listed disks are kept and all the other disks are replaced. Returns the identifiers of the created support ticket and message. (Beta version) | |
support_replace_memory | exec | serviceName, comment, details | Request a memory module replacement. Opens a support request to replace a faulty RAM module of the server, with a comment and technical details or logs. The faulty slots can be listed if known. Returns the identifiers of the created support ticket and message. (Beta version) | |
terminate | exec | serviceName | Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call. |
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"}}) |
serviceName | string | The internal name of your dedicated server |
service_name | string | The internal name of your dedicated server (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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 server. Returns the properties of the server, such as its datacenter, IP address, operating system, power state, and boot and rescue settings. The response also contains the IAM metadata of the server.
SELECT
name,
boot_id,
server_id,
availability_zone,
boot_script,
commercial_range,
datacenter,
efi_bootloader_path,
iam,
ip,
link_speed,
monitoring,
new_upgrade_system,
no_intervention,
os,
power_state,
professional_use,
rack,
region,
rescue_mail,
rescue_ssh_key,
reverse,
root_device,
state,
support_level
FROM ovh.dedicated_server.servers
WHERE service_name = '{{ service_name }}' -- required
;
List servers. Returns the names of the dedicated servers the account can access. Each name is the serviceName used by the other calls on a server.
SELECT
name,
boot_id,
server_id,
availability_zone,
boot_script,
commercial_range,
datacenter,
efi_bootloader_path,
iam,
ip,
link_speed,
monitoring,
new_upgrade_system,
no_intervention,
os,
power_state,
professional_use,
rack,
region,
rescue_mail,
rescue_ssh_key,
reverse,
root_device,
state,
support_level
FROM ovh.dedicated_server.servers
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
Update a server. Updates the writable properties of the server, such as its boot, rescue, monitoring and datacenter intervention settings. The other properties are read-only.
UPDATE ovh.dedicated_server.servers
SET
boot_id = {{ boot_id }},
boot_script = '{{ boot_script }}',
efi_bootloader_path = '{{ efi_bootloader_path }}',
monitoring = {{ monitoring }},
no_intervention = {{ no_intervention }},
rescue_mail = '{{ rescue_mail }}',
rescue_ssh_key = '{{ rescue_ssh_key }}',
root_device = '{{ root_device }}',
state = '{{ state }}'
WHERE
service_name = '{{ service_name }}' --required;
Lifecycle Methods​
EXEC variables use wire (API) names.
- authentication_secret
- change_contact
- confirm_termination
- ip_block_merge
- ip_move
- license_windows
- ola_aggregation
- ola_reset
- reboot
- reinstall
- support_replace_cooling
- support_replace_hard_disk_drive
- support_replace_memory
- terminate
Get access credentials. Returns the credentials to connect to the server or to an application installed on it, such as SSH, RDP, SQL Server or a web control panel. Each entry gives the access type, URL, login and password.
EXEC ovh.dedicated_server.servers.authentication_secret
@serviceName='{{ serviceName }}' --required
;
Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
EXEC ovh.dedicated_server.servers.change_contact
@serviceName='{{ serviceName }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;
Confirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.
EXEC ovh.dedicated_server.servers.confirm_termination
@serviceName='{{ serviceName }}' --required
@@json=
'{
"commentary": "{{ commentary }}",
"futureUse": "{{ futureUse }}",
"reason": "{{ reason }}",
"token": "{{ token }}"
}'
;
Merge a split IP block. Merges a split IP block and routes it to the server. This operation cannot be undone. Returns the task that performs the merge.
EXEC ovh.dedicated_server.servers.ip_block_merge
@serviceName='{{ serviceName }}' --required
@@json=
'{
"block": "{{ block }}"
}'
;
Move a failover IP to the server. Moves the given failover IP block to the server. Returns the task that performs the move.
EXEC ovh.dedicated_server.servers.ip_move
@serviceName='{{ serviceName }}' --required
@@json=
'{
"ip": "{{ ip }}"
}'
;
Add an existing Windows license. Attaches an existing Windows license serial number to the server, for the given license version. The license can then be managed under /license/windows. Returns a task.
EXEC ovh.dedicated_server.servers.license_windows
@serviceName='{{ serviceName }}' --required
@@json=
'{
"licenseId": "{{ licenseId }}",
"version": "{{ version }}"
}'
;
Aggregate network interfaces. Groups virtual network interfaces into one link aggregation, under the given name. Returns a task. (Beta version)
EXEC ovh.dedicated_server.servers.ola_aggregation
@serviceName='{{ serviceName }}' --required
@@json=
'{
"name": "{{ name }}",
"virtualNetworkInterfaces": "{{ virtualNetworkInterfaces }}"
}'
;
Reset a network interface. Resets a virtual network interface to its default configuration. Returns a task. (Beta version)
EXEC ovh.dedicated_server.servers.ola_reset
@serviceName='{{ serviceName }}' --required
@@json=
'{
"virtualNetworkInterface": "{{ virtualNetworkInterface }}"
}'
;
Reboot the server. Performs a hard reboot of the server: the power is cycled without a clean shutdown of the operating system. Returns the reboot task, with its status and completion date.
EXEC ovh.dedicated_server.servers.reboot
@serviceName='{{ serviceName }}' --required
;
Installs an operating system on the server and returns the installation task. operatingSystem must be one of the names returned by GET /dedicated/server/{serviceName}/install/compatibleTemplates. By default, all disks of the disk group are erased.
EXEC ovh.dedicated_server.servers.reinstall
@serviceName='{{ serviceName }}' --required
@@json=
'{
"customizations": "{{ customizations }}",
"operatingSystem": "{{ operatingSystem }}",
"properties": "{{ properties }}",
"storage": "{{ storage }}"
}'
;
Request a cooling module replacement. Opens a support request to replace a cooling module of the server, with a comment and technical details or logs. Returns the identifiers of the created support ticket and message. (Beta version)
EXEC ovh.dedicated_server.servers.support_replace_cooling
@serviceName='{{ serviceName }}' --required
@@json=
'{
"comment": "{{ comment }}",
"details": "{{ details }}"
}'
;
Request a disk replacement. Opens a support request to replace disks of the server, identified by serial number or slot. With inverse set to true, the listed disks are kept and all the other disks are replaced. Returns the identifiers of the created support ticket and message. (Beta version)
EXEC ovh.dedicated_server.servers.support_replace_hard_disk_drive
@serviceName='{{ serviceName }}' --required
@@json=
'{
"comment": "{{ comment }}",
"disks": "{{ disks }}",
"inverse": {{ inverse }}
}'
;
Request a memory module replacement. Opens a support request to replace a faulty RAM module of the server, with a comment and technical details or logs. The faulty slots can be listed if known. Returns the identifiers of the created support ticket and message. (Beta version)
EXEC ovh.dedicated_server.servers.support_replace_memory
@serviceName='{{ serviceName }}' --required
@@json=
'{
"comment": "{{ comment }}",
"details": "{{ details }}",
"slots": "{{ slots }}"
}'
;
Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call.
EXEC ovh.dedicated_server.servers.terminate
@serviceName='{{ serviceName }}' --required
;