google.cloud.forseti.notifier.notifiers.email_violations module

Email notifier to perform notifications

class EmailViolations(resource, inventory_index_id, violations, global_configs, notifier_config, notification_config)[source]

Bases: google.cloud.forseti.notifier.notifiers.base_notification.BaseNotification

Email notifier to perform notifications

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 186
_abc_registry = <_weakrefset.WeakSet object>
_compose(**kwargs)[source]

Compose the email notifier map

Parameters:**kwargs – Arbitrary keyword arguments.
Returns:A map of the email with subject, content, attachemnt
Return type:dict
_make_attachment_csv()[source]

Create the attachment object in csv format.

Returns:SendGrid attachment object.
Return type:attachment
_make_attachment_json()[source]

Create the attachment object json format.

Returns:SendGrid attachment object.
Return type:attachment
_make_content()[source]

Create the email content.

Returns:Email subject. unicode: Email template content rendered with
the provided variables.
Return type:str
_send(**kwargs)[source]

Send a summary email of the scan.

Parameters:**kwargs – Arbitrary keyword arguments. subject: Email subject conetent: Email content attachment: Attachment object
run()[source]

Run the email notifier