partition_accesses
Creates, updates, deletes, gets or lists a partition_accesses resource.
Overview​
| Name | partition_accesses |
| Type | Resource |
| Id | ovh.dedicated_nasha.partition_accesses |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
access_id | integer | the id of the access (wire: accessId) |
acl_description | string | a brief description of the acl (wire: aclDescription) |
ip | string (ip-block) | the ip in root on storage (example: 192.0.2.0/24) |
type | string | ACL type (readonly, readwrite) |
Define Acl for partition
| Name | Datatype | Description |
|---|---|---|
access_id | integer | the id of the access (wire: accessId) |
acl_description | string | a brief description of the acl (wire: aclDescription) |
ip | string (ip-block) | the ip in root on storage (example: 192.0.2.0/24) |
type | string | ACL type (readonly, readwrite) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip, partition_name, service_name | Get this object properties | |
list | select | partition_name, service_name | x_pagination_mode | get ACL for this partition |
create | insert | partition_name, service_name, ip | Add a new ACL entry | |
delete | delete | ip, partition_name, service_name | Delete 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.
| 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"}}) |
ip | string (ip-block) | the ip in root on storage |
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
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
;
get ACL for this partition
SELECT
access_id,
acl_description,
ip,
type
FROM ovh.dedicated_nasha.partition_accesses
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: partition_accesses
props:
- name: partition_name
value: "{{ partition_name }}"
description: Required parameter for the partition_accesses resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the partition_accesses resource.
- name: acl_description
value: "{{ acl_description }}"
description: |
ACL description
- name: ip
value: "{{ ip }}"
description: |
Ip or block to add
- name: type
value: "{{ type }}"
description: |
ACL type
valid_values: ['readonly', 'readwrite']
DELETE examples​
- delete
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
;