GetSavingsPlansUtilization
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.
Request Syntax
{
"Filter": {
"And": [
"Expression"
],
"CostCategories": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Dimensions": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Not": "Expression",
"Or": [
"Expression"
],
"ProductAttributes": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Tags": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
}
},
"Granularity": "string",
"SortBy": {
"Key": "string",
"SortOrder": "string"
},
"TimePeriod": {
"End": "string",
"Start": "string"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Filter
-
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.Type: Expression object
Required: No
-
- Granularity
-
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.Type: String
Valid Values:
DAILY | MONTHLY | HOURLYRequired: No
- SortBy
-
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.Type: SortDefinition object
Required: No
-
- TimePeriod
-
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.Type: DateInterval object
Required: Yes
Response Syntax
{
"SavingsPlansUtilizationsByTime": [
{
"AmortizedCommitment": {
"AmortizedRecurringCommitment": "string",
"AmortizedUpfrontCommitment": "string",
"TotalAmortizedCommitment": "string"
},
"Savings": {
"NetSavings": "string",
"OnDemandCostEquivalent": "string"
},
"TimePeriod": {
"End": "string",
"Start": "string"
},
"Utilization": {
"TotalCommitment": "string",
"UnusedCommitment": "string",
"UsedCommitment": "string",
"UtilizationPercentage": "string"
}
}
],
"Total": {
"AmortizedCommitment": {
"AmortizedRecurringCommitment": "string",
"AmortizedUpfrontCommitment": "string",
"TotalAmortizedCommitment": "string"
},
"Savings": {
"NetSavings": "string",
"OnDemandCostEquivalent": "string"
},
"Utilization": {
"TotalCommitment": "string",
"UnusedCommitment": "string",
"UsedCommitment": "string",
"UtilizationPercentage": "string"
}
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- SavingsPlansUtilizationsByTime
-
The amount of cost/commitment that you used your Savings Plans. You can use it to specify date ranges.
Type: Array of SavingsPlansUtilizationByTime objects
- Total
-
The total amount of cost/commitment that you used your Savings Plans, regardless of date ranges.
Type: SavingsPlansUtilizationAggregates object
Errors
For information about the errors that are common to all actions, see Common Error Types.
- DataUnavailableException
-
The requested data is unavailable.
HTTP Status Code: 400
- LimitExceededException
-
You made too many calls in a short period of time. Try again later.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: