get_savings_plans_utilization
¶
get_savings_plans_utilization(
time_period: DateInterval,
*,
config_overrides: Optional[CostExplorerClientConfig] = None,
granularity: Optional[Granularity] = None,
filter: Optional[Expression] = None,
sort_by: Optional[SortDefinition] = None,
) -> GetSavingsPlansUtilizationResponse
Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Management account in an organization have access to member accounts. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values.
You can't group by any dimension values for GetSavingsPlansUtilization.
Parameters:
-
time_period(DateInterval) –The time period that you want the usage and costs for. The
Startdate must be within 13 months. TheEnddate must be after theStartdate, and before the current date. Future dates can't be used as anEnddate. -
granularity(Optional[Granularity], default:None) –The granularity of the Amazon Web Services utilization data for your Savings Plans.
The
GetSavingsPlansUtilizationoperation supports onlyDAILYandMONTHLYgranularities.With
MONTHLY, each result'sTimePeriodshows a full calendar month, but its amounts include only the days inside the requestedTimePeriod. IfTimePerioddoesn't start on the first day of a month, the first result covers only part of that month. The same applies to the last result ifTimePerioddoesn't end on the first day of a month. For the current month, the result'sEndis the first day without complete data. -
filter(Optional[Expression], default:None) –Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:
-
LINKED_ACCOUNT -
SAVINGS_PLAN_ARN -
SAVINGS_PLANS_TYPE -
REGION -
PAYMENT_OPTION -
INSTANCE_TYPE_FAMILY
GetSavingsPlansUtilizationuses the same Expression object as the other operations. The filter must have one of the following shapes:-
A
Dimensionsexpression. -
A
Notexpression that contains oneDimensionsexpression. -
An
Andexpression with two or more operands, where each operand has one of the two shapes above.
Or,Tags, andCostCategoriesexpressions aren't supported. AnAndexpression can't contain anotherAnd, and aNotexpression can't contain anAndor anotherNot.Each dimension can appear only once in the filter, including inside
Not. To filter on several values of a dimension, put all of the values in one expression. Cost Explorer combines the values in one expression with OR. -
-
sort_by(Optional[SortDefinition], default:None) –The value that you want to sort the data by.
The following values are supported for
Key:-
UtilizationPercentage -
TotalCommitment -
UsedCommitment -
UnusedCommitment -
NetSavings
The supported values for
SortOrderareASCENDINGandDESCENDING. -
Raises:
-
DataUnavailableException–The requested data is unavailable.
-
LimitExceededException–You made too many calls in a short period of time. Try again later.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 | |