Skip to main content

partition_accesses

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

Overview​

Namepartition_accesses
TypeResource
Idovh.dedicated_nasha.partition_accesses

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
access_idintegerthe id of the access (wire: accessId)
acl_descriptionstringa brief description of the acl (wire: aclDescription)
ipstring (ip-block)the ip in root on storage (example: 192.0.2.0/24)
typestringACL type (readonly, readwrite)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, partition_name, service_nameGet this object properties
listselectpartition_name, service_namex_pagination_modeget ACL for this partition
createinsertpartition_name, service_name, ipAdd a new ACL entry
deletedeleteip, partition_name, service_nameDelete an ACL entry

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"}})
ipstring (ip-block)the ip in root on storage
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
access_id,
acl_description,
ip,
type
FROM ovh.dedicated_nasha.partition_accesses
WHERE ip = '{{ ip }}' -- required
AND partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Add a new ACL entry

INSERT INTO ovh.dedicated_nasha.partition_accesses (
acl_description,
ip,
type,
partition_name,
service_name
)
SELECT
'{{ acl_description }}',
'{{ ip }}' /* required */,
'{{ type }}',
'{{ partition_name }}',
'{{ service_name }}'
RETURNING
task_id,
partition_name,
storage_name,
details,
done_date,
last_update,
operation,
status,
todo_date
;

DELETE examples​

Delete an ACL entry

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