Skip to main content

account_syncs

Creates, updates, deletes, gets or lists an account_syncs resource.

Overview​

Nameaccount_syncs
TypeResource
Idovh.ms_services.account_syncs

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task for this sync account (wire: taskPendingId)
configuredbooleanIndicates if the account is configured
licensestringSync account license (standard, standardFree)
statestringSync account state (creating, deleting, disabled, modifying, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, user_principal_nameGet the account synchronization (Deprecated, will be removed)
createinsertservice_name, user_principal_name, licenseCreate new sync account (Deprecated, will be removed)
deletedeleteservice_name, user_principal_nameDelete sync account (Deprecated, will be removed)
configureexecserviceName, userPrincipalNameConfigure sync account to be operational (Deprecated, will be removed)

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"}})
serviceNamestringThe internal name of your Active Directory organization
service_namestringThe internal name of your Active Directory organization (wire: serviceName)
userPrincipalNamestringUser Principal Name
user_principal_namestringUser Principal Name (wire: userPrincipalName)

SELECT examples​

Get the account synchronization (Deprecated, will be removed)

SELECT
task_pending_id,
configured,
license,
state
FROM ovh.ms_services.account_syncs
WHERE service_name = '{{ service_name }}' -- required
AND user_principal_name = '{{ user_principal_name }}' -- required
;

INSERT examples​

Create new sync account (Deprecated, will be removed)

INSERT INTO ovh.ms_services.account_syncs (
license,
service_name,
user_principal_name
)
SELECT
'{{ license }}' /* required */,
'{{ service_name }}',
'{{ user_principal_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

DELETE examples​

Delete sync account (Deprecated, will be removed)

DELETE FROM ovh.ms_services.account_syncs
WHERE service_name = '{{ service_name }}' --required
AND user_principal_name = '{{ user_principal_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Configure sync account to be operational (Deprecated, will be removed)

EXEC ovh.ms_services.account_syncs.configure
@serviceName='{{ serviceName }}' --required,
@userPrincipalName='{{ userPrincipalName }}' --required
;