Skip to main content

users

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

Overview

Nameusers
TypeResource
Idlinode.account.users

Fields

The following fields are returned by SELECT queries:

The requested User object.

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_userselectReturns information about a single user on your account.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Learn more...

Learn more...
get_usersselectpage, page_sizeReturns a paginated list of all users on your account.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

A user can access all or part of an account based on their access status and grants:

- Unrestricted access. These users can access everything on an account.

- Restricted access. These users can only access entities or perform actions they've been given specific grants to.

Learn more...

Learn more...
post_userinsertdata__username, data__emailCreates a user on your account. You determine the new user's account access by setting it to restricted or unrestricted and by defining its grants. After completion, the API sends a confirmation message containing password creation and login instructions to the user's email address.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Parent and child accounts

In a parent and child account environment, the following apply:

- A parent account user can create new parent account users.

- A child account can update the child account parent user (proxy user) to unrestricted. This gives the proxy user access to create new child account users.

- A child account user can create new child account users.

- You can't create a proxy user. The proxy user in a child account is predefined when you initially provision the parent-child relationship.

Learn more...

Learn more...
put_userreplaceUpdate information about a user on your account, including its restricted status. When setting a user to restricted, the API sets no grants for it. You need to set grants so that user can access things on the account.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Parent and child accounts

In a parent and child account environment, the following apply:

- You can't edit the username or email values for the child account parent user (proxy user). These are predefined for the proxy user when you initially provision the parent-child relationship. Only a proxy user's restricted status can be modified. This can only be done by an unrestricted child account user.

- A parent account using an unrestricted proxy user in a child account can modify the username, email, and restricted status for an existing child account user.

- A restricted account user--parent or child--can't change their user to unrestricted.

Learn more...

Learn more...
delete_userdeleteDeletes a user. The API immediately logs the user out and removes all of its grants.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Parent and child accounts

In a parent and child account environment, the following apply:

- You can't delete a child account parent user (proxy user). The API returns a 403 error if you target a proxy user with this operation.

- A parent account using an unrestricted proxy user can use this operation to delete a child account user.

Learn more...

Learn more...

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
pageintegerThe page of a collection to return.
page_sizeintegerThe number of items to return per page.

SELECT examples

Returns information about a single user on your account.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Learn more...

Learn more...

SELECT
*
FROM linode.account.users;

INSERT examples

Creates a user on your account. You determine the new user's account access by setting it to restricted or unrestricted and by defining its grants. After completion, the API sends a confirmation message containing password creation and login instructions to the user's email address.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Parent and child accounts

In a parent and child account environment, the following apply:

- A parent account user can create new parent account users.

- A child account can update the child account parent user (proxy user) to unrestricted. This gives the proxy user access to create new child account users.

- A child account user can create new child account users.

- You can't create a proxy user. The proxy user in a child account is predefined when you initially provision the parent-child relationship.

Learn more...

Learn more...

INSERT INTO linode.account.users (
data__email,
data__restricted,
data__username
)
SELECT
'{{ email }}' --required,
{{ restricted }},
'{{ username }}' --required
RETURNING
email,
last_login,
password_created,
restricted,
ssh_keys,
tfa_enabled,
username,
verified_phone_number
;

REPLACE examples

Update information about a user on your account, including its restricted status. When setting a user to restricted, the API sets no grants for it. You need to set grants so that user can access things on the account.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Parent and child accounts

In a parent and child account environment, the following apply:

- You can't edit the username or email values for the child account parent user (proxy user). These are predefined for the proxy user when you initially provision the parent-child relationship. Only a proxy user's restricted status can be modified. This can only be done by an unrestricted child account user.

- A parent account using an unrestricted proxy user in a child account can modify the username, email, and restricted status for an existing child account user.

- A restricted account user--parent or child--can't change their user to unrestricted.

Learn more...

Learn more...

REPLACE linode.account.users
SET
data__email = '{{ email }}',
data__restricted = {{ restricted }},
data__username = '{{ username }}'
WHERE

RETURNING
email,
last_login,
password_created,
restricted,
ssh_keys,
tfa_enabled,
user_type,
username,
verified_phone_number;

DELETE examples

Deletes a user. The API immediately logs the user out and removes all of its grants.

> 📘
>
> This operation can only be accessed by account users with unrestricted access.

Parent and child accounts

In a parent and child account environment, the following apply:

- You can't delete a child account parent user (proxy user). The API returns a 403 error if you target a proxy user with this operation.

- A parent account using an unrestricted proxy user can use this operation to delete a child account user.

Learn more...

Learn more...

DELETE FROM linode.account.users;