Class: Infrawrench::AlertRulesDeliveriesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::AlertRulesDeliveriesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.alert_rules.deliveries
Instance Method Summary collapse
-
#ack(id:, org_id: nil, request_options: nil) ⇒ Hash
Acknowledge an alert, cancelling its escalation.
-
#cancel(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Drop held or awaiting-acknowledgement deliveries.
-
#initialize(transport) ⇒ AlertRulesDeliveriesNamespace
constructor
private
A new instance of AlertRulesDeliveriesNamespace.
-
#list(org_id: nil, limit: nil, request_options: nil) ⇒ Array<Hash>
List recent held and escalating alerts.
Constructor Details
#initialize(transport) ⇒ AlertRulesDeliveriesNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AlertRulesDeliveriesNamespace.
1079 1080 1081 |
# File 'lib/infrawrench/client.rb', line 1079 def initialize(transport) @transport = transport end |
Instance Method Details
#ack(id:, org_id: nil, request_options: nil) ⇒ Hash
Acknowledge an alert, cancelling its escalation
A conditional update: only a delivery still in awaiting_ack can move, so
two people pressing at once produce one acknowledgement and an alert that
already escalated cannot be retroactively silenced.
POST /api/org/orgId/alert-rules/deliveries/id/ack
Raises on 401: Unauthenticated
Raises on 403: Forbidden
Raises on 404: Not found
1103 1104 1105 1106 1107 1108 1109 1110 |
# File 'lib/infrawrench/client.rb', line 1103 def ack(id:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/alert-rules/deliveries/{id}/ack", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#cancel(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Drop held or awaiting-acknowledgement deliveries
POST /api/org/orgId/alert-rules/deliveries/cancel
Raises on 400: Bad request
Raises on 403: Forbidden
1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File 'lib/infrawrench/client.rb', line 1126 def cancel(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/alert-rules/deliveries/cancel", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#list(org_id: nil, limit: nil, request_options: nil) ⇒ Array<Hash>
List recent held and escalating alerts
Only alerts a rule created follow-up work for appear here: one held by quiet hours, or one waiting on an acknowledgement. An alert that went straight out leaves no row.
GET /api/org/orgId/alert-rules/deliveries
Raises on 403: Forbidden
1153 1154 1155 1156 1157 1158 1159 1160 1161 |
# File 'lib/infrawrench/client.rb', line 1153 def list(org_id: nil, limit: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/alert-rules/deliveries", path_params: { "orgId" => org_id }, query: { "limit" => limit }, request_options: ) end |