Skip to content

Commit

Permalink
update add/remove docstrings (#404)
Browse files Browse the repository at this point in the history
* update add/remove docstrings

* style

* Update alertrules.py

Small updates to phrasing, for clarity.

* comma

Co-authored-by: annie-payseur <52421911+annie-payseur@users.noreply.github.com>
  • Loading branch information
timabrmsn and annie-payseur committed Feb 9, 2022
1 parent 8f436f3 commit 79e8c9a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/py42/clients/alertrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ def filetypemismatch(self):
return self._alert_rules_service.filetypemismatch

def add_user(self, rule_id, user_id):
"""Update alert rule to monitor user aliases against the Uid for the given rule id.
"""Update alert rule criteria to add a user and all their aliases to an alert rule. A rule's
user list can either be inclusive (only the users on the list can generate alerts) or exclusive
(everyone can generate alerts, except users on the list). This method will include or
exclude based on the rule configuration.
`Rest Documentation <https://developer.code42.com/api/#operation/Rules_AddUsersToRule>`__
Args:
Expand All @@ -56,7 +60,11 @@ def add_user(self, rule_id, user_id):
raise

def remove_user(self, rule_id, user_id):
"""Update alert rule criteria to remove a user and all its aliases from a rule.
"""Update alert rule criteria to remove a user and all their aliases from an alert rule. A rule's
user list can either be inclusive (only the users on the list can generate alerts) or exclusive
(everyone can generate alerts, except users on the list). This method will include or
exclude based on the rule configuration.
`Rest Documentation <https://developer.code42.com/api/#operation/Rules_RemoveUsersFromRule>`__
Args:
Expand Down

0 comments on commit 79e8c9a

Please sign in to comment.