users
Creates, updates, deletes, gets or lists a users resource.
Overview​
| Name | users |
| Type | Resource |
| Id | ovh.license_office.users |
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) |
activation_email | string | Email used to activate Microsoft Office (wire: activationEmail) |
delete_at_expiration | boolean | Whether or not this user slot will be resigned at the next renew period (wire: deleteAtExpiration) |
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, suspending, unsuspending) |
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 user
| 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) |
activation_email | string | Email used to activate Microsoft Office (wire: activationEmail) |
delete_at_expiration | boolean | Whether or not this user slot will be resigned at the next renew period (wire: deleteAtExpiration) |
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, suspending, unsuspending) |
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 | activation_email, service_name | Returns the names, activation email, licenses and state of the user. isVirtual tells whether it is a user slot or a real user. | |
list | select | service_name | activation_email, first_name, last_name, licences, x_pagination_mode | Returns the activation emails of the users of the tenant. Filter them by activationEmail, firstName, lastName or licences. |
create | insert | service_name, domain, login | Creates a user from a login on a domain of the tenant, with a license, optional first and last names and a usage location, and returns the task. | |
update | update | activation_email, service_name | Updates the first name, last name and activation email of the user, and deleteAtExpiration, which ends the user slot at the next renewal. | |
delete | delete | activation_email, service_name | Deletes the user and returns the task. | |
change_password | exec | activationEmail, serviceName, shouldSendMail | Changes the password of the 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. |
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 |
|---|---|---|
activationEmail | string | Activation email |
activation_email | string | Activation email (wire: activationEmail) |
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) |
activation_email | string | (wire: activationEmail) |
first_name | string | (wire: firstName) |
last_name | string | (wire: lastName) |
licences | array | |
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 user. isVirtual tells whether it is a user slot or a real user.
SELECT
task_pending_id,
first_name,
last_name,
activation_email,
delete_at_expiration,
is_virtual,
licences,
status,
usage_location
FROM ovh.license_office.users
WHERE activation_email = '{{ activation_email }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the activation emails of the users of the tenant. Filter them by activationEmail, firstName, lastName or licences.
SELECT
task_pending_id,
first_name,
last_name,
activation_email,
delete_at_expiration,
is_virtual,
licences,
status,
usage_location
FROM ovh.license_office.users
WHERE service_name = '{{ service_name }}' -- required
AND activation_email = '{{ activation_email }}'
AND first_name = '{{ first_name }}'
AND last_name = '{{ last_name }}'
AND licences = '{{ licences }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Creates a user from a login on a domain of the tenant, with a license, optional first and last names and a usage location, and returns the task.
INSERT INTO ovh.license_office.users (
domain,
first_name,
last_name,
licence,
login,
usage_location,
service_name
)
SELECT
'{{ domain }}' /* required */,
'{{ first_name }}',
'{{ last_name }}',
'{{ licence }}',
'{{ login }}' /* required */,
'{{ usage_location }}',
'{{ service_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: users
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the users resource.
- name: domain
value: "{{ domain }}"
description: |
Office domain
- name: first_name
value: "{{ first_name }}"
description: |
User's first name
- name: last_name
value: "{{ last_name }}"
description: |
User's last name
- name: licence
value: "{{ licence }}"
description: |
Licenses attributed to the user
valid_values: ['officeBusiness', 'officeProPlus']
- name: login
value: "{{ login }}"
description: |
Account login
- name: usage_location
value: "{{ usage_location }}"
description: |
ISO 3166-1 alpha-2 country code where the user is using Office365 services
valid_values: ['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']
UPDATE examples​
- update
Updates the first name, last name and activation email of the user, and deleteAtExpiration, which ends the user slot at the next renewal.
UPDATE ovh.license_office.users
SET
activation_email = '{{ activation_email }}',
delete_at_expiration = {{ delete_at_expiration }},
first_name = '{{ first_name }}',
last_name = '{{ last_name }}',
usage_location = '{{ usage_location }}'
WHERE
activation_email = '{{ activation_email }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Deletes the user and returns the task.
DELETE FROM ovh.license_office.users
WHERE activation_email = '{{ activation_email }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_password
Changes the password of the 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.
EXEC ovh.license_office.users.change_password
@activationEmail='{{ activationEmail }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"notifyEmail": "{{ notifyEmail }}",
"password": "{{ password }}",
"shouldSendMail": {{ shouldSendMail }}
}'
;