Class: Infrawrench::ChangesAlertSettingsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::ChangesAlertSettingsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.changes.alert_settings
Instance Method Summary collapse
-
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's resource-drift alert filter.
-
#initialize(transport) ⇒ ChangesAlertSettingsNamespace
constructor
private
A new instance of ChangesAlertSettingsNamespace.
-
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update the organization's resource-drift alert filter.
Constructor Details
#initialize(transport) ⇒ ChangesAlertSettingsNamespace
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 ChangesAlertSettingsNamespace.
1276 1277 1278 |
# File 'lib/infrawrench/client.rb', line 1276 def initialize(transport) @transport = transport end |
Instance Method Details
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's resource-drift alert filter
Drift notifications are batched: at most one message per organization per
cooldownMinutes, covering every change since the previous one. These
settings decide which changes count and how often a message may go out.
Who receives it is the resourceDrift opt-in on push preferences, Slack
channels and Teams webhooks — off by default on all three.
GET /api/org/orgId/changes/alert-settings
1296 1297 1298 1299 1300 1301 1302 1303 |
# File 'lib/infrawrench/client.rb', line 1296 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/changes/alert-settings", path_params: { "orgId" => org_id }, request_options: ) end |
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update the organization's resource-drift alert filter
Every field is optional so a single toggle can be saved on its own.
cooldownMinutes is floored at 5: below the poller's own cycle the
notification rate would follow the sync rate again, which is what the
batching exists to prevent.
PUT /api/org/orgId/changes/alert-settings
Raises on 400: Bad request
1323 1324 1325 1326 1327 1328 1329 1330 1331 |
# File 'lib/infrawrench/client.rb', line 1323 def update(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/changes/alert-settings", path_params: { "orgId" => org_id }, body: body, request_options: ) end |