Skip to main content

users

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

Overview

Nameusers
TypeResource
Idsumologic.scim.users

Fields

The following fields are returned by SELECT queries:

User details retrieved successfully

NameDatatypeDescription
idstringUnique SCIM identifier for the user (example: 000000000FE20FE2)
nameobject
user_namestringUnique identifier for the user (email) (example: jdoe@example.com) (wire: userName)
activebooleanTrue if the user is active
emailsarraySumo logic accepts only one email address
metaobjectResource meta data of a user
rolesarrayroles 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
schemasarrayDefines the SCIM schemas for the user

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, regionFetches the details of a SCIM user by their unique identifier
listselectregionstart_index, count, filter, sort_order, sort_byRetrieves a list of users in the SCIM system, with optional pagination
createinsertregion, emails, name, roles, schemas, user_nameCreates a new user in the SCIM system
updateupdateid, region, operations, schemasUpdates specific attributes of an existing user in the SCIM system
replacereplaceid, region, active, emails, name, roles, schemasUpdates an existing user's attributes in the SCIM system
deletedeleteid, regionDeletes 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.

NameDatatypeDescription
idstringUnique identifier of the SCIM user to delete
regionstringSumo 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)
countintegerThe maximum number of results to return. Defaults to 100
filterstringFind user with the given email address
sort_bystringSort the list of users by the givenName, familyName, or emails field (wire: sortBy)
sort_orderstringThe sort order. Use "ascending" or "descending" (wire: sortOrder)
start_indexinteger (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

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
;

INSERT examples

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
;

UPDATE examples

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

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

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
;