platform_aliases
Creates, updates, deletes, gets or lists a platform_aliases resource.
Overview​
| Name | platform_aliases |
| Type | Resource |
| Id | ovh.zimbra.platform_aliases |
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 Alias (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 Alias (wire: targetSpec) |
Response for get Alias
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Resource identifier in UUID representation |
checksum | string | Checksum hash in MD5 representation |
current_state | object | Object representing Alias (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 Alias (wire: targetSpec) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | alias_id, platform_id | Returns the alias address, its domain and organization, and its target: an email account or a mailing list. | |
list | select | platform_id | x_pagination_cursor, x_pagination_size, alias, alias_organization_id, alias_organization_label, alias_target_id | Returns the aliases of the platform with their target. Filter them by alias, aliasTargetId, aliasOrganizationId or aliasOrganizationLabel. |
create | insert | platform_id, target_spec | 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. | |
delete | delete | alias_id, platform_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
alias_id | string (uuid) | Alias ID (wire: aliasId) |
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"}}) |
platform_id | string (uuid) | Platform ID (wire: platformId) |
alias | string | Filter by the alias email |
alias_organization_id | string | Filter by organization identifier of the aliases (wire: aliasOrganizationId) |
alias_organization_label | string | Filter by organization label of the aliases (wire: aliasOrganizationLabel) |
alias_target_id | string | Filter by the targeted email account identifier (wire: aliasTargetId) |
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 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
;
Returns the aliases of the platform with their target. Filter them by alias, aliasTargetId, aliasOrganizationId or aliasOrganizationLabel.
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_aliases
WHERE platform_id = '{{ platform_id }}' -- required
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND alias = '{{ alias }}'
AND alias_organization_id = '{{ alias_organization_id }}'
AND alias_organization_label = '{{ alias_organization_label }}'
AND alias_target_id = '{{ alias_target_id }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: platform_aliases
props:
- name: platform_id
value: "{{ platform_id }}"
description: Required parameter for the platform_aliases resource.
- name: target_spec
description: |
Target alias specification
value:
alias: "{{ alias }}"
targetId: "{{ targetId }}"
DELETE examples​
- delete
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
;