licenses
Creates, updates, deletes, gets or lists a licenses resource.
Overview​
| Name | licenses |
| Type | Resource |
| Id | ovh.license_office_prepaid.licenses |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task id (wire: taskPendingId) |
first_name | string | User's first name (wire: firstName) |
last_name | string | User's last name (wire: lastName) |
service_name | string | User service name, used in invoices (wire: serviceName) |
tenant_service_name | string | User's tenant service name, used in invoices (wire: tenantServiceName) |
activation_email | string | Email used to activate Microsoft Office (wire: activationEmail) |
iam | object | IAM resource metadata |
is_virtual | boolean | Specify if the user is actually a user slot (configureme) or a real user (wire: isVirtual) |
licences | array | Licenses attributed to the user |
status | string | User state (creating, deleting, ok, suspended, unspending) |
usage_location | string | ISO 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) |
Office tenant
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task id (wire: taskPendingId) |
first_name | string | User's first name (wire: firstName) |
last_name | string | User's last name (wire: lastName) |
service_name | string | User service name, used in invoices (wire: serviceName) |
tenant_service_name | string | User's tenant service name, used in invoices (wire: tenantServiceName) |
activation_email | string | Email used to activate Microsoft Office (wire: activationEmail) |
iam | object | IAM resource metadata |
is_virtual | boolean | Specify if the user is actually a user slot (configureme) or a real user (wire: isVirtual) |
licences | array | Licenses attributed to the user |
status | string | User state (creating, deleting, ok, suspended, unspending) |
usage_location | string | ISO 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | 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) | |
list | select | iam_tags, x_pagination_mode | Returns the service names of the prepaid users. (Alpha version) | |
update | update | service_name | Updates the first name, last name and activation email of the prepaid user. (Alpha version) | |
change_password | exec | serviceName, shouldSendMail | 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) | |
confirm_termination | exec | serviceName, token | Confirm 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) | |
terminate | exec | serviceName | Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call. (Beta version) | |
unconfigure | exec | serviceName | Removes 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.
| 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"}}) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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
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
;
Returns the service names of the prepaid users. (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 iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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.
- change_password
- confirm_termination
- terminate
- unconfigure
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 }}
}'
;
Confirm 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)
EXEC ovh.license_office_prepaid.licenses.confirm_termination
@serviceName='{{ serviceName }}' --required
@@json=
'{
"commentary": "{{ commentary }}",
"futureUse": "{{ futureUse }}",
"reason": "{{ reason }}",
"token": "{{ token }}"
}'
;
Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call. (Beta version)
EXEC ovh.license_office_prepaid.licenses.terminate
@serviceName='{{ serviceName }}' --required
;
Removes the configuration of the prepaid user and turns it back into an unassigned license slot, and returns the task. The prepaid license is kept.
EXEC ovh.license_office_prepaid.licenses.unconfigure
@serviceName='{{ serviceName }}' --required
;