Class: Infrawrench::CostsEfficiencyAlertSettingsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::CostsEfficiencyAlertSettingsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.costs.efficiency_alert_settings
Instance Method Summary collapse
-
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's efficiency alert tuning.
-
#initialize(transport) ⇒ CostsEfficiencyAlertSettingsNamespace
constructor
private
A new instance of CostsEfficiencyAlertSettingsNamespace.
-
#update(body:, org_id: nil, request_options: nil) ⇒ Hash
Update the organization's efficiency alert tuning.
Constructor Details
#initialize(transport) ⇒ CostsEfficiencyAlertSettingsNamespace
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 CostsEfficiencyAlertSettingsNamespace.
5005 5006 5007 |
# File 'lib/infrawrench/client.rb', line 5005 def initialize(transport) @transport = transport end |
Instance Method Details
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's efficiency alert tuning
Thresholds for the commitment-expiry, idle-commitment and unit-cost-regression detectors. An organization that has never changed one reads back the defaults, which are chosen to work with no setup.
Requires permission: costs:read.
GET /api/org/orgId/costs/efficiency-alert-settings
5025 5026 5027 5028 5029 5030 5031 5032 |
# File 'lib/infrawrench/client.rb', line 5025 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/costs/efficiency-alert-settings", path_params: { "orgId" => org_id }, request_options: ) end |
#update(body:, org_id: nil, request_options: nil) ⇒ Hash
Update the organization's efficiency alert tuning
Takes effect on the next evaluation pass (which runs after each cost collection). Already-fired alerts are not re-judged, and horizons that have already fired for a commitment's current term do not fire again — widening the horizon list warns about future crossings, not past ones. A PUT of the whole object, not a patch.
Requires permission: costs:write.
PUT /api/org/orgId/costs/efficiency-alert-settings
Raises on 400: Bad request
5055 5056 5057 5058 5059 5060 5061 5062 5063 |
# File 'lib/infrawrench/client.rb', line 5055 def update(body:, org_id: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/costs/efficiency-alert-settings", path_params: { "orgId" => org_id }, body: body, request_options: ) end |