platform_domains
Creates, updates, deletes, gets or lists a platform_domains resource.
Overview​
| Name | platform_domains |
| Type | Resource |
| Id | ovh.zimbra.platform_domains |
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 domain (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 domain (wire: targetSpec) |
Response for get Domain
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Resource identifier in UUID representation |
checksum | string | Checksum hash in MD5 representation |
current_state | object | Object representing domain (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 domain (wire: targetSpec) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain_id, platform_id | Returns the domain, its organization, its account statistics per offer and the DNS configuration to apply: ownership, MX, SPF, DKIM and autodiscover. | |
list | select | platform_id | x_pagination_cursor, x_pagination_size, domain_name, organization_id, organization_label | Returns the domains of the platform with their current state. Filter them by organizationId, organizationLabel or domainName. |
create | insert | platform_id, target_spec | Adds a domain to an organization from its name and organizationId. When the DNS zone is hosted by OVHcloud, autoConfigureMX, autoConfigureSPF, autoConfigureDKIM and autoConfigureAutodiscover configure the matching records automatically. Creation is asynchronous: follow resourceStatus and currentTasks. | |
update | update | domain_id, platform_id, target_spec | Enables or disables DKIM with dkimEnabled, or moves the domain, with its email accounts, to another organization with organizationId. When set, checksum must match the current checksum of the domain, otherwise the update is rejected. | |
delete | delete | domain_id, platform_id | Deletes the domain from its organization. |
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"}}) |
domain_id | string (uuid) | Domain ID (wire: domainId) |
platform_id | string (uuid) | Platform ID (wire: platformId) |
domain_name | string | Filter by domain name (wire: domainName) |
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 domain, its organization, its account statistics per offer and the DNS configuration to apply: ownership, MX, SPF, DKIM and autodiscover.
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_domains
WHERE domain_id = '{{ domain_id }}' -- required
AND platform_id = '{{ platform_id }}' -- required
;
Returns the domains of the platform with their current state. Filter them by organizationId, organizationLabel or domainName.
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_domains
WHERE platform_id = '{{ platform_id }}' -- required
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND domain_name = '{{ domain_name }}'
AND organization_id = '{{ organization_id }}'
AND organization_label = '{{ organization_label }}'
;
INSERT examples​
- create
- Manifest
Adds a domain to an organization from its name and organizationId. When the DNS zone is hosted by OVHcloud, autoConfigureMX, autoConfigureSPF, autoConfigureDKIM and autoConfigureAutodiscover configure the matching records automatically. Creation is asynchronous: follow resourceStatus and currentTasks.
INSERT INTO ovh.zimbra.platform_domains (
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_domains
props:
- name: platform_id
value: "{{ platform_id }}"
description: Required parameter for the platform_domains resource.
- name: target_spec
description: |
Target organization specification
value:
autoConfigureAutodiscover: {{ autoConfigureAutodiscover }}
autoConfigureDKIM: {{ autoConfigureDKIM }}
autoConfigureMX: {{ autoConfigureMX }}
autoConfigureSPF: {{ autoConfigureSPF }}
name: "{{ name }}"
organizationId: "{{ organizationId }}"
UPDATE examples​
- update
Enables or disables DKIM with dkimEnabled, or moves the domain, with its email accounts, to another organization with organizationId. When set, checksum must match the current checksum of the domain, otherwise the update is rejected.
UPDATE ovh.zimbra.platform_domains
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
domain_id = '{{ domain_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 domain from its organization.
DELETE FROM ovh.zimbra.platform_domains
WHERE domain_id = '{{ domain_id }}' --required
AND platform_id = '{{ platform_id }}' --required
;