GetSavingsPlansUtilizationDetails
Retrieves attribute data along with aggregate utilization and savings data for a given
time period. This doesn't support granular or grouped data (daily/monthly) in response. You
can't retrieve data by dates in a single response similar to
GetSavingsPlanUtilization, but you have the option to make multiple calls to
GetSavingsPlanUtilizationDetails by providing individual dates. You can use
GetDimensionValues in SAVINGS_PLANS to determine the possible
dimension values.
GetSavingsPlanUtilizationDetails internally groups data by
SavingsPlansArn.
Request Syntax
{
"DataType": [ "string" ],
"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" ]
}
},
"MaxResults": number,
"NextToken": "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.
- DataType
-
The data type.
Type: Array of strings
Valid Values:
ATTRIBUTES | UTILIZATION | AMORTIZED_COMMITMENT | SAVINGSRequired: No
- 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
GetSavingsPlansUtilizationDetailsuses 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
-
- MaxResults
-
The number of items to be returned in a response. The default is
20, with a minimum value of1.Type: Integer
Valid Range: Minimum value of 1.
Required: No
- NextToken
-
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.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 8192.
Pattern:
[\S\s]*Required: No
- SortBy
-
The value that you want to sort the data by.
The following values are supported for
Key:-
UtilizationPercentage -
TotalCommitment -
UsedCommitment -
UnusedCommitment -
NetSavings -
AmortizedRecurringCommitment -
AmortizedUpfrontCommitment
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.The
Enddate is exclusive. If utilization data isn't complete for the whole period, Cost Explorer movesEndearlier to the first day without complete data, unlessDataTypeis onlyATTRIBUTES. The responseTimePeriodshows the period used.Type: DateInterval object
Required: Yes
Response Syntax
{
"NextToken": "string",
"SavingsPlansUtilizationDetails": [
{
"AmortizedCommitment": {
"AmortizedRecurringCommitment": "string",
"AmortizedUpfrontCommitment": "string",
"TotalAmortizedCommitment": "string"
},
"Attributes": {
"string" : "string"
},
"Savings": {
"NetSavings": "string",
"OnDemandCostEquivalent": "string"
},
"SavingsPlanArn": "string",
"Utilization": {
"TotalCommitment": "string",
"UnusedCommitment": "string",
"UsedCommitment": "string",
"UtilizationPercentage": "string"
}
}
],
"TimePeriod": {
"End": "string",
"Start": "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.
- NextToken
-
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.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 8192.
Pattern:
[\S\s]* - SavingsPlansUtilizationDetails
-
Retrieves a single daily or monthly Savings Plans utilization rate and details for your account.
Type: Array of SavingsPlansUtilizationDetail objects
- TimePeriod
-
The time period that the response covers.
Endcan be earlier than theEnddate in the request if utilization data isn't complete for the whole period.Type: DateInterval object
- Total
-
The total Savings Plans utilization for the Savings Plans in this page of results.
Totalcovers only the current page, not the whole query. If the response includes aNextToken, addTotalCommitmentandUsedCommitmentacross all pages, and then compute the utilization percentage from those sums.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
- InvalidNextTokenException
-
The pagination token is invalid. Try again without a pagination token.
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: