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
- list
The requested User object.
| Name | Datatype | Description |
|---|
A paginated list of users.
| Name | Datatype | Description |
|---|---|---|
email | string (email) | This user's email address. Akamai uses this address for account management communications. (example: example_user@linode.com) |
last_login | object | Read-only Details on this user's last login attempt. Returned as null if this user hasn't attempted a login since it was created. You can run the List user logins operation for additional login information. |
password_created | string (date-time) | Read-only When this user's current password was created. You initially create a password during the account sign-up process, and you can update it using the Reset Password webpage. Returned as null if this user doesn't have a password set. (example: 2018-01-01T01:01:01) |
restricted | boolean | If true, this user needs specific access granted to perform actions or access entities on your account. Run List a user's grants for details on how to configure grants for a restricted user. |
ssh_keys | array | Read-only A list of the labels for SSH keys added by this user. Users can add keys with the Add an SSH key operation. These keys are deployed when this user is included in the authorized_users field of the following requests: - Create a Linode - Rebuild a Linode - Create a disk |
tfa_enabled | boolean | Read-only Whether this user has Two Factor Authentication (TFA) enabled. Run the Create a two factor secret operation to enable TFA. |
user_type | string | Read-only If the user belongs to a parent or child account relationship, this defines the user type in the respective account. Possible values include: - parent. This is a user in an Akamai partner account. Akamai partners have a contractual relationship with their end customers, to sell Akamai services. This user can either have full access (a parent account admin user) or limited access. Limited users don't have access to manage child accounts, but they can be granted this access by an admin user. - child. This is an Akamai partner's end customer user, in a child account. A child user can have either full or limited access. Full access lets the user manage other child users and the proxy user in a child account. - proxy. This is a user on a child account that gives parent account users access to that child account. A parent account user with the child_account_access grant can Create a proxy user token from the parent account. The parent user can use this token to run API operations from the child account, as if they were a child user. - default. This applies to all regular, non-parent-child account users. (parent, child, proxy, default) (example: parent) |
username | string | 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. (example: example_user, pattern: ^[a-zA-Z0-9]((?![-]{2,})[a-zA-Z0-9-])+[a-zA-Z0-9]$) |
verified_phone_number | string (phone) | Read-only The verified phone number for this user profile. Returned as null if the user doesn't have a verified phone number. (example: +5555555555) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | username | Returns information about a single user on your account. > 📘 > > This operation can only be accessed by account users with unrestricted access. Talk to your local account administrator about access management. Learn more... Learn more... | |
list | 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. Talk to your local account administrator about access management. 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... | |
create | insert | username, 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. Talk to your local account administrator about access management. 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... | |
update | replace | username | 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. Talk to your local account administrator about access management. 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 | delete | username | 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. Talk to your local account administrator about access management. 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 |
|---|---|---|
username | string | The username to look up. (example: {{username}}) |
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT examples
- get
- list
Returns information about a single user on your account.
> 📘
>
> This operation can only be accessed by account users with unrestricted access. Talk to your local account administrator about access management.
Learn more...
Learn more...
SELECT
*
FROM linode.account.users
WHERE username = '{{ username }}' -- required
;
Returns a paginated list of all users on your account.
> 📘
>
> This operation can only be accessed by account users with unrestricted access. Talk to your local account administrator about access management.
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
email,
last_login,
password_created,
restricted,
ssh_keys,
tfa_enabled,
user_type,
username,
verified_phone_number
FROM linode.account.users
WHERE page = '{{ page }}'
AND page_size = '{{ page_size }}'
;
INSERT examples
- create
- 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. Talk to your local account administrator about access management.
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 (
email,
restricted,
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: "{{ email }}"
description: |
This user's email address. Akamai uses this address for account management communications.
- name: restricted
value: {{ restricted }}
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: "{{ username }}"
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
- update
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. Talk to your local account administrator about access management.
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
email = '{{ email }}',
restricted = {{ restricted }},
username = '{{ username }}'
WHERE
username = '{{ username }}' --required
RETURNING
email,
last_login,
password_created,
restricted,
ssh_keys,
tfa_enabled,
user_type,
username,
verified_phone_number;
DELETE examples
- 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. Talk to your local account administrator about access management.
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
WHERE username = '{{ username }}' --required
;