Skip to main content

service_resource_account_delegates

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

Overview​

Nameservice_resource_account_delegates
TypeResource
Idovh.email_exchange.service_resource_account_delegates

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
allowed_account_idintegerdelegate's account id (wire: allowedAccountId)
task_pending_idintegertask pending id (wire: taskPendingId)
creation_datestring (date-time)Creation date (wire: creationDate)
delegate_email_addressstringDelegate account primaryEmailAddress (wire: delegateEmailAddress)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectallowed_account_id, exchange_service, organization_name, resource_email_addressGet a resource account delegate. Returns the ID and the email address of the account that manages the bookings of the resource.
listselectexchange_service, organization_name, resource_email_addressx_pagination_modeList resource account delegates. Returns the IDs of the accounts that are delegates of the resource account.
createinsertexchange_service, organization_name, resource_email_address, allowed_account_idAdd a resource account delegate. Adds the account given by allowedAccountId as a delegate of the resource account, and returns the task.
deletedeleteallowed_account_id, exchange_service, organization_name, resource_email_addressRemove a resource account delegate. Withdraws from the email account the management of the bookings of the resource, 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_idintegerdelegate's account 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)
resource_email_addressstringresource as email (wire: resourceEmailAddress)
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 resource account delegate. Returns the ID and the email address of the account that manages the bookings of the resource.

SELECT
allowed_account_id,
task_pending_id,
creation_date,
delegate_email_address
FROM ovh.email_exchange.service_resource_account_delegates
WHERE allowed_account_id = '{{ allowed_account_id }}' -- required
AND exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND resource_email_address = '{{ resource_email_address }}' -- required
;

INSERT examples​

Add a resource account delegate. Adds the account given by allowedAccountId as a delegate of the resource account, and returns the task.

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

DELETE examples​

Remove a resource account delegate. Withdraws from the email account the management of the bookings of the resource, and returns the task.

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