Skip to main content

platform_domains

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

Overview​

Nameplatform_domains
TypeResource
Idovh.zimbra.platform_domains

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

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain_id, platform_idReturns the domain, its organization, its account statistics per offer and the DNS configuration to apply: ownership, MX, SPF, DKIM and autodiscover.
listselectplatform_idx_pagination_cursor, x_pagination_size, domain_name, organization_id, organization_labelReturns the domains of the platform with their current state. Filter them by organizationId, organizationLabel or domainName.
createinsertplatform_id, target_specAdds 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.
updateupdatedomain_id, platform_id, target_specEnables 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.
deletedeletedomain_id, platform_idDeletes 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.

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"}})
domain_idstring (uuid)Domain ID (wire: domainId)
platform_idstring (uuid)Platform ID (wire: platformId)
domain_namestringFilter by domain name (wire: domainName)
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 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
;

INSERT examples​

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
;

UPDATE examples​

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​

Deletes the domain from its organization.

DELETE FROM ovh.zimbra.platform_domains
WHERE domain_id = '{{ domain_id }}' --required
AND platform_id = '{{ platform_id }}' --required
;