service_account_archives
Creates, updates, deletes, gets or lists a service_account_archives resource.
Overview​
| Name | service_account_archives |
| Type | Resource |
| Id | ovh.email_exchange.service_account_archives |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task for this archive mailbox (wire: taskPendingId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
current_usage | integer | Archive mailbox usage (wire: currentUsage) |
guid | string | GUID of archive mailbox |
quota | integer | Archive mailbox maximum size in GB |
state | string | Archive mailbox state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | exchange_service, organization_name, primary_email_address | Get the archive mailbox. Returns the quota in GB, the usage, the state and the creation date of the archive mailbox. | |
create | insert | exchange_service, organization_name, primary_email_address | 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. | |
update | update | exchange_service, organization_name, primary_email_address | Update the archive mailbox quota. Sets the maximum size of the archive mailbox of the email account (quota, in GB). | |
delete | delete | exchange_service, organization_name, primary_email_address | Delete 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.
| 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"}}) |
exchange_service | string | The internal name of your exchange service (wire: exchangeService) |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
primary_email_address | string | Default email for this mailbox (wire: primaryEmailAddress) |
SELECT examples​
- get
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_account_archives
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_account_archives resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_account_archives resource.
- name: primary_email_address
value: "{{ primary_email_address }}"
description: Required parameter for the service_account_archives resource.
- name: quota
value: {{ quota }}
description: |
Archive mailbox quota (if not provided mailbox quota will be taken)
UPDATE examples​
- update
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
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
;