Resources
Savings
Overview
The Savings resource tracks realized savings from recommendations that have been accepted and implemented. Each savings record includes pre- and post-optimization costs, the implementation period, and return on investment.
Methods
Get Summary
Returns an aggregate summary of all realized savings: total saved, monthly savings rate, and savings breakdown.
summary = client.recommendations.audit.get_summary()List Savings
Returns a paginated list of all implemented savings with filtering by date, provider, service, environment, and account.
page = client.recommendations.audit.list(
page=1,
page_size=50,
sort_by="monthly_savings",
sort_order="desc",
provider="aws",
start="2025-01-01",
end="2025-03-31",
)
for item in page:
print(f"{item.service}: ${item.monthly_savings}/mo (ROI: {item.roi}x)")Parameters
| Parameter | Type | Description |
|---|---|---|
page | int | Page number (1-indexed) |
page_size | int | Items per page (max 100) |
sort_by | string | Sort field: period, account_id, environment, service, usage_type, usage_quantity, usage_unit, pre_optimization_cost, post_optimization_cost, monthly_savings, roi, approved_by |
sort_order | string | asc or desc |
start | string | Start date (YYYY-MM-DD or YYYY-MM) |
end | string | End date (YYYY-MM-DD or YYYY-MM) |
preset | string | Date preset: 30D, 6M, or 12M (overrides start/end) |
provider | string | Filter by provider: aws, gcp, azure, k8s |
service | string[] | Filter by service(s) |
environment | string[] | Filter by environment(s) |
account_id | string[] | Filter by account ID(s) |
Response Types
SavedItem
| Field | Type | Description |
|---|---|---|
period | string | Savings period identifier |
account_id | string? | Cloud account ID |
environment | string? | Environment tag |
service | string | Cloud service name |
usage_type | string | Type of usage |
usage_quantity | float | Quantity of usage |
usage_unit | string | Unit of usage |
approved_by | string? | Who approved the optimization |
pre_optimization_cost | float | Cost before optimization |
post_optimization_cost | float | Cost after optimization |
monthly_savings | float | Monthly savings amount |
annual_savings | float | Annual savings amount |
roi | float | Return on investment |
Example: Last 6 Months of Savings by Provider
from levelfour import LevelFour
client = LevelFour()
for provider in ["aws", "gcp", "azure"]:
summary = client.providers.get_realized_savings_summary(provider)
print(f"{provider}: {summary}")