actions/acknowledge_alert.py
def run(self, alert_id=None, alias=None, user=None, note=None, source="StackStorm"):
        """
        Acknowledge alert request is used to acknowledge open alerts in OpsGenie.

        Args:
        - alert_id: Id of the alert that will be acknowledged.
        - alias: Alias of the alert that will be acknowledged.
        - user: Default owner of the execution.
        - note: Additional alert note
        - source: User defined field to specify source of acknowledge action.

        Returns:
        - dict: Data from OpsGenie

        Raises:
        - ValueError: If alias and alert_id are None.
        """

        body = {"source": source}
        parameters = {}

        if alert_id:
            identifier = pathname2url(alert_id)  # default
            parameters["identifierType"] = "id"
        elif alias:
            identifier = pathname2url(alias)
            parameters["identifierType"] = "alias"
        else:
            raise ValueError("Need one of alias or alert_id to be set.")

        if user:
            body["user"] = user

        if note:
            body["note"] = note

        data = self._req(
            "POST", "v2/alerts/" + identifier + "/acknowledge", body=body, payload=parameters
        )

        return data

        Acknowledge alert request is used to acknowledge open alerts in OpsGenie.

        Args:
        - alert_id: Id of the alert that will be acknowledged.
        - alias: Alias of the alert that will be acknowledged.
        - user: Default owner of the execution.
        - note: Additional alert note
        - source: User defined field to specify source of acknowledge action.

        Returns:
        - dict: Data from OpsGenie

        Raises:
        - ValueError: If alias and alert_id are None.
        
Acknowledge alert request is used to acknowledge open alerts in OpsGenie.
Args:
alert_id: Id of the alert that will be acknowledged.
alias: Alias of the alert that will be acknowledged.
user: Default owner of the execution.
note: Additional alert note
source: User defined field to specify source of acknowledge action.



If alias and alert_id are None.
Acknowledge alert request is used to acknowledge open alerts in OpsGenie . Args : alert_id : Id of the alert that will be acknowledged . alias : Alias of the alert that will be acknowledged . user : Default owner of the execution . note : Additional alert note source : User defined field to specify source of acknowledge action . If alias and alert_id are None .
def run(self, alert_id=None, alias=None, user=None, note=None, source="StackStorm"):
        body = {"source": source}
        parameters = {}
        if alert_id:
            identifier = pathname2url(alert_id)  
            parameters["identifierType"] = "id"
        elif alias:
            identifier = pathname2url(alias)
            parameters["identifierType"] = "alias"
        else:
            raise ValueError("Need one of alias or alert_id to be set.")
        if user:
            body["user"] = user
        if note:
            body["note"] = note
        data = self._req(
            "POST", "v2/alerts/" + identifier + "/acknowledge", body=body, payload=parameters
        )
        return data
def run ( self , alert_id = None , alias = None , user = None , note = None , source = "StackStorm" ) : body = { "source" : source } parameters = { } if alert_id : identifier = pathname2url ( alert_id ) parameters [ "identifierType" ] = "id" elif alias : identifier = pathname2url ( alias ) parameters [ "identifierType" ] = "alias" else : raise ValueError ( "Need one of alias or alert_id to be set." ) if user : body [ "user" ] = user if note : body [ "note" ] = note data = self . _req ( "POST" , "v2/alerts/" + identifier + "/acknowledge" , body = body , payload = parameters ) return data
Acknowledge alert request is used to acknowledge open alerts in OpsGenie.
Acknowledge alert request is used to acknowledge open alerts in OpsGenie .
"""
        Acknowledge alert request is used to acknowledge open alerts in OpsGenie.

        Args:
        - alert_id: Id of the alert that will be acknowledged.
        - alias: Alias of the alert that will be acknowledged.
        - user: Default owner of the execution.
        - note: Additional alert note
        - source: User defined field to specify source of acknowledge action.

        Returns:
        - dict: Data from OpsGenie

        Raises:
        - ValueError: If alias and alert_id are None.
        """ # default
self
alert_id
alias
user
note
source