users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | sumologic.scim.users |
Fields
The following fields are returned by SELECT queries:
- get
- list
User details retrieved successfully
| Name | Datatype | Description |
|---|---|---|
id | string | Unique SCIM identifier for the user (example: 000000000FE20FE2) |
name | object | |
user_name | string | Unique identifier for the user (email) (example: jdoe@example.com) (wire: userName) |
active | boolean | True if the user is active |
emails | array | Sumo logic accepts only one email address |
meta | object | Resource meta data of a user |
roles | array | roles should exactly match with role names within sumologic. roles can be either Array of strings or Array of objects as shown in the payload. primary always set to 'true' as sumologic doesn't have a concept of primary/secondary roles |
schemas | array | Defines the SCIM schemas for the user |
A paginated list of users in the organization
| Name | Datatype | Description |
|---|---|---|
id | string | Unique SCIM identifier for the user (example: 000000000FE20FE2) |
name | object | |
user_name | string | Unique identifier for the user (email) (example: jdoe@example.com) (wire: userName) |
active | boolean | True if the user is active |
emails | array | Sumo logic accepts only one email address |
meta | object | Resource meta data of a user |
roles | array | roles should exactly match with role names within sumologic. roles can be either Array of strings or Array of objects as shown in the payload. primary always set to 'true' as sumologic doesn't have a concept of primary/secondary roles |
schemas | array | Defines the SCIM schemas for the user |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, region | Fetches the details of a SCIM user by their unique identifier | |
list | select | region | start_index, count, filter, sort_order, sort_by | Retrieves a list of users in the SCIM system, with optional pagination |
create | insert | region, emails, name, roles, schemas, user_name | Creates a new user in the SCIM system | |
update | update | id, region, operations, schemas | Updates specific attributes of an existing user in the SCIM system | |
replace | replace | id, region, active, emails, name, roles, schemas | Updates an existing user's attributes in the SCIM system | |
delete | delete | id, region | Deletes a SCIM user by their unique identifier |
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 |
|---|---|---|
id | string | Unique identifier of the SCIM user to delete |
region | string | Sumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT) |
count | integer | The maximum number of results to return. Defaults to 100 |
filter | string | Find user with the given email address |
sort_by | string | Sort the list of users by the givenName, familyName, or emails field (wire: sortBy) |
sort_order | string | The sort order. Use "ascending" or "descending" (wire: sortOrder) |
start_index | integer (int32) | The index of the first result to return. Defaults to 1 if not specified, a value less than 1 SHALL be interpreted as 1 (wire: startIndex) |
SELECT examples
- get
- list
Fetches the details of a SCIM user by their unique identifier
SELECT
id,
name,
user_name,
active,
emails,
meta,
roles,
schemas
FROM sumologic.scim.users
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
Retrieves a list of users in the SCIM system, with optional pagination
SELECT
id,
name,
user_name,
active,
emails,
meta,
roles,
schemas
FROM sumologic.scim.users
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND start_index = '{{ start_index }}'
AND count = '{{ count }}'
AND filter = '{{ filter }}'
AND sort_order = '{{ sort_order }}'
AND sort_by = '{{ sort_by }}'
;
INSERT examples
- create
- Manifest
Creates a new user in the SCIM system
INSERT INTO sumologic.scim.users (
schemas,
user_name,
name,
emails,
roles,
region
)
SELECT
'{{ schemas }}' /* required */,
'{{ user_name }}' /* required */,
'{{ name }}' /* required */,
'{{ emails }}' /* required */,
'{{ roles }}' /* required */,
'{{ region }}'
RETURNING
id,
name,
user_name,
active,
emails,
meta,
roles,
schemas
;
# Description fields are for documentation purposes
- name: users
props:
- name: region
value: "{{ region }}"
description: Required parameter for the users resource.
- name: schemas
value:
- "{{ schemas }}"
description: |
Defines the SCIM schemas for the user
- name: user_name
value: "{{ user_name }}"
description: |
Unique identifier for the user (email)
- name: name
value:
givenName: "{{ givenName }}"
familyName: "{{ familyName }}"
- name: emails
description: |
Sumo logic accepts only one email address
value:
- value: "{{ value }}"
type: "{{ type }}"
primary: {{ primary }}
- name: roles
value: "{{ roles }}"
description: |
roles should exactly match with role names within sumologic. `roles` can be either `Array of strings` or `Array of objects` as shown in the payload. `primary` always set to 'true' as sumologic doesn't have a concept of primary/secondary roles
UPDATE examples
- update
Updates specific attributes of an existing user in the SCIM system
UPDATE sumologic.scim.users
SET
schemas = '{{ schemas }}',
operations = '{{ operations }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND operations = '{{ operations }}' --required
AND schemas = '{{ schemas }}' --required
RETURNING
id,
name,
user_name,
active,
emails,
meta,
roles,
schemas;
REPLACE examples
- replace
Updates an existing user's attributes in the SCIM system
REPLACE sumologic.scim.users
SET
schemas = '{{ schemas }}',
name = '{{ name }}',
active = {{ active }},
emails = '{{ emails }}',
roles = '{{ roles }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND active = {{ active }} --required
AND emails = '{{ emails }}' --required
AND name = '{{ name }}' --required
AND roles = '{{ roles }}' --required
AND schemas = '{{ schemas }}' --required
RETURNING
id,
name,
user_name,
active,
emails,
meta,
roles,
schemas;
DELETE examples
- delete
Deletes a SCIM user by their unique identifier
DELETE FROM sumologic.scim.users
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;