Skip to main content

platform_accounts

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

Overview​

Nameplatform_accounts
TypeResource
Idovh.zimbra.platform_accounts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Resource identifier in UUID representation
checksumstringChecksum hash in MD5 representation
current_stateobjectObject representing account (wire: currentState)
current_tasksarrayAn array containing tasks responses pending on resource extends AsyncResourceBase object (wire: currentTasks)
resource_statusstringCurrent resource status (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectObject representing account (wire: targetSpec)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, platform_idReturns the email address, offer, slot, quota usage, contact information and detailed status of the email account, with its ongoing tasks.
listselectplatform_idx_pagination_cursor, x_pagination_size, domain_id, email, offer, organization_id, organization_labelReturns the email accounts of the platform with their current state. Filter them by organizationId, organizationLabel, domainId, email or offer.
createinsertplatform_id, target_specCreates 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.
updateupdateaccount_id, platform_id, target_specUpdates 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.
deletedeleteaccount_id, platform_idDeletes 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.

NameDatatypeDescription
account_idstring (uuid)Account ID (wire: accountId)
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"}})
platform_idstring (uuid)Platform ID (wire: platformId)
domain_idstring (uuid)Filter by Domain identifier (wire: domainId)
emailstringFilter by email
offerstringFilter by offer
organization_idstring (uuid)Filter by organization identifier (wire: organizationId)
organization_labelstringFilter by organization label (wire: organizationLabel)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

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
;