Skip to main content

vps_additional_disks

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

Overview​

Namevps_additional_disks
TypeResource
Idovh.order.vps_additional_disks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
order_idintegerIdentifier of the order (wire: orderId)
contractsarrayList of contracts related to the order
detailsarrayDetails of the order
pricesobjectPrices of the order including with and without taxes
urlstringURL to download the order

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectadditional_disk_size, duration, service_nameGet prices and contracts information
listselectadditional_disk_size, service_namex_pagination_modeGet allowed durations for 'additionalDisk' option
createinsertduration, service_name, additional_disk_sizeCreate order

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
additional_disk_sizestringSize of the additional disk (wire: additionalDiskSize)
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"}})
durationstringDuration
service_namestringThe internal name of your VPS offer (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 prices and contracts information

SELECT
order_id,
contracts,
details,
prices,
url
FROM ovh.order.vps_additional_disks
WHERE additional_disk_size = '{{ additional_disk_size }}' -- required
AND duration = '{{ duration }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create order

INSERT INTO ovh.order.vps_additional_disks (
additional_disk_size,
duration,
service_name
)
SELECT
'{{ additional_disk_size }}' /* required */,
'{{ duration }}',
'{{ service_name }}'
RETURNING
order_id,
contracts,
details,
prices,
url
;