file_share_acls
Creates, updates, deletes, gets or lists a file_share_acls resource.
Overview​
| Name | file_share_acls |
| Type | Resource |
| Id | ovh.public_cloud_storage.file_share_acls |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the access rule |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the access rule (wire: createdAt) |
current_state | object | Current observed state of the access rule from the infrastructure (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the access rule (wire: currentTasks) |
resource_status | string | Access rule readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the access rule (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the access rule (wire: updatedAt) |
An access rule (ACL) controlling which IP addresses can access a Public Cloud file storage share
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the access rule |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the access rule (wire: createdAt) |
current_state | object | Current observed state of the access rule from the infrastructure (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the access rule (wire: currentTasks) |
resource_status | string | Access rule readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the access rule (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the access rule (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | acl_id, file_storage_id, project_id | Returns the ACL and its current state. | |
list | select | file_storage_id, project_id | x_pagination_cursor, x_pagination_size | Returns the ACLs of the file storage. |
create | insert | file_storage_id, project_id, target_spec | Grants read-write or read-only access to the file storage to an IP address or CIDR block. | |
delete | delete | acl_id, file_storage_id, project_id | Deletes the ACL and revokes the access it granted. |
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 |
|---|---|---|
acl_id | string (uuid) | Acl ID (wire: aclId) |
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"}}) |
file_storage_id | string (uuid) | File storage ID (wire: fileStorageId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Returns the ACL and its current state.
SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_storage.file_share_acls
WHERE acl_id = '{{ acl_id }}' -- required
AND file_storage_id = '{{ file_storage_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Returns the ACLs of the file storage.
SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_storage.file_share_acls
WHERE file_storage_id = '{{ file_storage_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
Grants read-write or read-only access to the file storage to an IP address or CIDR block.
INSERT INTO ovh.public_cloud_storage.file_share_acls (
target_spec,
file_storage_id,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ file_storage_id }}',
'{{ project_id }}'
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
;
# Description fields are for documentation purposes
- name: file_share_acls
props:
- name: file_storage_id
value: "{{ file_storage_id }}"
description: Required parameter for the file_share_acls resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the file_share_acls resource.
- name: target_spec
description: |
Desired target specification for the access rule
value:
accessLevel: "{{ accessLevel }}"
accessTo: "{{ accessTo }}"
DELETE examples​
- delete
Deletes the ACL and revokes the access it granted.
DELETE FROM ovh.public_cloud_storage.file_share_acls
WHERE acl_id = '{{ acl_id }}' --required
AND file_storage_id = '{{ file_storage_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;