Skip to main content

service_impersonated_users

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

Overview​

Nameservice_impersonated_users
TypeResource
Idovh.email_exchange.service_impersonated_users

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task id (wire: taskPendingId)
creation_datestring (date-time)Creation date (wire: creationDate)
last_password_changestring (date-time)Last password update date (wire: lastPasswordChange)
statestringUser state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)
upnstringUser Principal Name

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, organization_nameGet the impersonated user. Returns the UPN, state, creation date and last password change of the user with impersonation rights on all mailboxes.
createinsertexchange_service, organization_name, passwordCreate the impersonated user. Creates a user with impersonation rights on all mailboxes of the service, with the given password, and returns the task.
deletedeleteexchange_service, organization_nameDelete the impersonated user. Deletes the user with impersonation rights on all mailboxes, and returns the task.
change_passwordexecexchangeService, organizationName, passwordChange the impersonated user password. Sets the new password of the impersonated user of the service, and returns the task.

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"}})
exchangeServicestringThe internal name of your exchange service
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
organizationNamestringThe internal name of your exchange organization
organization_namestringThe internal name of your exchange organization (wire: organizationName)

SELECT examples​

Get the impersonated user. Returns the UPN, state, creation date and last password change of the user with impersonation rights on all mailboxes.

SELECT
task_pending_id,
creation_date,
last_password_change,
state,
upn
FROM ovh.email_exchange.service_impersonated_users
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Create the impersonated user. Creates a user with impersonation rights on all mailboxes of the service, with the given password, and returns the task.

INSERT INTO ovh.email_exchange.service_impersonated_users (
password,
exchange_service,
organization_name
)
SELECT
'{{ password }}' /* required */,
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

DELETE examples​

Delete the impersonated user. Deletes the user with impersonation rights on all mailboxes, and returns the task.

DELETE FROM ovh.email_exchange.service_impersonated_users
WHERE exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change the impersonated user password. Sets the new password of the impersonated user of the service, and returns the task.

EXEC ovh.email_exchange.service_impersonated_users.change_password
@exchangeService='{{ exchangeService }}' --required,
@organizationName='{{ organizationName }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;