Skip to main content

licenses

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

Overview​

Namelicenses
TypeResource
Idovh.license_office_prepaid.licenses

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task id (wire: taskPendingId)
first_namestringUser's first name (wire: firstName)
last_namestringUser's last name (wire: lastName)
service_namestringUser service name, used in invoices (wire: serviceName)
tenant_service_namestringUser's tenant service name, used in invoices (wire: tenantServiceName)
activation_emailstringEmail used to activate Microsoft Office (wire: activationEmail)
iamobjectIAM resource metadata
is_virtualbooleanSpecify if the user is actually a user slot (configureme) or a real user (wire: isVirtual)
licencesarrayLicenses attributed to the user
statusstringUser state (creating, deleting, ok, suspended, unspending)
usage_locationstringISO 3166-1 alpha-2 country code where the user is using Office365 services (ac, ad, ae, af, ag, ai, al, am, an, ao, aq, ar, as, at, au, aw, ax, az, ba, bb, bd, be, bf, bg, bh, bi, bj, bl, bm, bn, bo, bq, br, bs, bt, bv, bw, by, bz, ca, cc, cd, cf, cg, ch, ci, ck, cl, cm, cn, co, cr, cs, cu, cv, cw, cx, cy, cz, de, dj, dk, dm, do, dz, ec, ee, eg, eh, er, es, et, fc, fd, fi, fj, fk, fm, fo, fr, fx, ga, gb, gd, ge, gf, gg, gh, gi, gl, gm, gn, gp, gq, gr, gs, gt, gu, gw, gy, hk, hm, hn, hr, ht, hu, id, ie, il, im, in, io, iq, ir, is, it, je, jm, jo, jp, ke, kg, kh, ki, km, kn, kp, kr, kw, ky, kz, la, lb, lc, li, lk, lr, ls, lt, lu, lv, ly, ma, mc, md, me, mf, mg, mh, mk, ml, mm, mn, mo, mp, mq, mr, ms, mt, mu, mv, mw, mx, my, mz, na, nc, ne, nf, ng, ni, nl, no, np, nr, nu, nz, om, pa, pe, pf, pg, ph, pk, pl, pm, pn, pr, ps, pt, pw, py, qa, qc, re, ro, rs, ru, rw, sa, sb, sc, sd, se, sg, sh, si, sj, sk, sl, sm, sn, so, sr, ss, st, sv, sx, sy, sz, tc, td, tf, tg, th, tj, tk, tl, tm, tn, to, tp, tr, tt, tv, tw, tz, ua, ug, uk, um, us, uy, uz, va, vc, ve, vg, vi, vn, vu, we, wf, ws, ye, yt, yu, za, zm, zw) (wire: usageLocation)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameReturns the names, activation email, licenses and state of the prepaid user, and the service names of the user and of its tenant. isVirtual tells whether it is a user slot or a real user. (Alpha version)
listselectiam_tags, x_pagination_modeReturns the service names of the prepaid users. (Alpha version)
updateupdateservice_nameUpdates the first name, last name and activation email of the prepaid user. (Alpha version)
change_passwordexecserviceName, shouldSendMailChanges the password of the prepaid user and returns the task. Leave password empty to receive a generated password by email. Set shouldSendMail to send the new password to notifyEmail, the admin contact email by default. (Alpha version)
confirm_terminationexecserviceName, tokenConfirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given. (Beta version)
terminateexecserviceNameRequest service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call. (Beta version)
unconfigureexecserviceNameRemoves the configuration of the prepaid user and turns it back into an unassigned license slot, and returns the task. The prepaid license is kept.

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"}})
serviceNamestringService name
service_namestringService name (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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​

Returns the names, activation email, licenses and state of the prepaid user, and the service names of the user and of its tenant. isVirtual tells whether it is a user slot or a real user. (Alpha version)

SELECT
task_pending_id,
first_name,
last_name,
service_name,
tenant_service_name,
activation_email,
iam,
is_virtual,
licences,
status,
usage_location
FROM ovh.license_office_prepaid.licenses
WHERE service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Updates the first name, last name and activation email of the prepaid user. (Alpha version)

UPDATE ovh.license_office_prepaid.licenses
SET
activation_email = '{{ activation_email }}',
first_name = '{{ first_name }}',
last_name = '{{ last_name }}',
usage_location = '{{ usage_location }}'
WHERE
service_name = '{{ service_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Changes the password of the prepaid user and returns the task. Leave password empty to receive a generated password by email. Set shouldSendMail to send the new password to notifyEmail, the admin contact email by default. (Alpha version)

EXEC ovh.license_office_prepaid.licenses.change_password
@serviceName='{{ serviceName }}' --required
@@json=
'{
"notifyEmail": "{{ notifyEmail }}",
"password": "{{ password }}",
"shouldSendMail": {{ shouldSendMail }}
}'
;