Skip to main content

platform_aliases

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

Overview​

Nameplatform_aliases
TypeResource
Idovh.zimbra.platform_aliases

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

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectalias_id, platform_idReturns the alias address, its domain and organization, and its target: an email account or a mailing list.
listselectplatform_idx_pagination_cursor, x_pagination_size, alias, alias_organization_id, alias_organization_label, alias_target_idReturns the aliases of the platform with their target. Filter them by alias, aliasTargetId, aliasOrganizationId or aliasOrganizationLabel.
createinsertplatform_id, target_specCreates an alias address from alias and the ID of its target in targetId. The alias domain and the target domain must be in the same organization.
deletedeletealias_id, platform_idDeletes the alias address. The alias, its domain and its target must be ready.

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
alias_idstring (uuid)Alias ID (wire: aliasId)
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)
aliasstringFilter by the alias email
alias_organization_idstringFilter by organization identifier of the aliases (wire: aliasOrganizationId)
alias_organization_labelstringFilter by organization label of the aliases (wire: aliasOrganizationLabel)
alias_target_idstringFilter by the targeted email account identifier (wire: aliasTargetId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the alias address, its domain and organization, and its target: an email account or a mailing list.

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

INSERT examples​

Creates an alias address from alias and the ID of its target in targetId. The alias domain and the target domain must be in the same organization.

INSERT INTO ovh.zimbra.platform_aliases (
target_spec,
platform_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ platform_id }}'
RETURNING
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
;

DELETE examples​

Deletes the alias address. The alias, its domain and its target must be ready.

DELETE FROM ovh.zimbra.platform_aliases
WHERE alias_id = '{{ alias_id }}' --required
AND platform_id = '{{ platform_id }}' --required
;