rubrik_polaris.sonar package¶
Submodules¶
rubrik_polaris.sonar.csv module¶
Collection of methods for sonar csv files.
-
rubrik_polaris.sonar.csv.
get_csv_download
(self, snapshot_id, snappable_id, filters=None)¶ Request to download the Sonar CSV Snapshot results file.
- Parameters
snapshot_id (str) – Snapshot ID to get results.
snappable_id (str) – Snappable (Object) ID to get results.
filters (dict) – Filters to download csv file.
- Returns
Dictionary containing status of sonar csv snapshot results file download .
- Return type
dict
- Raises
ValueError – If input is invalid
RequestException – If the query to Polaris returned an error.
-
rubrik_polaris.sonar.csv.
get_csv_result_download
(self, download_id: int)¶ To retrieve the Sonar CSV results file download link.
- Parameters
download_id (int) – ID of CSV results file to be download.
- Returns
Dictionary containing download link of Sonar CSV results file.
- Return type
dict
- Raises
RequestException – If the query to Polaris returned an error.
rubrik_polaris.sonar.object module¶
Collection of methods for sonar sensitive hits.
-
rubrik_polaris.sonar.object.
get_sensitive_hits_object_list
(self, day: str, timezone: str)¶ To get the sonar sensitive hits object list.
- Parameters
day (str) – Specify the date.
timezone (str) – Specify timezone.
- Returns
Dictionary containing list of sonar sensitive hits object.
- Return type
dict
- Raises
ValueError – If input is invalid
RequestException – If the query to Polaris returned an error.
-
rubrik_polaris.sonar.object.
get_sensitive_hits_object_detail
(self, snapshot_id: str, snappable_id: str)¶ To get the sonar sensitive hits object details.
- Parameters
snapshot_id (str) – Snapshot ID to get results.
snappable_id (str) – Snappable(Object) ID to get results.
- Returns
Dictionary containing details of sonar sensitive hits object.
- Return type
dict
- Raises
ValueError – If input is invalid
RequestException – If the query to Polaris returned an error.
-
rubrik_polaris.sonar.object.
get_sensitive_hits
(self, search_time_period: int = 7, object_name=None)¶ To get the sonar sensitive hits.
- Parameters
search_time_period (int) – The number of days in the past to look for sensitive hits.
object_name (str) – The object_name to filter objects.
- Returns
Dictionary containing list of sonar sensitive hits.
- Return type
dict
- Raises
RequestException – If the query to Polaris returned an error.
rubrik_polaris.sonar.policy module¶
Collection of methods for sonar policies
-
rubrik_polaris.sonar.policy.
list_policy_analyzer_groups
(self)¶ Retrieve the list of sonar policy analyzer groups.
- Returns
Dictionary of sonar policy analyzer groups.
- Return type
dict
- Raises
RequestException – If the query to Polaris returned an error.
-
rubrik_polaris.sonar.policy.
list_policies
(self)¶ Retrieves available sonar policies
- Returns
Details of policies
- Return type
dict
- Raises
RequestException – If the query to Polaris returned an error
rubrik_polaris.sonar.scan module¶
Collection of methods for sonar on demand scan
-
rubrik_polaris.sonar.scan.
trigger_on_demand_scan
(self, scan_name, resources, analyzer_groups)¶ Trigger an on-demand scan of a system (specifying policies to search for).
- Parameters
scan_name (str) – Name of the scan.
analyzer_groups (list) – List of sonar policy analyzer groups.
resources (list) – List of object IDs to scan.
- Returns
Response from the API.
- Return type
dict
- Raises
ValueError – If input is invalid
RequestException – If the query to Polaris returned an error
-
rubrik_polaris.sonar.scan.
get_on_demand_scan_status
(self, crawl_id)¶ Retrieve the list of scan status details.
- Parameters
crawl_id (str) – ID for which scan status is to be obtained.
- Returns
Dictionary of list of scan status details.
- Return type
dict
- Raises
ValueError – If input is invalid
RequestException – If the query to Polaris returned an error.
-
rubrik_polaris.sonar.scan.
get_on_demand_scan_result
(self, crawl_id, filters)¶ Retrieve the download link for the requested scanned file.
- Parameters
crawl_id (str) – ID for which file needs to be downloaded.
filters (dict) – Dictionary of filter containing file type.
- Returns
Dictionary containing download link for the result file.
- Return type
dict
- Raises
ValueError – If input is invalid
RequestException – If the query to Polaris returned an error.
Module contents¶
Collection of functions that interact with Data Classification primitives.