service_devices
Creates, updates, deletes, gets or lists a service_devices resource.
Overview​
| Name | service_devices |
| Type | Resource |
| Id | ovh.email_exchange.service_devices |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
device_id | string | Device Id (wire: deviceId) |
task_pending_id | integer | Pending task id (wire: taskPendingId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
device_model | string | Model device (wire: deviceModel) |
device_state | string | Device State (allowed, blocked, deviceDiscovery, quarantined) (wire: deviceState) |
guid | string | user guid |
identity | string | Exchange identity |
imei | string | International Mobile Equipment Identity (wire: IMEI) |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
Get the list of your ActiveSync devices registered on this Exchange service
| Name | Datatype | Description |
|---|---|---|
device_id | string | Device Id (wire: deviceId) |
task_pending_id | integer | Pending task id (wire: taskPendingId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
device_model | string | Model device (wire: deviceModel) |
device_state | string | Device State (allowed, blocked, deviceDiscovery, quarantined) (wire: deviceState) |
guid | string | user guid |
identity | string | Exchange identity |
imei | string | International Mobile Equipment Identity (wire: IMEI) |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | exchange_service, identity, organization_name | Get a device. Returns the model, IMEI, device ID, ActiveSync state and last update date of the ActiveSync device. | |
list | select | exchange_service, organization_name | imei, device_state, identity, x_pagination_mode | List devices. Returns the identities of the ActiveSync devices registered on the service. Filter them by identity, IMEI or deviceState. |
update | update | exchange_service, identity, organization_name | Update a device. Updates the ActiveSync state of the device with deviceState, for example to allow, block or quarantine it. | |
clear_device | exec | exchangeService, identity, organizationName | Reset a device to factory settings. Runs a factory reset on the device and returns the task. This cannot be undone: all data on the device is lost. |
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"}}) |
exchangeService | string | The internal name of your exchange service |
exchange_service | string | The internal name of your exchange service (wire: exchangeService) |
identity | string | Exchange identity |
organizationName | string | The internal name of your exchange organization |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
device_state | string | Filter the value of deviceState property (=) (wire: deviceState) |
identity | string | Filter the value of identity property (like) |
imei | string | Filter the value of IMEI property (like) (wire: IMEI) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a device. Returns the model, IMEI, device ID, ActiveSync state and last update date of the ActiveSync device.
SELECT
device_id,
task_pending_id,
creation_date,
device_model,
device_state,
guid,
identity,
imei,
last_update
FROM ovh.email_exchange.service_devices
WHERE exchange_service = '{{ exchange_service }}' -- required
AND identity = '{{ identity }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;
List devices. Returns the identities of the ActiveSync devices registered on the service. Filter them by identity, IMEI or deviceState.
SELECT
device_id,
task_pending_id,
creation_date,
device_model,
device_state,
guid,
identity,
imei,
last_update
FROM ovh.email_exchange.service_devices
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND imei = '{{ imei }}'
AND device_state = '{{ device_state }}'
AND identity = '{{ identity }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
Update a device. Updates the ActiveSync state of the device with deviceState, for example to allow, block or quarantine it.
UPDATE ovh.email_exchange.service_devices
SET
device_state = '{{ device_state }}'
WHERE
exchange_service = '{{ exchange_service }}' --required
AND identity = '{{ identity }}' --required
AND organization_name = '{{ organization_name }}' --required;
Lifecycle Methods​
EXEC variables use wire (API) names.
- clear_device
Reset a device to factory settings. Runs a factory reset on the device and returns the task. This cannot be undone: all data on the device is lost.
EXEC ovh.email_exchange.service_devices.clear_device
@exchangeService='{{ exchangeService }}' --required,
@identity='{{ identity }}' --required,
@organizationName='{{ organizationName }}' --required
;