Class: Infrawrench::RightsizingNamespace
- Inherits:
-
Object
- Object
- Infrawrench::RightsizingNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.rightsizing
Instance Method Summary collapse
-
#get(org_id: nil, refresh: nil, request_options: nil) ⇒ Hash
List oversized resources with resize recommendations.
-
#initialize(transport) ⇒ RightsizingNamespace
constructor
private
A new instance of RightsizingNamespace.
Constructor Details
#initialize(transport) ⇒ RightsizingNamespace
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 RightsizingNamespace.
5099 5100 5101 |
# File 'lib/infrawrench/client.rb', line 5099 def initialize(transport) @transport = transport end |
Instance Method Details
#get(org_id: nil, refresh: nil, request_options: nil) ⇒ Hash
List oversized resources with resize recommendations
Computes p95 CPU/memory utilisation over the last 14 days of stored
metrics for every resource whose plugin declares right-sizing support, and
matches under-utilised ones against the plugin's real size catalog (the
create form's size options, live-priced). Each recommendation names the
cheapest smaller size that still clears a headroom margin and quotes the
monthly saving. Apply one by submitting sizeFieldKey with the
recommended size id through the resource-update endpoint — which enforces
change freezes and writes the audit trail. Results are cached for a few
minutes; pass refresh=true to recompute.
Requires permission: resources:read.
GET /api/org/orgId/rightsizing
5126 5127 5128 5129 5130 5131 5132 5133 5134 |
# File 'lib/infrawrench/client.rb', line 5126 def get(org_id: nil, refresh: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/rightsizing", path_params: { "orgId" => org_id }, query: { "refresh" => refresh }, request_options: ) end |