platform_redirections
Creates, updates, deletes, gets or lists a platform_redirections resource.
Overview​
| Name | platform_redirections |
| Type | Resource |
| Id | ovh.zimbra.platform_redirections |
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 Redirection (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 Redirection Target Spec (wire: targetSpec) |
Response for get redirection
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Resource identifier in UUID representation |
checksum | string | Checksum hash in MD5 representation |
current_state | object | Object representing Redirection (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 Redirection Target Spec (wire: targetSpec) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | platform_id, redirection_id | Returns the source and destination email addresses of the redirection, with its domain and organization. (Beta version) | |
list | select | platform_id | x_pagination_cursor, x_pagination_size, destination, domain_id, organization_id, source | Returns the redirections of the platform with their current state. Filter them by source, destination, domainId or organizationId. (Beta version) |
create | insert | platform_id, target_spec | Creates a redirection from a source email address to a destination email address. (Beta version) | |
delete | delete | platform_id, redirection_id | Deletes the redirection. (Beta version) |
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"}}) |
platform_id | string (uuid) | Platform ID (wire: platformId) |
redirection_id | string (uuid) | Redirection ID (wire: redirectionId) |
destination | string | Filter by destination |
domain_id | string | Filter by domain id (wire: domainId) |
organization_id | string | Filter by organization id (wire: organizationId) |
source | string | Filter by source |
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 source and destination email addresses of the redirection, with its domain and organization. (Beta version)
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_redirections
WHERE platform_id = '{{ platform_id }}' -- required
AND redirection_id = '{{ redirection_id }}' -- required
;
Returns the redirections of the platform with their current state. Filter them by source, destination, domainId or organizationId. (Beta version)
SELECT
id,
checksum,
current_state,
current_tasks,
resource_status,
target_spec
FROM ovh.zimbra.platform_redirections
WHERE platform_id = '{{ platform_id }}' -- required
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND destination = '{{ destination }}'
AND domain_id = '{{ domain_id }}'
AND organization_id = '{{ organization_id }}'
AND source = '{{ source }}'
;
INSERT examples​
- create
- Manifest
Creates a redirection from a source email address to a destination email address. (Beta version)
INSERT INTO ovh.zimbra.platform_redirections (
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_redirections
props:
- name: platform_id
value: "{{ platform_id }}"
description: Required parameter for the platform_redirections resource.
- name: target_spec
description: |
Target redirection specification
value:
destination: "{{ destination }}"
source: "{{ source }}"
DELETE examples​
- delete
Deletes the redirection. (Beta version)
DELETE FROM ovh.zimbra.platform_redirections
WHERE platform_id = '{{ platform_id }}' --required
AND redirection_id = '{{ redirection_id }}' --required
;