GetSavingsPlansPurchaseRecommendation
Retrieves the Savings Plans recommendations for your account. First use
StartSavingsPlansPurchaseRecommendationGeneration to generate a new set of
recommendations, and then use GetSavingsPlansPurchaseRecommendation to retrieve
them.
Request Syntax
{
"AccountScope": "string",
"Filter": {
"And": [
"Expression"
],
"CostCategories": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Dimensions": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Not": "Expression",
"Or": [
"Expression"
],
"Tags": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
}
},
"LookbackPeriodInDays": "string",
"NextPageToken": "string",
"PageSize": number,
"PaymentOption": "string",
"SavingsPlansType": "string",
"TermInYears": "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.
- AccountScope
-
The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to
PAYER. If the value isLINKED, recommendations are calculated for individual member accounts only.Type: String
Valid Values:
PAYER | LINKEDRequired: No
- Filter
-
You can filter your recommendations by Account ID with the
LINKED_ACCOUNTdimension. To filter your recommendations by Account ID, specifyKeyasLINKED_ACCOUNTandValueas the comma-separated Acount ID(s) that you want to see Savings Plans purchase recommendations for.For GetSavingsPlansPurchaseRecommendation, the
Filterdoesn't includeCostCategoriesorTags. It only includesDimensions. WithDimensions,Keymust beLINKED_ACCOUNTandValuecan be a single Account ID or multiple comma-separated Account IDs that you want to see Savings Plans Purchase Recommendations for.ANDandORoperators are not supported.Type: Expression object
Required: No
- LookbackPeriodInDays
-
The lookback period that's used to generate the recommendation.
Type: String
Valid Values:
SEVEN_DAYS | THIRTY_DAYS | SIXTY_DAYSRequired: Yes
- NextPageToken
-
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
- PageSize
-
The number of recommendations that you want returned in a single response object.
Type: Integer
Valid Range: Minimum value of 0.
Required: No
- PaymentOption
-
The payment option that's used to generate these recommendations.
Type: String
Valid Values:
NO_UPFRONT | PARTIAL_UPFRONT | ALL_UPFRONT | LIGHT_UTILIZATION | MEDIUM_UTILIZATION | HEAVY_UTILIZATIONRequired: Yes
- SavingsPlansType
-
The Savings Plans recommendation type that's requested.
Type: String
Valid Values:
COMPUTE_SP | EC2_INSTANCE_SP | SAGEMAKER_SPRequired: Yes
- TermInYears
-
The savings plan recommendation term that's used to generate these recommendations.
Type: String
Valid Values:
ONE_YEAR | THREE_YEARSRequired: Yes
Response Syntax
{
"Metadata": {
"AdditionalMetadata": "string",
"GenerationTimestamp": "string",
"RecommendationId": "string"
},
"NextPageToken": "string",
"SavingsPlansPurchaseRecommendation": {
"AccountScope": "string",
"LookbackPeriodInDays": "string",
"PaymentOption": "string",
"SavingsPlansPurchaseRecommendationDetails": [
{
"AccountId": "string",
"CurrencyCode": "string",
"CurrentAverageHourlyOnDemandSpend": "string",
"CurrentMaximumHourlyOnDemandSpend": "string",
"CurrentMinimumHourlyOnDemandSpend": "string",
"EstimatedAverageUtilization": "string",
"EstimatedMonthlySavingsAmount": "string",
"EstimatedOnDemandCost": "string",
"EstimatedOnDemandCostWithCurrentCommitment": "string",
"EstimatedROI": "string",
"EstimatedSavingsAmount": "string",
"EstimatedSavingsPercentage": "string",
"EstimatedSPCost": "string",
"HourlyCommitmentToPurchase": "string",
"RecommendationDetailId": "string",
"SavingsPlansDetails": {
"InstanceFamily": "string",
"OfferingId": "string",
"Region": "string"
},
"UpfrontCost": "string"
}
],
"SavingsPlansPurchaseRecommendationSummary": {
"CurrencyCode": "string",
"CurrentOnDemandSpend": "string",
"DailyCommitmentToPurchase": "string",
"EstimatedMonthlySavingsAmount": "string",
"EstimatedOnDemandCostWithCurrentCommitment": "string",
"EstimatedROI": "string",
"EstimatedSavingsAmount": "string",
"EstimatedSavingsPercentage": "string",
"EstimatedTotalCost": "string",
"HourlyCommitmentToPurchase": "string",
"TotalRecommendationCount": "string"
},
"SavingsPlansType": "string",
"TermInYears": "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.
- Metadata
-
Information that regards this specific recommendation set.
Type: SavingsPlansPurchaseRecommendationMetadata object
- NextPageToken
-
The token for the next set of retrievable results. Amazon 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]* - SavingsPlansPurchaseRecommendation
-
Contains your request parameters, Savings Plan Recommendations Summary, and Details.
Type: SavingsPlansPurchaseRecommendation object
Errors
For information about the errors that are common to all actions, see Common Errors.
- 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 Amazon SDKs, see the following: