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.
1334 1335 1336 |
# File 'lib/infrawrench/client.rb', line 1334 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
1358 1359 1360 1361 1362 1363 1364 1365 |
# File 'lib/infrawrench/client.rb', line 1358 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
1381 1382 1383 1384 1385 1386 1387 1388 1389 |
# File 'lib/infrawrench/client.rb', line 1381 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
1408 1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'lib/infrawrench/client.rb', line 1408 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 |