users
Creates, updates, deletes, gets or lists a users
resource.
Overview
Name | users |
Type | Resource |
Id | linode.account.users |
Fields
The following fields are returned by SELECT
queries:
- get_user
- get_users
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_user | select | 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... | ||
get_users | select | page , page_size | Returns 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_user | insert | data__username , data__email | 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... | |
put_user | replace | 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... | ||
delete_user | delete | 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... |
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 |
---|---|---|
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT
examples
- get_user
- get_users
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;
Returns 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...
SELECT
data,
page,
pages,
results
FROM linode.account.users
WHERE page = '{{ page }}'
AND page_size = '{{ page_size }}';
INSERT
examples
- post_user
- Manifest
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
;
# Description fields are for documentation purposes
- name: users
props:
- name: email
value: string
description: >
This user's email address. Akamai uses this address for account management communications.
- name: restricted
value: boolean
description: >
If `true`, this user needs specific access granted to perform actions or access entities on your account. Run [List a user's grants](https://techdocs.akamai.com/linode-api/reference/get-user-grants) for details on how to configure grants for a restricted user.
- name: username
value: string
description: >
__Filterable__ The name of this user. This user needs to use this value to log in. It may also display alongside actions this user performs, including events or public StackScripts.
REPLACE
examples
- put_user
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
- delete_user
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;