partitions
Creates, updates, deletes, gets or lists a partitions resource.
Overview​
| Name | partitions |
| Type | Resource |
| Id | ovh.dedicated_nasha.partitions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
partition_name | string | the given name of partition (wire: partitionName) |
partition_capacity | integer | percentage of partition space used in % (wire: partitionCapacity) |
partition_description | string | a brief description of the partition (wire: partitionDescription) |
protocol | string | must be nfs cifs or both (CIFS, NFS, NFS_CIFS) |
size | integer | Partition size |
used_by_snapshots | integer | percentage of partition space used by snapshots, in % (wire: usedBySnapshots) |
Storage zpool partition
| Name | Datatype | Description |
|---|---|---|
partition_name | string | the given name of partition (wire: partitionName) |
partition_capacity | integer | percentage of partition space used in % (wire: partitionCapacity) |
partition_description | string | a brief description of the partition (wire: partitionDescription) |
protocol | string | must be nfs cifs or both (CIFS, NFS, NFS_CIFS) |
size | integer | Partition size |
used_by_snapshots | integer | percentage of partition space used by snapshots, in % (wire: usedBySnapshots) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | partition_name, service_name | Get this object properties | |
list | select | service_name | x_pagination_mode | Get partition list |
create | insert | service_name, partition_name, protocol, size | Create a new partition | |
update | update | partition_name, service_name | Alter this object properties | |
delete | delete | partition_name, service_name | Delete 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.
| 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"}}) |
partition_name | string | the given name of partition (wire: partitionName) |
service_name | string | The internal name of your storage (wire: serviceName) |
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 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
;
Get partition list
SELECT
partition_name,
partition_capacity,
partition_description,
protocol,
size,
used_by_snapshots
FROM ovh.dedicated_nasha.partitions
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: partitions
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the partitions resource.
- name: partition_description
value: "{{ partition_description }}"
description: |
Partition description
- name: partition_name
value: "{{ partition_name }}"
description: |
Partition name
- name: protocol
value: "{{ protocol }}"
description: |
NFS|CIFS|NFS_CIFS
valid_values: ['CIFS', 'NFS', 'NFS_CIFS']
- name: size
value: {{ size }}
description: |
Partition size
UPDATE examples​
- update
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
Delete this partition
DELETE FROM ovh.dedicated_nasha.partitions
WHERE partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required
;