Skip to main content

platform_organizations

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

Overview​

Nameplatform_organizations
TypeResource
Idovh.zimbra.platform_organizations

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 organization (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 organization (wire: targetSpec)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectorganization_id, platform_idReturns the name, label and description of the organization, its storage consumed and its account statistics per offer.
listselectplatform_idx_pagination_cursor, x_pagination_size, organization_nameReturns the organizations of the platform with their current state. Filter them by organizationName.
createinsertplatform_id, target_specCreates an organization from its name, its label and an optional description. The label is a short name that must be unique on the platform. Creation is asynchronous: follow resourceStatus and currentTasks.
updateupdateorganization_id, platform_id, target_specUpdates the name, label or description of the organization. When set, checksum must match the current checksum of the organization, otherwise the update is rejected.
deletedeleteorganization_id, platform_idDeletes the organization. An organization still linked to domains 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
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"}})
organization_idstring (uuid)Organization ID (wire: organizationId)
platform_idstring (uuid)Platform ID (wire: platformId)
organization_namestringFilter by organization name (wire: organizationName)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the name, label and description of the organization, its storage consumed and its account statistics per offer.

SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_organizations
WHERE organization_id = '{{ organization_id }}' -- required
AND platform_id = '{{ platform_id }}' -- required
;

INSERT examples​

Creates an organization from its name, its label and an optional description. The label is a short name that must be unique on the platform. Creation is asynchronous: follow resourceStatus and currentTasks.

INSERT INTO ovh.zimbra.platform_organizations (
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 name, label or description of the organization. When set, checksum must match the current checksum of the organization, otherwise the update is rejected.

UPDATE ovh.zimbra.platform_organizations
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
organization_id = '{{ organization_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 organization. An organization still linked to domains cannot be deleted.

DELETE FROM ovh.zimbra.platform_organizations
WHERE organization_id = '{{ organization_id }}' --required
AND platform_id = '{{ platform_id }}' --required
;