platform_accounts
Creates, updates, deletes, gets or lists a platform_accounts resource.
Overview​
| Name | platform_accounts |
| Type | Resource |
| Id | ovh.zimbra.platform_accounts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Resource identifier in UUID representation |
checksum | string | Checksum hash in MD5 representation |
current_state | object | Object representing account (wire: currentState) |
current_tasks | array | An array containing tasks responses pending on resource extends AsyncResourceBase object (wire: currentTasks) |
resource_status | string | Current resource status (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Object representing account (wire: targetSpec) |
Response for a Zimbra Account
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Resource identifier in UUID representation |
checksum | string | Checksum hash in MD5 representation |
current_state | object | Object representing account (wire: currentState) |
current_tasks | array | An array containing tasks responses pending on resource extends AsyncResourceBase object (wire: currentTasks) |
resource_status | string | Current resource status (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Object representing account (wire: targetSpec) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, platform_id | Returns the email address, offer, slot, quota usage, contact information and detailed status of the email account, with its ongoing tasks. | |
list | select | platform_id | x_pagination_cursor, x_pagination_size, domain_id, email, offer, organization_id, organization_label | Returns the email accounts of the platform with their current state. Filter them by organizationId, organizationLabel, domainId, email or offer. |
create | insert | platform_id, target_spec | Creates an email account from its email, password, offer and slotId. The domain must be ready and the slot must match the offer. Creation is asynchronous: follow resourceStatus and currentTasks. | |
update | update | account_id, platform_id, target_spec | Updates the email address, password, names, contact information, visibility in the global address list (hideInGal) or quota limit of the email account. When set, checksum must match the current checksum of the account, otherwise the update is rejected. | |
delete | delete | account_id, platform_id | Deletes the email account. An account blocked for spam cannot be deleted. |
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 |
|---|---|---|
account_id | string (uuid) | Account ID (wire: accountId) |
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"}}) |
platform_id | string (uuid) | Platform ID (wire: platformId) |
domain_id | string (uuid) | Filter by Domain identifier (wire: domainId) |
email | string | Filter by email |
offer | string | Filter by offer |
organization_id | string (uuid) | Filter by organization identifier (wire: organizationId) |
organization_label | string | Filter by organization label (wire: organizationLabel) |
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 email address, offer, slot, quota usage, contact information and detailed status of the email account, with its ongoing tasks.
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_accounts
WHERE account_id = '{{ account_id }}' -- required
AND platform_id = '{{ platform_id }}' -- required
;
Returns the email accounts of the platform with their current state. Filter them by organizationId, organizationLabel, domainId, email or offer.
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_accounts
WHERE platform_id = '{{ platform_id }}' -- required
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND domain_id = '{{ domain_id }}'
AND email = '{{ email }}'
AND offer = '{{ offer }}'
AND organization_id = '{{ organization_id }}'
AND organization_label = '{{ organization_label }}'
;
INSERT examples​
- create
- Manifest
Creates an email account from its email, password, offer and slotId. The domain must be ready and the slot must match the offer. Creation is asynchronous: follow resourceStatus and currentTasks.
INSERT INTO ovh.zimbra.platform_accounts (
target_spec,
platform_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ platform_id }}'
RETURNING
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
;
# Description fields are for documentation purposes
- name: platform_accounts
props:
- name: platform_id
value: "{{ platform_id }}"
description: Required parameter for the platform_accounts resource.
- name: target_spec
description: |
Target organization specification
value:
contactInformation:
city: "{{ city }}"
company: "{{ company }}"
country: "{{ country }}"
faxNumber: "{{ faxNumber }}"
mobileNumber: "{{ mobileNumber }}"
office: "{{ office }}"
phoneNumber: "{{ phoneNumber }}"
postcode: "{{ postcode }}"
profession: "{{ profession }}"
service: "{{ service }}"
street: "{{ street }}"
description: "{{ description }}"
displayName: "{{ displayName }}"
email: "{{ email }}"
firstName: "{{ firstName }}"
forceChangePasswordAfterLogin: {{ forceChangePasswordAfterLogin }}
hideInGal: {{ hideInGal }}
lastName: "{{ lastName }}"
offer: "{{ offer }}"
password: "{{ password }}"
quota:
limit: {{ limit }}
slotId: "{{ slotId }}"
UPDATE examples​
- update
Updates the email address, password, names, contact information, visibility in the global address list (hideInGal) or quota limit of the email account. When set, checksum must match the current checksum of the account, otherwise the update is rejected.
UPDATE ovh.zimbra.platform_accounts
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
account_id = '{{ account_id }}' --required
AND platform_id = '{{ platform_id }}' --required
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec;
DELETE examples​
- delete
Deletes the email account. An account blocked for spam cannot be deleted.
DELETE FROM ovh.zimbra.platform_accounts
WHERE account_id = '{{ account_id }}' --required
AND platform_id = '{{ platform_id }}' --required
;