Skip to main content

service_account_archives

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

Overview​

Nameservice_account_archives
TypeResource
Idovh.email_exchange.service_account_archives

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task for this archive mailbox (wire: taskPendingId)
creation_datestring (date-time)Creation date (wire: creationDate)
current_usageintegerArchive mailbox usage (wire: currentUsage)
guidstringGUID of archive mailbox
quotaintegerArchive mailbox maximum size in GB
statestringArchive mailbox state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, organization_name, primary_email_addressGet the archive mailbox. Returns the quota in GB, the usage, the state and the creation date of the archive mailbox.
createinsertexchange_service, organization_name, primary_email_addressCreate an archive mailbox. Creates the archive mailbox of the email account and returns the task. Without quota, the archive gets the quota of the mailbox.
updateupdateexchange_service, organization_name, primary_email_addressUpdate the archive mailbox quota. Sets the maximum size of the archive mailbox of the email account (quota, in GB).
deletedeleteexchange_service, organization_name, primary_email_addressDelete the archive mailbox. Deletes the archive mailbox of the email account with the emails archived in it, 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
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)
primary_email_addressstringDefault email for this mailbox (wire: primaryEmailAddress)

SELECT examples​

Get the archive mailbox. Returns the quota in GB, the usage, the state and the creation date of the archive mailbox.

SELECT
task_pending_id,
creation_date,
current_usage,
guid,
quota,
state
FROM ovh.email_exchange.service_account_archives
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND primary_email_address = '{{ primary_email_address }}' -- required
;

INSERT examples​

Create an archive mailbox. Creates the archive mailbox of the email account and returns the task. Without quota, the archive gets the quota of the mailbox.

INSERT INTO ovh.email_exchange.service_account_archives (
quota,
exchange_service,
organization_name,
primary_email_address
)
SELECT
{{ quota }},
'{{ exchange_service }}',
'{{ organization_name }}',
'{{ primary_email_address }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

UPDATE examples​

Update the archive mailbox quota. Sets the maximum size of the archive mailbox of the email account (quota, in GB).

UPDATE ovh.email_exchange.service_account_archives
SET
quota = {{ quota }}
WHERE
exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND primary_email_address = '{{ primary_email_address }}' --required;

DELETE examples​

Delete the archive mailbox. Deletes the archive mailbox of the email account with the emails archived in it, and returns the task.

DELETE FROM ovh.email_exchange.service_account_archives
WHERE exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND primary_email_address = '{{ primary_email_address }}' --required
;