Class: Infrawrench::QuotasSettingsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::QuotasSettingsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.quotas.settings
Instance Method Summary collapse
-
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's quota alert settings.
-
#initialize(transport) ⇒ QuotasSettingsNamespace
constructor
private
A new instance of QuotasSettingsNamespace.
-
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update the quota alert settings.
Constructor Details
#initialize(transport) ⇒ QuotasSettingsNamespace
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 QuotasSettingsNamespace.
11314 11315 11316 |
# File 'lib/infrawrench/client.rb', line 11314 def initialize(transport) @transport = transport end |
Instance Method Details
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's quota alert settings
The threshold feeds both the feed's severity buckets and the poller's daily alert scan. An organization that never saved reads the shipped defaults (enabled, 0.8).
Requires permission: org:settings:write.
GET /api/org/orgId/quotas/settings
11334 11335 11336 11337 11338 11339 11340 11341 |
# File 'lib/infrawrench/client.rb', line 11334 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/quotas/settings", path_params: { "orgId" => org_id }, request_options: ) end |
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update the quota alert settings
Every field is optional so a single toggle can be saved on its own.
threshold is a fraction from 0.5 to 0.99 and is rejected rather than
clamped when out of range. Saving never resets the alert cooldown.
Requires permission: org:settings:write.
PUT /api/org/orgId/quotas/settings
Raises on 400: Bad request
11362 11363 11364 11365 11366 11367 11368 11369 11370 |
# File 'lib/infrawrench/client.rb', line 11362 def update(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/quotas/settings", path_params: { "orgId" => org_id }, body: body, request_options: ) end |