Skip to main content

partitions

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

Overview​

Namepartitions
TypeResource
Idovh.dedicated_nasha.partitions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
partition_namestringthe given name of partition (wire: partitionName)
partition_capacityintegerpercentage of partition space used in % (wire: partitionCapacity)
partition_descriptionstringa brief description of the partition (wire: partitionDescription)
protocolstringmust be nfs cifs or both (CIFS, NFS, NFS_CIFS)
sizeintegerPartition size
used_by_snapshotsintegerpercentage of partition space used by snapshots, in % (wire: usedBySnapshots)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpartition_name, service_nameGet this object properties
listselectservice_namex_pagination_modeGet partition list
createinsertservice_name, partition_name, protocol, sizeCreate a new partition
updateupdatepartition_name, service_nameAlter this object properties
deletedeletepartition_name, service_nameDelete this partition

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"}})
partition_namestringthe given name of partition (wire: partitionName)
service_namestringThe internal name of your storage (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 this object properties

SELECT
partition_name,
partition_capacity,
partition_description,
protocol,
size,
used_by_snapshots
FROM ovh.dedicated_nasha.partitions
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a new partition

INSERT INTO ovh.dedicated_nasha.partitions (
partition_description,
partition_name,
protocol,
size,
service_name
)
SELECT
'{{ partition_description }}',
'{{ partition_name }}' /* required */,
'{{ protocol }}' /* required */,
{{ size }} /* required */,
'{{ service_name }}'
RETURNING
task_id,
partition_name,
storage_name,
details,
done_date,
last_update,
operation,
status,
todo_date
;

UPDATE examples​

Alter this object properties

UPDATE ovh.dedicated_nasha.partitions
SET
partition_description = '{{ partition_description }}',
size = {{ size }}
WHERE
partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete this partition

DELETE FROM ovh.dedicated_nasha.partitions
WHERE partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required
;