Skip to main content

upn_suffixes

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

Overview​

Nameupn_suffixes
TypeResource
Idovh.ms_services.upn_suffixes

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task for this upnSuffix (wire: taskPendingId)
cname_to_checkstringCname record used for UPN suffix verification (wire: cnameToCheck)
ownership_validatedbooleanOwnership for upn suffix confirmed (wire: ownershipValidated)
statestringUPN suffix state (creating, deleting, ok)
suffixstringUPN suffix

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, suffixGet a UPN suffix. Returns the state of the UPN suffix, the CNAME record used to verify it and whether its ownership is validated.
listselectservice_namex_pagination_modeList UPN suffixes. Returns the UPN suffixes of the Active Directory service. Get one to read its state and the CNAME to check.
createinsertservice_name, suffixCreate a UPN suffix. Adds a UPN suffix to the Active Directory service and returns the task. Its ownership is verified with the CNAME record given in cnameToCheck.
deletedeleteservice_name, suffixDelete a UPN suffix. Removes the UPN suffix from the Active Directory service, so that user names can no longer use it, 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"}})
service_namestringThe internal name of your Active Directory organization (wire: serviceName)
suffixstringUPN suffix
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a UPN suffix. Returns the state of the UPN suffix, the CNAME record used to verify it and whether its ownership is validated.

SELECT
task_pending_id,
cname_to_check,
ownership_validated,
state,
suffix
FROM ovh.ms_services.upn_suffixes
WHERE service_name = '{{ service_name }}' -- required
AND suffix = '{{ suffix }}' -- required
;

INSERT examples​

Create a UPN suffix. Adds a UPN suffix to the Active Directory service and returns the task. Its ownership is verified with the CNAME record given in cnameToCheck.

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

DELETE examples​

Delete a UPN suffix. Removes the UPN suffix from the Active Directory service, so that user names can no longer use it, and returns the task.

DELETE FROM ovh.ms_services.upn_suffixes
WHERE service_name = '{{ service_name }}' --required
AND suffix = '{{ suffix }}' --required
;