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.
2926 2927 2928 |
# File 'lib/infrawrench/client.rb', line 2926 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
2946 2947 2948 2949 2950 2951 2952 2953 |
# File 'lib/infrawrench/client.rb', line 2946 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
2973 2974 2975 2976 2977 2978 2979 2980 2981 |
# File 'lib/infrawrench/client.rb', line 2973 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 |