Email Notifiers

Methods described in this section relate to the email-notifier API. These methods can be accessed at TenableIE.email_notifiers.

class EmailNotifiersAPI(api: APISession)[source]
create(**kwargs) List[Dict][source]

Create email notifiers

Parameters:
  • input_type (optional, str) – The type of input. possible values are deviances and attacks

  • checkers (List[int], required_for=[deviances]) – The list of checker identifiers.

  • attack_types (List[int], required_for=[attacks]) – The list of attack type identifiers.

  • profiles (List[int]) – The list of profile identifiers.

  • address (str) – The email address.

  • should_notify_on_initial_full_security_check (bool) – Whether alerts should be send when deviances are detected during the initial analysis phase?

  • directories (list[str]) – The list of directory identifiers.

  • criticity_threshold (int) – Threshold at which indicator alerts will be sent.

  • description (optional, str) – The description for notifier.

Returns:

The created email notifiers instance objects

Return type:

list[dict]

Example

Create email notifier with input_type as deviances

>>> tie.email_notifiers.create(
...     input_type='deviances',
...     checkers=[1, 2],
...     profiles=[1],
...     address='test@domain.com',
...     should_notify_on_initial_full_security_check=False,
...     directories=[1],
...     criticity_threshold=100,
...     description='test alert'
...     )

Create email notifier with input_type as attacks

>>> tie.email_notifiers.create(
...     input_type='attacks',
...     attack_types=[1, 2],
...     profiles=[1],
...     address='test@domain.com',
...     should_notify_on_initial_full_security_check=False,
...     directories=[1],
...     criticity_threshold=100,
...     description='test alert'
...     )
delete(email_notifier_id: str) None[source]

Delete an Email-Notifier instance

Parameters:

email_notifier_id (str) – The profile instance identifier.

Return type:

None

Examples

>>> tie.email_notifiers.delete(
...     email_notifier_id='1'
...     )
details(email_notifier_id: str) Dict[source]

Retrieves the details for a specific email-notifier

Parameters:

email_notifier_id (str) – The email-notifier instance identifier.

Returns:

the email-notifier object.

Return type:

dict

Examples

>>> tie.email_notifiers.details(
...     email_notifier_id='1'
...     )
list() List[Dict][source]

Retrieve all email notifiers instances

Returns:

The list of email notifier objects

Return type:

list

Examples

>>> tie.email_notifiers.list()
send_test_email(**kwargs) None[source]

Send a test Email notification

Parameters:
  • input_type (optional, str) – The type of input. possible values are deviances and attacks

  • checkers (List[int], required_for=[deviances]) – The list of checker identifiers.

  • attack_types (List[int], required_for=[attacks]) – The list of attack type identifiers.

  • profiles (List[int]) – The list of profile identifiers.

  • address (str) – The email address.

  • directories (list[str]) – The list of directory identifiers.

  • criticity_threshold (int) – Threshold at which indicator alerts will be sent.

  • description (optional, str) – The description for notifier.

Return type:

None

Examples

Send test email notifier with input_type as deviances

>>> tie.email_notifiers.create(
...     input_type='deviances',
...     checkers=[1, 2],
...     profiles=[1],
...     address='test@domain.com',
...     directories=[1],
...     criticity_threshold=100,
...     description='test alert'
...     )

Send test email notifier with input_type as attacks

>>> tie.email_notifiers.create(
...     input_type='attacks',
...     attack_types=[1, 2],
...     profiles=[1],
...     address='test@domain.com',
...     directories=[1],
...     criticity_threshold=100,
...     description='test alert'
...     )
send_test_email_by_id(email_notifier_id: str) None[source]

Send a test Email notification by id

Parameters:

email_notifier_id (str) – The profile instance identifier.

Return type:

None

Examples

>>> tie.email_notifiers.send_test_email_by_id(
...     email_notifier_id='1'
...     )
update(email_notifier_id: str, **kwargs) Dict[source]

Update an existing profile

Parameters:
  • email_notifier_id (str) – The email-notifier instance identifier.

  • address (optional, str) – The email address.

  • criticity_threshold (optional, int) – Threshold at which indicator alerts will be sent.

  • directories (optional, List[int]) – The list of directory identifiers.

  • description (optional, str) – The description for notifier.

  • checkers (optional, List[int]) – The list of checker identfiers.

  • attack_types (optional, List[int]) – The list of attack type identifiers.

  • profiles (optional, List[int]) – The list of profile identifiers.

  • input_type (optional, str) – The type of input. possible values are deviances, attacks

  • should_notify_on_initial_full_security_check (bool) – Whether alerts should be send when deviances are detected during the initial analysis phase?

Returns:

The updated email-notifier instance object.

Return type:

dict

Examples

>>> tie.email_notifiers.update(
...     email_notifier_id='1',
...     input_type='attacks',
...     attack_types=[1, 2]
...     )