All the functions listed below are sending HTTPS requests to OpsGenie via the Invoke-RestMethod
cmdlet. Learn more about the Invoke-RestMethod.
Alls responses are returned in the form of an Object.
List information regarding the specified Heartbeat
Get-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-heartbeatName <Target OpsGenie Heartbeat>]
Lists all available Heartbeats
Get-Heartbeats
[-GenieKey <OpsGenie Authorization Key>]
Resets a Heartbeat
Ping-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-heartbeatName <Target OpsGenie Heartbeat>]
Creates a new Heartbeat. Mandatory fields:
- heartbeatName
- Interval
- Interval Unit
Install-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-Name <Heartbeat Name (String)>]
[-Description <Heartbeat Description (String)>]
[-Interval <Heartbeat Interval Integer>]
[-IntervalUnit <Heartbeat Interval Unit>]
[-Enabled <Heartbeat Enabled / Disabled (Boolean)>]
[-OwnerTeam <Owner team of the heartbeat, consisting id and/or name of the owner team>]
[-AlertMessage <Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired". This has a limit of 130 chars, specified by OpsGenie API>]
Updates existing heartbeat.
Update-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-heartbeatName <Heartbeat Name>]
[-Description <Heartbeat Description (String)>]
[-Interval <Heartbeat Interval Integer>]
[-IntervalUnit <Heartbeat Interval Unit>]
[-Enabled <Heartbeat Enabled / Disabled (Boolean)>]
[-OwnerTeam <Owner team of the heartbeat, consisting id and/or name of the owner team>]
[-AlertMessage <Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired". This has a limit of 130 chars, specified by OpsGenie API>]
Removes an existing Heartbeat.
Remove-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-heartbeatName <Target Heartbeat to remove>]
Enables a disabled Heartbeat.
Enable-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-heartbeatName <Tartget Heartbeat to enable>]
Disables an enabled Heartbeat.
Disable-Heartbeat
[-GenieKey <OpsGenie Authorization Key>]
[-heartbeatName <Target Heartbeat to disable>]
This module supports all API endpoints provided by the OpsGenie Heartbeat API
There is currently no integration for OpsGenie Alerts
- Add character limits to parameters if API specifies
- Consistency of parameter names
- Add logic for enabling - disabling heartbeats