Skip to main content

service_public_folder_permissions

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

Overview​

Nameservice_public_folder_permissions
TypeResource
Idovh.email_exchange.service_public_folder_permissions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
allowed_account_idintegerAccount id (wire: allowedAccountId)
task_pending_idintegertask pending id (wire: taskPendingId)
access_rightsstringAccess right set for the account (editor, none, reviewer) (wire: accessRights)
creation_datestring (date-time)Creation date (wire: creationDate)
statestringCurrent object state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectallowed_account_id, exchange_service, organization_name, pathGet a public folder permission. Returns the ID of the account given access to the public folder, its access rights and its state.
listselectexchange_service, organization_name, pathx_pagination_modeList public folder permissions. Returns the IDs of the accounts that have a permission on the public folder.
createinsertexchange_service, organization_name, path, access_rights, allowed_account_idAdd a public folder permission. Gives the account given by allowedAccountId the editor, reviewer or none access right on the public folder, and returns the task.
updateupdateallowed_account_id, exchange_service, organization_name, pathUpdate a public folder permission. Sets the access right of the account on the public folder: editor, reviewer or none.
deletedeleteallowed_account_id, exchange_service, organization_name, pathRemove a public folder permission. Withdraws the access of the account to the public folder, and returns the task.

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
allowed_account_idintegerAccount id (wire: allowedAccountId)
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"}})
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
organization_namestringThe internal name of your exchange organization (wire: organizationName)
pathstringPath for public folder
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 a public folder permission. Returns the ID of the account given access to the public folder, its access rights and its state.

SELECT
allowed_account_id,
task_pending_id,
access_rights,
creation_date,
state
FROM ovh.email_exchange.service_public_folder_permissions
WHERE allowed_account_id = '{{ allowed_account_id }}' -- required
AND exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND path = '{{ path }}' -- required
;

INSERT examples​

Add a public folder permission. Gives the account given by allowedAccountId the editor, reviewer or none access right on the public folder, and returns the task.

INSERT INTO ovh.email_exchange.service_public_folder_permissions (
access_rights,
allowed_account_id,
exchange_service,
organization_name,
path
)
SELECT
'{{ access_rights }}' /* required */,
{{ allowed_account_id }} /* required */,
'{{ exchange_service }}',
'{{ organization_name }}',
'{{ path }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

UPDATE examples​

Update a public folder permission. Sets the access right of the account on the public folder: editor, reviewer or none.

UPDATE ovh.email_exchange.service_public_folder_permissions
SET
access_rights = '{{ access_rights }}'
WHERE
allowed_account_id = '{{ allowed_account_id }}' --required
AND exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND path = '{{ path }}' --required;

DELETE examples​

Remove a public folder permission. Withdraws the access of the account to the public folder, and returns the task.

DELETE FROM ovh.email_exchange.service_public_folder_permissions
WHERE allowed_account_id = '{{ allowed_account_id }}' --required
AND exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND path = '{{ path }}' --required
;