platform_organizations
Creates, updates, deletes, gets or lists a platform_organizations resource.
Overview​
| Name | platform_organizations |
| Type | Resource |
| Id | ovh.zimbra.platform_organizations |
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 organization (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 organization (wire: targetSpec) |
Response for get organization
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Resource identifier in UUID representation |
checksum | string | Checksum hash in MD5 representation |
current_state | object | Object representing organization (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 organization (wire: targetSpec) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | organization_id, platform_id | Returns the name, label and description of the organization, its storage consumed and its account statistics per offer. | |
list | select | platform_id | x_pagination_cursor, x_pagination_size, organization_name | Returns the organizations of the platform with their current state. Filter them by organizationName. |
create | insert | platform_id, target_spec | 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. | |
update | update | organization_id, platform_id, target_spec | 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. | |
delete | delete | organization_id, platform_id | Deletes 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.
| 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"}}) |
organization_id | string (uuid) | Organization ID (wire: organizationId) |
platform_id | string (uuid) | Platform ID (wire: platformId) |
organization_name | string | Filter by organization name (wire: organizationName) |
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 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
;
Returns the organizations of the platform with their current state. Filter them by organizationName.
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_organizations
WHERE platform_id = '{{ platform_id }}' -- required
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND organization_name = '{{ organization_name }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: platform_organizations
props:
- name: platform_id
value: "{{ platform_id }}"
description: Required parameter for the platform_organizations resource.
- name: target_spec
description: |
Target organization specification
value:
description: "{{ description }}"
label: "{{ label }}"
name: "{{ name }}"
UPDATE examples​
- update
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​
- delete
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
;