get_savings_plans_coverage
async
¶
get_savings_plans_coverage(
time_period: DateInterval,
*,
config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
group_by: Optional[GroupDefinitions] = None,
granularity: Optional[Granularity] = None,
filter: Optional[Expression] = None,
metrics: Optional[MetricNames] = None,
next_token: Optional[NextPageToken] = None,
max_results: Optional[MaxResults] = None,
sort_by: Optional[SortDefinition] = None,
) -> GetSavingsPlansCoverageResponse
Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, cost categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:
-
LINKED_ACCOUNT -
REGION -
SERVICE -
INSTANCE_FAMILY
To determine valid values for a dimension, use the GetDimensionValues operation.
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. -
group_by(Optional[GroupDefinitions], default:None) –You can group the data using the attributes
INSTANCE_FAMILY,REGION, orSERVICE. -
granularity(Optional[Granularity], default:None) –The granularity of the Amazon Web Services cost data for your Savings Plans.
Granularitycan't be set ifGroupByis set.The
GetSavingsPlansCoverageoperation supports onlyDAILYandMONTHLYgranularities. -
filter(Optional[Expression], default:None) –Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:
-
LINKED_ACCOUNT -
REGION -
SERVICE -
INSTANCE_FAMILY
GetSavingsPlansCoverageuses the same Expression object as the other operations, but onlyANDis supported among each dimension. If there are multiple values for a dimension, they are OR'd together.Cost category is also supported.
-
-
metrics(Optional[MetricNames], default:None) –The measurement that you want your Savings Plans coverage reported in. The only valid value is
SpendCoveredBySavingsPlans. -
next_token(Optional[NextPageToken], default:None) –The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
max_results(Optional[MaxResults], default:None) –The number of items to be returned in a response. The default is
20, with a minimum value of1. -
sort_by(Optional[SortDefinition], default:None) –The value that you want to sort the data by.
The following values are supported for
Key:-
SpendCoveredBySavingsPlan -
OnDemandCost -
CoveragePercentage -
TotalCost -
InstanceFamily -
Region -
Service
The supported values for
SortOrderareASCENDINGandDESCENDING. -
Raises:
-
DataUnavailableException–The requested data is unavailable.
-
InvalidNextTokenException–The pagination token is invalid. Try again without a pagination token.
-
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/async_cost_explorer.py
2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 | |