permissions
Creates, updates, deletes, gets or lists a permissions resource.
Overview​
| Name | permissions |
| Type | Resource |
| Id | sumologic.content.permissions |
Fields​
The following fields are returned by SELECT queries:
- get
A list of permissions for the requested content item.
| Name | Datatype | Description |
|---|---|---|
explicit_permissions | array | Explicitly assigned content permissions. (wire: explicitPermissions) |
implicit_permissions | array | Implicitly inherited content permissions. (wire: implicitPermissions) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, region | explicit_only, is_admin_mode | Returns content permissions of a content item with the given identifier. |
add | exec | id, region, contentPermissionAssignments, notificationMessage, notifyRecipients | isAdminMode | Add permissions to a content item with the given identifier. |
remove | exec | id, region, contentPermissionAssignments, notificationMessage, notifyRecipients | isAdminMode | Remove 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the content item. |
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) |
explicit_only | boolean | There 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) |
isAdminMode | string | Set this to "true" if you want to perform the request as a Content Administrator. |
is_admin_mode | string | Set this to "true" if you want to perform the request as a Content Administrator. (wire: isAdminMode) |
SELECT examples​
- get
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
- remove
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 }}"
}'
;
Remove permissions from a content item with the given identifier.
EXEC sumologic.content.permissions.remove
@id='{{ id }}' --required,
@region='{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set,
@isAdminMode='{{ isAdminMode }}'
@@json=
'{
"contentPermissionAssignments": "{{ contentPermissionAssignments }}",
"notifyRecipients": {{ notifyRecipients }},
"notificationMessage": "{{ notificationMessage }}"
}'
;