Groups¶
The following methods allow for interaction into the Tenable Security Center Group API. These items are typically seen under the User Groups section of Tenable Security Center.
Methods available on sc.groups
:
- class GroupAPI(api: APISession)[source]¶
- create(name, **kw)[source]¶
Creates a group.
- Parameters:
name (str) – The name of the user group
asset_lists (list, optional) – List of asset list ids to allow this group to access.
audit_files (list, optional) – List of audit file ids to allow this group to access.
dashboards (list, optional) – List of dashboard ids to allow this group to access.
lce_ids (list, optional) – List of LCE ionstance ids to allow this group to access.
query_ids (list, optional) – List of query ids to allow this group to access.
report_cards (list, optional) – List of report card ids to allow this group to access.
repos (list, optional) – List of repository ids to allow this group to access.
scan_creds (list, optional) – List of scanning credential ids to allow this group to access.
scan_policies (list, optional) – List of scan policy ids to allow this group to access.
viewable (list, optional) – List of asset list ids to use for the purposes of restricting what members of this group can see within Tenable Security Center.
- Returns:
The newly created group.
- Return type:
Examples
>>> group = sc.groups.create('New Group')
- delete(id)[source]¶
Removes a group.
- Parameters:
id (int) – The numeric identifier for the group to remove.
- Returns:
An empty response.
- Return type:
Examples
>>> sc.groups.delete(1)
- details(id, fields=None)[source]¶
Returns the details for a specific group.
- Parameters:
- Returns:
The group resource record.
- Return type:
Examples
>>> group = sc.groups.details(1) >>> pprint(group)
- edit(id, **kw)[source]¶
Edits a group.
- Parameters:
asset_lists (list, optional) – List of asset list ids to allow this group to access.
audit_files (list, optional) – List of audit file ids to allow this group to access.
dashboards (list, optional) – List of dashboard ids to allow this group to access.
lce_ids (list, optional) – List of LCE ionstance ids to allow this group to access.
name (str, optional) – The name of the user group
query_ids (list, optional) – List of query ids to allow this group to access.
report_cards (list, optional) – List of report card ids to allow this group to access.
repos (list, optional) – List of repository ids to allow this group to access.
scan_creds (list, optional) – List of scanning credential ids to allow this group to access.
scan_policies (list, optional) – List of scan policy ids to allow this group to access.
viewable (list, optional) – List of asset list ids to use for the purposes of restricting what members of this group can see within Tenable Security Center.
- Returns:
The newly updated group.
- Return type:
Examples
>>> group = sc.groups.edit()