Passer au contenu principal

class SendNotification

Définit une action d’automatisation qui envoie une notification (Slack).

méthode SendNotification.__init__

__init__(
    integration_id: 'str',
    message: 'str' = '',
    severity: 'AlertSeverity' = <AlertSeverity.INFO: 'INFO'>,
    title: 'str' = '',
    action_type: 'Literal[NOTIFICATION]' = NOTIFICATION
) → None
Arguments :
  • integration_id (str): L’ID de l’intégration Slack utilisée pour envoyer la notification.
  • message (str): Le contenu du message de la notification envoyée.
  • severity (AlertSeverity): Le niveau de gravité (INFO, WARN, ERROR) de la notification envoyée.
  • title (str): Le titre de la notification envoyée.
  • action_type (Literal[NOTIFICATION]):
Retourne : Un objet SendNotification.

méthode de classe SendNotification.from_integration

from_integration(
    integration: 'SlackIntegration',
    title: 'str' = '',
    text: 'str' = '',
    level: 'AlertSeverity' = <AlertSeverity.INFO: 'INFO'>
) → Self
Définit une action de notification envoyée à l’intégration (Slack) donnée.