get_reservation_utilization
async
¶
get_reservation_utilization(
time_period: DateInterval,
*,
config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
group_by: Optional[GroupDefinitions] = None,
granularity: Optional[Granularity] = None,
filter: Optional[Expression] = None,
sort_by: Optional[SortDefinition] = None,
next_page_token: Optional[NextPageToken] = None,
max_results: Optional[MaxResults] = None,
) -> GetReservationUtilizationResponse
Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use GetDimensionValues to determine the possible dimension values. Currently, you can group only by SUBSCRIPTION_ID.
Parameters:
-
time_period(DateInterval) –Sets the start and end dates for retrieving Reserved Instance (RI) utilization. The start date is inclusive, but the end date is exclusive. For example, if
startis2017-01-01andendis2017-05-01, then the cost and usage data is retrieved from2017-01-01up to and including2017-04-30but not including2017-05-01. -
group_by(Optional[GroupDefinitions], default:None) –Groups only by
SUBSCRIPTION_ID. Metadata is included. -
granularity(Optional[Granularity], default:None) –If
GroupByis set,Granularitycan't be set. IfGranularityisn't set, the response object doesn't includeGranularity, eitherMONTHLYorDAILY. If bothGroupByandGranularityaren't set,GetReservationUtilizationdefaults toDAILY.The
GetReservationUtilizationoperation supports onlyDAILYandMONTHLYgranularities. -
filter(Optional[Expression], default:None) –Filters utilization data by dimensions. You can filter by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
SERVICE
If not specified, the
SERVICEfilter defaults to Amazon Elastic Compute Cloud - Compute. Supported values forSERVICEare Amazon Elastic Compute Cloud - Compute, Amazon Relational Database Service, Amazon ElastiCache, Amazon Redshift, and Amazon Elasticsearch Service. The value for theSERVICEfilter should not exceed "1". -
SCOPE
-
TENANCY
GetReservationUtilizationuses the same Expression object as the other operations, but onlyANDis supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together. -
-
sort_by(Optional[SortDefinition], default:None) –The value that you want to sort the data by.
The following values are supported for
Key:-
UtilizationPercentage -
UtilizationPercentageInUnits -
PurchasedHours -
PurchasedUnits -
TotalActualHours -
TotalActualUnits -
UnusedHours -
UnusedUnits -
OnDemandCostOfRIHoursUsed -
NetRISavings -
TotalPotentialRISavings -
AmortizedUpfrontFee -
AmortizedRecurringFee -
TotalAmortizedFee -
RICostForUnusedHours -
RealizedSavings -
UnrealizedSavings
The supported values for
SortOrderareASCENDINGandDESCENDING. -
-
next_page_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 maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
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
1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 | |