Skip to main content

permissions

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

Overview​

Namepermissions
TypeResource
Idsumologic.content.permissions

Fields​

The following fields are returned by SELECT queries:

A list of permissions for the requested content item.

NameDatatypeDescription
explicit_permissionsarrayExplicitly assigned content permissions. (wire: explicitPermissions)
implicit_permissionsarrayImplicitly inherited content permissions. (wire: implicitPermissions)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, regionexplicit_only, is_admin_modeReturns content permissions of a content item with the given identifier.
addexecid, region, contentPermissionAssignments, notificationMessage, notifyRecipientsisAdminModeAdd permissions to a content item with the given identifier.
removeexecid, region, contentPermissionAssignments, notificationMessage, notifyRecipientsisAdminModeRemove permissions from a content item with the given 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
idstringThe identifier of the content item.
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)
explicit_onlybooleanThere are two permission types: explicit and implicit. Permissions specifically assigned to the content item are explicit. Permissions derived from a parent content item, like a folder are implicit. To return only explicit permissions set this to true. (wire: explicitOnly)
isAdminModestringSet this to "true" if you want to perform the request as a Content Administrator.
is_admin_modestringSet this to "true" if you want to perform the request as a Content Administrator. (wire: isAdminMode)

SELECT examples​

Returns content permissions of a content item with the given identifier.

SELECT
explicit_permissions,
implicit_permissions
FROM sumologic.content.permissions
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND explicit_only = '{{ explicit_only }}'
AND is_admin_mode = '{{ is_admin_mode }}'
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Add permissions to a content item with the given identifier.

EXEC sumologic.content.permissions.add
@id='{{ id }}' --required,
@region='{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set,
@isAdminMode='{{ isAdminMode }}'
@@json=
'{
"contentPermissionAssignments": "{{ contentPermissionAssignments }}",
"notifyRecipients": {{ notifyRecipients }},
"notificationMessage": "{{ notificationMessage }}"
}'
;