Resources
Recommendations
Overview
Recommendations represent pending savings opportunities identified by LevelFour across your cloud accounts. Each recommendation includes the affected service, estimated monthly and annual savings, and available actions (accept, reject, execute).
Methods
Get Savings by Provider
Returns a summary of potential savings grouped by cloud provider (AWS, GCP, Azure, K8s).
summary = client.recommendations.get_savings_by_provider()Get Potential Savings
Returns potential savings summary grouped by provider.
potential = client.recommendations.get_potential_savings()Get Overview
Returns overview metrics across all providers: total spend, available savings, pending savings, and saved-to-date.
overview = client.recommendations.get_overview()List Recommendations
Returns a paginated list of all recommendations. Supports sorting by multiple fields.
page = client.recommendations.list(
page=1,
page_size=50,
sort_by="monthly_savings",
sort_order="desc",
)
for rec in page:
print(f"{rec.service}: ${rec.monthly_savings}/mo")Parameters
| Parameter | Type | Description |
|---|---|---|
page | int | Page number (1-indexed) |
page_size | int | Items per page (max 100) |
sort_by | string | Sort field: recommendation_id, service, environment, monthly_savings, annual_savings, savings_percentage, analysis_period, created_at |
sort_order | string | asc or desc |
Get Recommendation
Returns complete details for a specific recommendation by ID.
detail = client.recommendations.get("rec_123")List In-Progress
Returns all recommendations currently in processing status.
processing = client.recommendations.list_in_progress()Response Types
RecommendationItem
Returned in paginated list responses.
| Field | Type | Description |
|---|---|---|
recommendation_id | string | Unique business identifier |
service | string | Cloud service name |
environment | string? | Environment tag |
analysis_period | string? | Analysis time window |
monthly_savings | float | Estimated monthly savings |
annual_savings | float | Estimated annual savings |
current_spending | float | Current monthly spend |
savings_percentage | float | Savings as percentage of current spend |
actions | object? | Available actions for this recommendation |
Example: Find High-Value AWS Recommendations
from levelfour import LevelFour
client = LevelFour()
for rec in client.providers.list_recommendations(
"aws",
page_size=20,
sort_by="monthly_savings",
sort_order="desc",
display_status=["available"],
):
if rec.monthly_savings > 100:
print(f"{rec.recommendation_id}: ${rec.monthly_savings}/mo")